[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
committed by Ernesto Tejeda
parent 2545a5173e
commit ebc6734c92
2 changed files with 3 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "Valued picking linked with MRP Kits",
"summary": "Allow to summarize the picking related with the selled kits",
"version": "12.0.1.0.0",
"version": "12.0.1.0.1",
"development_status": "Beta",
"category": "Warehouse Management",
"website": "https://github.com/OCA/stock-logistics-reporting",

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):