From 31dd984bea58e9ffa0e80b6e5fca04804fdf4119 Mon Sep 17 00:00:00 2001 From: fja-odoo Date: Thu, 9 Jul 2020 15:23:51 +0000 Subject: [PATCH] [IMP] mrp: make the MO on the WO readonly Part of: https://github.com/odoo/odoo/pull/54283 task-2278147 closes odoo/odoo#54607 X-original-commit: b13e7d7bf3565242d1f99c6d9d5dfc7a8aa2929d Related: odoo/enterprise#11906 Signed-off-by: Arnold Moyaux --- addons/mrp/models/mrp_workorder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_workorder.py b/addons/mrp/models/mrp_workorder.py index 96cb3fd5d3e..ca809e3a1e9 100644 --- a/addons/mrp/models/mrp_workorder.py +++ b/addons/mrp/models/mrp_workorder.py @@ -36,7 +36,7 @@ class MrpWorkorder(models.Model): product_tracking = fields.Selection(related="product_id.tracking") product_uom_id = fields.Many2one('uom.uom', 'Unit of Measure', required=True, readonly=True) use_create_components_lots = fields.Boolean(related="production_id.picking_type_id.use_create_components_lots") - production_id = fields.Many2one('mrp.production', 'Manufacturing Order', required=True, check_company=True) + production_id = fields.Many2one('mrp.production', 'Manufacturing Order', required=True, check_company=True, readonly=True) production_availability = fields.Selection( string='Stock Availability', readonly=True, related='production_id.reservation_state', store=True,