Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3531 Vizualizări

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.

Imagine profil
Abandonează
Cel mai bun răspuns

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')

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
4
iun. 25
2269
0
mar. 15
4258
1
mar. 15
9504
0
feb. 24
931
1
nov. 22
3033