Revert "Check the new boms with the boms we have in the cost_plan to avoid recursion."

In version 6 or higher, you dont need this commit.

This reverts commit 89ce80efd9.
This commit is contained in:
Juanjo Garcia 2021-05-31 11:37:22 +02:00
parent 89ce80efd9
commit cc9963c0dd
1 changed files with 0 additions and 5 deletions

View File

@ -163,16 +163,11 @@ class Plan(ModelSQL, ModelView):
return boms
products = set(self.find_boms())
new_boms = set()
for index, (product_id, _) in enumerate(products):
new_boms.add(product_id)
boms['add'].append((index, {
'product': product_id,
'bom': None,
}))
if {x.product.id for x in self.boms if x.product} == new_boms:
return {}
return boms
def get_products_tree(self, name):