What is the easiest way a module can override a base field to add a Group restriction to the base field?
I want to add a group restriction to a field for hr.employee. For example remaining_leave should be for Human Resources / Manager only.
When I try to edit the field through the model Employee, I get the error:
Properties of base fields cannot be altered in this manner! Please modify them through Python code,
preferably through a custom addon!
Now I have followed the steps to create a new module, how should I override this field to be access by group Human Resources / Manager only? What should I write in mymodule.py?
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: 6/7/15, 1:32 PM|
|Seen: 335 times|
|Last updated: 1/25/16, 8:02 AM|