Skip to Content
Menu
This question has been flagged
1 Reply
2436 Views

Hi,

I need to update and add departure reasons.

I use the developper mode to find the field "departure reason", when i try to add a reason. I have this message.

"The properties of the database fields cannot be modified this way! Please change them via Python code, preferably via a custom module!"

I try to modify this 2 files : hr_employee.py and hr_departure_wizard.py

How can i add a new departure reason?

Avatar
Discard
Best Answer

Hi, 

As the error messages says, there is no option for user to change the fields properties from the user interface, suppose if you need to make a existing field is as required, you cannot go the fields menu and tick the required Boolean as True(even though you can achieve it by adding required="1" in the view). To Alter existing fields properties you have to do it from the code, by a custom module or directly editing the source code which is not recommended. So extend the corresponding model and add necessary changes from code.

See this: How To Inherit And Add Field to Existing Views In Odoo

 Thanks

Avatar
Discard
Related Posts Replies Views Activity
1
Oct 24
279
2
Jul 24
471
1
Oct 23
1604
0
May 23
1038
9
Dec 23
31745