From d985fa796e388f6f0a8b91f20883ed4781cf062f Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Thu, 25 Aug 2016 15:05:10 +0200 Subject: [PATCH] [IMP] mrp: Put back field 'priority' to avoid migration problems --- addons/mrp/models/mrp_production.py | 2 ++ addons/mrp/models/procurement.py | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index 84de39aa85f..503be6e2ac9 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -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') diff --git a/addons/mrp/models/procurement.py b/addons/mrp/models/procurement.py index a1f25ce0b07..1cfb047d856 100644 --- a/addons/mrp/models/procurement.py +++ b/addons/mrp/models/procurement.py @@ -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 %s created.") % (production.name)) else: res[procurement.id] = False