Skip to content
Snippets Groups Projects
Commit cf45800d authored by Touati Djamel (otd)'s avatar Touati Djamel (otd) Committed by Víctor Martínez
Browse files

[FIX] mrp: add read access on BOM to the purchase users


Steps to reproduce the bug:
- Install mrp and purchase
- Create a new user “U1” > give him only the “purchase” user access
- Log in as “U1”
- Go to purchase app > create a new PO
- Try to select any product

Problem:
A user error is triggered because we check if the product has a BOM
but since the user does not have access to MRP, an error is raised

opw-2885982

closes odoo/odoo#94183

closes odoo/odoo#121371

Signed-off-by: default avatarAdrien Widart <awt@odoo.com>
Signed-off-by: default avatarWilliam Henrotin (whe) <whe@odoo.com>
parent b061cf71
No related branches found
No related tags found
No related merge requests found
......@@ -15,7 +15,8 @@ from purchase order.
""",
'data': [
'views/purchase_order_views.xml',
'views/mrp_production_views.xml'
'views/mrp_production_views.xml',
'security/ir.model.access.csv',
],
'depends': ['mrp', 'purchase_stock'],
'installable': True,
......
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_mrp_bom_purchase_user,mrp.bom,mrp.model_mrp_bom,purchase.group_purchase_user,1,0,0,0
access_mrp_bom_line_purchase_user,mrp.bom.line,mrp.model_mrp_bom_line,purchase.group_purchase_user,1,0,0,0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment