How can I configure Odoo 18.0 Enterprise model so that certain user groups have read-only access to records, while still permitting all users to post comments?
R3cord rules are blocking comments also
Kindly advise
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
How can I configure Odoo 18.0 Enterprise model so that certain user groups have read-only access to records, while still permitting all users to post comments?
R3cord rules are blocking comments also
Kindly advise
Hi,
To grant read-only access to records while allowing all users to post comments in Odoo 18.0 Enterprise, create a record rule that restricts write access for specific user groups on the desired model. Then, create a custom Odoo module and inherit the same model in a Python file. Override the message_post method, adding self.with_context(mail_create_nolog=True) before calling the super method.
This bypasses access rights checks specifically for creating comments, allowing users with read-only access to still post comments. Ensure your custom module depends on the mail module and thoroughly test the configuration to confirm that users can only access records as intended and can post comments.
Hope it helps
Key Point: Even with read-only access on the main model, users need Create permission on mail.message to post comments in the chatter.
I hope this information helps you
Thanks & Regards,
Kunjan Patel
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.