[IMP] mrp: Put back field 'priority' to avoid migration problems
This commit is contained in:
@@ -149,6 +149,8 @@ class MrpProduction(models.Model):
|
||||
has_moves = fields.Boolean(compute='_has_moves')
|
||||
scrap_ids = fields.One2many('stock.scrap', 'production_id', 'Scraps')
|
||||
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')
|
||||
|
||||
@api.multi
|
||||
@api.depends('workorder_ids')
|
||||
|
||||
@@ -84,7 +84,6 @@ class ProcurementOrder(models.Model):
|
||||
# create the MO as SUPERUSER because the current user may not have the rights to do it (mto product launched by a sale for example)
|
||||
production = ProductionSudo.create(procurement._prepare_mo_vals(bom))
|
||||
res[procurement.id] = production.id
|
||||
|
||||
procurement.message_post(body=_("Manufacturing Order <em>%s</em> created.") % (production.name))
|
||||
else:
|
||||
res[procurement.id] = False
|
||||
|
||||
Reference in New Issue
Block a user