Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2118 Lượt xem

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





Ảnh đại diện
Huỷ bỏ
Tác giả

Got it! thanks 

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ