Skip to content

Commit

Permalink
check avoid recursion
Browse files Browse the repository at this point in the history
  • Loading branch information
mboscolo committed Nov 2, 2023
1 parent 71fde88 commit 9b86cf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion plm/models/product_product.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,8 @@ def getParentBom(self, filterBomType='normal'):
mrp_bom_line_ids = self.env['mrp.bom.line'].search(bom_line_filter,
limit=1)
for mrp_bom_line_id in mrp_bom_line_ids:
return mrp_bom_line_id.bom_id
if product_product_id.id!=mrp_bom_line_id.bom_id.product_tmpl_id.product_variant_id.id:
return mrp_bom_line_id.bom_id
return self.env['mrp.bom']

def _packvalues(self, fmt, label=False, value=False):
Expand Down

0 comments on commit 9b86cf8

Please sign in to comment.