[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
This commit is contained in:
Simon Lejeune
2017-12-28 15:31:55 +01:00
parent 7862ce4d5d
commit 0126823f98
+1 -1
View File
@@ -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')