Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
2177 มุมมอง

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





อวตาร
ละทิ้ง
ผู้เขียน

Got it! thanks 

คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง