Skip to content
Snippets Groups Projects
Commit d985fa79 authored by Josse Colpaert's avatar Josse Colpaert
Browse files

[IMP] mrp: Put back field 'priority' to avoid migration problems

parent cc719412
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment