Odoo Help

Welcome!

This community 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.

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 336 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.

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

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