-
-
Notifications
You must be signed in to change notification settings - Fork 410
OLD 7.0 2015 04 07
Xavier Brochard edited this page Oct 29, 2021
·
1 revision
Conflict:
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@@ -263,11 -263,11 +263,19 @@@ class mrp_bom(osv.osv)
for bom in boms:
if bom.product_id.id in all_prod:
return False
++<<<<<<< HEAD
+ lines = bom.bom_lines
+ if lines:
+ res = res and check_bom([bom_id for bom_id in lines if bom_id not in boms], all_prod + [bom.product_id.id])
+ return res
+ return check_bom(boms, [])
++=======
+ if bom.bom_lines:
+ res = res and check_bom([b for b in bom.bom_lines if b not in boms], all_prod + [bom.product_id.id])
+ return res
+ return check_bom(boms, [])
+
++>>>>>>> odoo/7.0
_constraints = [
(_check_recursion, 'Error ! You cannot create recursive BoM.', ['parent_id']),
Resolved as:
--- a/addons/mrp/mrp.py
+++ b/addons/mrp/mrp.py
@@ -263,9 +263,8 @@ class mrp_bom(osv.osv):
for bom in boms:
if bom.product_id.id in all_prod:
return False
- lines = bom.bom_lines
- if lines:
- res = res and check_bom([bom_id for bom_id in lines if bom_id not in boms], all_prod + [bom.product_id.id])
+ if bom.bom_lines:
+ res = res and check_bom([b for b in bom.bom_lines if b not in boms], all_prod + [bom.product_id.id])
return res
return check_bom(boms, [])
This is an equivalent fix for https://bugs.launchpad.net/ocb-addons/+bug/1155569. Reverting https://github.com/OCA/OCB/commit/3ec0353d in favour of https://github.com/odoo/odoo/commit/49e7e67a27b3d393a8234bc2c466b0c642ce157b
Committed as https://github.com/OCA/OCB/commit/44a0c760633686591aa40e82843a8533ded301cf by @StefanRijnhart
Website | Online Demo | Community | Documentation | Help