Odoo Help

1

What is the easiest way a module can override a base field to add a Group restriction to the base field?

By
Mohammed Razem
on 6/7/15, 1:32 PM 500 views

Hi,

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: 

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?


Thanks.

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

Question tools

1 follower(s)

Stats

Asked: 6/7/15, 1:32 PM
Seen: 500 times
Last updated: 1/25/16, 8:02 AM