Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I have removed delete access from Employee group and its working perfectly in ir.attachment form view and tree view level, but the system is still allowing the user to remove attachment from many2many field(Access warning popup is shown, but still removing the attachment).
How to prevent a normal user from deleting a many2many_binary field?
Below is the field:
attachment_ids = fields.Many2many('ir.attachment', 'message_attachment_rel_1', 'message_id', 'attachment_id', string='Attachments', help='Attachments are linked to a document ', 'through this field.', track_visibility='always')
Below is the change in permission for Employee group:
Below is the error message:
Sorry, you are not allowed to delete this document. Only users with the following access level are currently allowed to do that:
(Document model: ir.attachment)
Can you please check what are all the access rights available for it.attachment model
you will get it from Setting --> Technical --> Database structure --> model (visible only dedug mode)
after that change what are all the groups mapped to the current user.
After observing these two you will get an idea.