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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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')
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
0
Aug 24
|
328 | ||
|
0
Mar 15
|
3292 | ||
|
1
Mar 15
|
8390 | ||
|
0
Feb 24
|
227 | ||
|
1
Nov 22
|
1921 |