Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2063 Widoki

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





Awatar
Odrzuć
Autor

Got it! thanks 

Najlepsza odpowiedź

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

Awatar
Odrzuć