Skip to content
Snippets Groups Projects
Commit 651e5acd authored by Christophe Simonis's avatar Christophe Simonis
Browse files

Merge pull request #344 from odoo-dev/saas-5-fix-mrp.bom-wrong-bom_find-check-chm

[FIX] mrp.bom: wrong check for bom_find.

If the user defined a bom line type phantom to a product without bom the check is wrong to display the error message.
parents 1dc7d4d3 fabbcf50
No related branches found
No related tags found
No related merge requests found
...@@ -325,8 +325,8 @@ class mrp_bom(osv.osv): ...@@ -325,8 +325,8 @@ class mrp_bom(osv.osv):
}) })
else: else:
bom_id = self._bom_find(cr, uid, bom_line_id.product_uom.id, product_id=bom_line_id.product_id.id, properties=properties) bom_id = self._bom_find(cr, uid, bom_line_id.product_uom.id, product_id=bom_line_id.product_id.id, properties=properties)
bom2 = self.browse(cr, uid, bom_id) if bom_id:
if bom2: bom2 = self.browse(cr, uid, bom_id)
res = self._bom_explode(cr, uid, bom2, bom_line_id.product_id, factor, res = self._bom_explode(cr, uid, bom2, bom_line_id.product_id, factor,
properties=properties, level=level + 10, previous_products=all_prod, master_bom=master_bom) properties=properties, level=level + 10, previous_products=all_prod, master_bom=master_bom)
result = result + res[0] result = result + res[0]
......
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