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

Hi comunity

A question maybe easy, but sought to restrict the fields (in xml or py) with security permissions. Someone who can help or give guidance?? Thanks.

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

you can use groups keywords/attribute in python as well as in xml.

some thing Like in xml [/account/account_invoice_view.xml]:

 <field domain="[('company_id', '=', company_id), ('type', '=', 'payable')]"
name="account_id" groups="account.group_account_user"/>


some thing Like in .py [/addons/account/partner.py]:

'total_invoiced': fields.function(_invoice_total, string="Total Invoiced",

                                    type='float',

                                    groups='account.group_account_invoice')

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
4
มิ.ย. 25
2244
0
มี.ค. 15
4241
1
มี.ค. 15
9502
0
ก.พ. 24
916
1
พ.ย. 22
3031