[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:
@@ -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')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user