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

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>
อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

try this:

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


อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด


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>

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 22
5029
1
พ.ย. 24
1649
Change the Position of field in Xpath แก้ไขแล้ว
5
ก.ค. 24
92921
1
ธ.ค. 23
3054
7
มิ.ย. 24
24730