Skip to Content
Menu
This question has been flagged

I want to restrict creation and modification of contact titles when modifying a contact via the res.partner.form view with a self written module.


I already tried to set access_rules, but they seem to have no impact, to my understanding its because you cannot revoke access to something via a custom module?

Furthermore I created a new model to inherit res.partner.title and set access control on it, however there is still the option to edit and create Titles via Drop-Down.


It is not strictly required to solve this with access_rules, as long as there is no option to create new titles via the form view the problem would be solved.


Any tips and hints are appreciated!

Avatar
Discard
Best Answer

Hi,

In the last part of the question if you are asking about how to remove the create and edition in x2many fields, you can acheive it like this,

options="{'no_create': True, 'no_edit':True, 'no_open':True}"

See: https://www.youtube.com/watch?v=AEc2C3WZc54


Regarding the access rights, it can be added and altered from the custom modules too, in your case it might be conflicting with any existing rules.


Thanks

Avatar
Discard
Author Best Answer

Thank you, with given options everything works as expected!

Unfortunately I cannot mark your answer, comment or upvote because of my karma...

Avatar
Discard
Related Posts Replies Views Activity
2
Feb 23
676
1
May 22
1982
2
Sep 15
4244
1
Mar 15
2660
3
May 24
1025