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

Hello everyone

I am trying to add an access group to an existing view, by inheritance. This existing view already has an access group, that's why I need to add the other group.

Here the code:

<record id="partner_view_buttons2" model="ir.ui.view">
<field
name="name">partner.view.buttons.inherit.security2</field>
<field
name="model">res.partner</field>
<field
name="inherit_id" ref="account.partner_view_buttons"/>
<field
name="groups_id" eval="[[4, ref('custom_security.group_invoice_see_only')]]" />
<field
name="arch" type="xml">
<button
name="action_view_partner_invoices" position="attributes">
<attribute
name="groups">account.group_account_invoice,custom_security.group_invoice_see_only</attribute>
</button>
</field>
</record>
Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Watch this video https://www.youtube.com/watch?v=W5ya521uTlo This will help you.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

try this:

 <field name="groups_id" eval="[(4, ref('custom_security.group_invoice_see_only'))]" />


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất


THIS WILL WORK ..!!


<record id="account.partner_view_buttons" model="ir.ui.view">

      <field name="groups_id" eval="[(4, (ref('custom_security.group_invoice_see_only'),))]"/>

</record>

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 22
4952
1
thg 11 24
1567
5
thg 7 24
92803
1
thg 12 23
2996
7
thg 6 24
24666