Is there a way to define a specific field as readonly on products and customers? I.e. a payment method is created for a customer and only those with access to change this field should be able to change the field. All other fields on the customer like address are writable by regular users.
Hi Sean Samborski,
You can write the fields as below:
'approved': fields.boolean('Approved', write=['base.group_sale_manager']),
And in xml as normal fields without any readonly or groups.
This won't be readonly field. But it is writable only to the users having sale manager access rights.
If you don't want to show this field to the users having no access rights, better write as normal fields and assign groups in xml file.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 12/18/13, 11:33 PM|
|Seen: 885 times|
|Last updated: 3/16/15, 8:10 AM|