[FIX] mrp: settings user unable to save settings
Settings user is not able to access Bill of Material (mrp.bom) records unless they have additional groups (account, inventory, manufacturing, ...) This commit makes sure the operation is done in sudo so that any setting user is able to save the settings. Part-of: odoo/odoo#91909
This commit is contained in:
@@ -27,7 +27,7 @@ class ResConfigSettings(models.TransientModel):
|
||||
super().set_values()
|
||||
if not self.group_mrp_workorder_dependencies:
|
||||
# Disabling this option should not interfere with currently planned productions
|
||||
self.env['mrp.bom'].search([('allow_operation_dependencies', '=', True)]).allow_operation_dependencies = False
|
||||
self.env['mrp.bom'].sudo().search([('allow_operation_dependencies', '=', True)]).allow_operation_dependencies = False
|
||||
|
||||
@api.onchange('use_manufacturing_lead')
|
||||
def _onchange_use_manufacturing_lead(self):
|
||||
|
||||
Reference in New Issue
Block a user