Odoo 11
Hi hopefully someone can help me to better understand Record Rules in Odoo 11.
I installed the Manufacturing, Inventory, Purchase, Invoice and Quality modules.
For the Manufacturing module I created one users called FilmUser to better control access. To avoid problems I duplicated the Manufacturing/User group to create Manufacturing/FilmOps for FilmUser
So far the only change I have made in this new group is of course the users that belongs to the group and added Record Rules. I'm intending to use the Record Rules to filter the Manufacturing Orders the FilmUser can see and process
This is the Record Rule I'm using
Access Right Apply for: (Read, Write, Create, Delete)
Domain Filter ['&', ('routing_id', 'ilike', 'Sub-Film%'), ('state', '!=', 'confirmed')]
This works as I expected to filter the Manufacturing Orders the user can see. As it only sees the MOs with a routing Sub-Film which are in a State other than Confirmed. But it fails When I try to MARK AS DONE the MO, When I try I receive the following error:
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: mrp.production, Operation: read)
If I remove this Rules then I can MARK AS DONE the MO but of course then I can see all MOs with any Routing which are in all states including Confirmed.
Any Clues or Suggestions to make this work?
Thank you in Advanced
refer this link https://www.odoo.com/documentation/11.0/reference/security.html#record-rules
Groups and access rights in odoo: http://learnopenerp.blogspot.com/2018/01/groups-and-access-rights-in-odoo.html
Hi,
Thank you everyone for your help, To test I changed the rule as this: [('routing_id', 'ilike', 'Sub-Film%')] but I still receive the error???
Now I can see MOs with any status and only those that have Sub-Film as routing
Here I don't understand why I still receive the error?