Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to change the definition on the 'standard_price' field in 'product.template' such that the cost price is not accessible to certain user groups.
As I understand this can be done using field access rights by modifying the group access at the field definition within the product_template class in the file product.py (located at openerp/addons/product), such that:
'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="base.group_user")
'standard_price': fields.float('Cost', digits_compute=dp.get_precision('Product Price'), help="Cost price of the product used for standard stock valuation in accounting and used as a base price on purchase orders.", groups="group1"
where "group1" is the group which can access the field.
However, when this change is made any user not in the user group "group1" cannot access the product page at all (Access Denied- The requested operation cannot be completed due to security restrictions. Please contact your system administrator. (Document type: Product, Operation: read).
How should the change be applied such that users not in "group1" can still open the product view but just cannot see the field (or have the value blank)?
Thanks for reading this far!
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 4/5/13, 9:40 AM|
|Seen: 2264 times|
|Last updated: 3/16/15, 8:10 AM|