Skip to content

Commit

Permalink
[FIX] sale_stock_ux: eval if product exist before search boms (ingadh…
Browse files Browse the repository at this point in the history
  • Loading branch information
nicomacr authored and jjscarafia committed Nov 2, 2019
1 parent b022746 commit fd3a53e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sale_stock_ux/models/sale_order_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def _compute_qty_delivered(self):
super()._compute_qty_delivered()
bom_enable = 'bom_ids' in self.env['product.template']._fields
if bom_enable:
for line in self.filtered(lambda l: self.env['mrp.bom']._bom_find(
for line in self.filtered(lambda l: l.product_id and self.env['mrp.bom']._bom_find(
product=l.product_id).type == 'phantom'):
line.qty_delivered = line.compute_qty_with_bom_phantom()

Expand Down

0 comments on commit fd3a53e

Please sign in to comment.