[FIX] stock_picking_report_valued_sale_mrp: error when no sale line

This commit is contained in:
david
2020-12-16 09:45:11 +01:00
parent 90d680b888
commit 99c6e4c3d7

View File

@@ -26,7 +26,8 @@ class StockMoveLine(models.Model):
def _compute_phantom_product_id(self):
"""Relate every line with its kit product"""
for line in self.filtered(
lambda x: x.sale_line.product_id._is_phantom_bom()):
lambda x: x.sale_line and
x.sale_line.product_id._is_phantom_bom()):
line.phantom_product_id = line.sale_line.product_id
def _compute_sale_order_line_fields(self):