I have a model form view. I want to make it (as a whole, not just some fields) editable only for author and admin, but not other users.
And there is a M2M field which should not be editable at all - you either create or delete it.
How can I do that?
It seems like its possible to configure access via group-based policies in security/*.csv. But what s about cases when it should be configured based on some other fields (maybe even calculated during runtime)?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- सीआरएम
- e-Commerce
- लेखांकन
- इन्वेंटरी
- PoS
- Project
- MRP
This question has been flagged
You can make a separate group for the users where you will give read, write access of your form view model and give only read, create and delete access of that M2M relational model in csv file. For your case, you can write an onchange method where you will check any field value to assign or unassign the user of a specific group and that write access rights for that group.
Thanks & Regards,
Brain Station 23 Ltd.
Mobile: (+880) 1404055226
Email: sales@brainstation-23.com
Web: https://brainstation-23.com/
Address: (Building-1) 8th Floor, 2 Bir Uttam AK Khandakar Road, Mohakhali C/A, Dhaka 1212, Bangladesh
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
Hello,
I think below application is useful to you.
https://apps.odoo.com/apps/modules/16.0/read_only_user_rights/