Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2059 Vistas

I created a new group and I want to hide the confirm button from other users.

But I found 2 buttons with the same name action_confirm in the sales order form.

how can i override them using xml.

here is my code:

xml version="1.0" encoding="utf-8" ?>

id="view_sale_order_form_inherited" model="ir.ui.view">
name="name">sale.order.form.inherited
name="model">sale.order
name="inherit_id" ref="sale.view_order_form"/>
name="arch" type="xml">
expr="//button[@name='action_confirm']" position="attributes">
name="groups">edm_confirm_permission.group_confirm




id="view_sale_order_form_inherited" model="ir.ui.view">
name="name">sale.order.form.inherited
name="model">sale.order
name="inherit_id" ref="account.view_move_form"/>
name="arch" type="xml">
expr="//button[@name='action_post']" position="attributes">
name="groups">edm_confirm_permission.group_post





Avatar
Descartar
Autor

Got it! thanks 

Mejor respuesta

Hi,

Using positional attribute [1] and [2] you can locate both the buttons using the xpath expression and apply the new user grou[ for it.

//button[@name='action_confirm'][1]


Thanks

Avatar
Descartar