[FIX] mrp: Kit in manufacturing
Steps to reproduce the bug: - Create a MO with a product with a normal bom B - Save the MO - Change the type of B to phantom - Try to produce the MO Bug: It was impossible to cancel or confirm the MO. It's not allowed to produce a MO with phantom bom. opw:2061958 closes odoo/odoo#36329 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
This commit is contained in:
@@ -4133,6 +4133,12 @@ msgstr ""
|
||||
msgid "You cannot delete an unbuild order if the state is 'Done'."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
#: code:addons/mrp/models/mrp_production.py:533
|
||||
#, python-format
|
||||
msgid "You cannot produce a MO with a bom kit product."
|
||||
msgstr ""
|
||||
|
||||
#. module: mrp
|
||||
#: code:addons/mrp/wizard/mrp_product_produce.py:82
|
||||
#, python-format
|
||||
|
||||
@@ -529,6 +529,8 @@ class MrpProduction(models.Model):
|
||||
@api.multi
|
||||
def open_produce_product(self):
|
||||
self.ensure_one()
|
||||
if self.bom_id.type == 'phantom':
|
||||
raise UserError(_('You cannot produce a MO with a bom kit product.'))
|
||||
action = self.env.ref('mrp.act_mrp_product_produce').read()[0]
|
||||
return action
|
||||
|
||||
|
||||
Reference in New Issue
Block a user