From 0126823f986d163b4a1ecbca75549fdc7367a054 Mon Sep 17 00:00:00 2001 From: Simon Lejeune Date: Thu, 28 Dec 2017 11:50:26 +0100 Subject: [PATCH] [FIX] mrp: don't copy locked state When copying a done MO that is unlocked, the new MO is also unlocked and the buttons to produce/check availability aren't displayed and it is confusing to the user. Fixes #20119 --- addons/mrp/models/mrp_production.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 3b66e1def7c..14a288f5f94 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -161,7 +161,7 @@ class MrpProduction(models.Model): scrap_count = fields.Integer(compute='_compute_scrap_move_count', string='Scrap Move') priority = fields.Selection([('0', 'Not urgent'), ('1', 'Normal'), ('2', 'Urgent'), ('3', 'Very Urgent')], 'Priority', readonly=True, states={'confirmed': [('readonly', False)]}, default='1') - is_locked = fields.Boolean('Is Locked', default=True) + is_locked = fields.Boolean('Is Locked', default=True, copy=False) show_final_lots = fields.Boolean('Show Final Lots', compute='_compute_show_lots') production_location_id = fields.Many2one('stock.location', "Production Location", related='product_id.property_stock_production')