[FIX] stock_picking_report_valued: Fix crash when you merge one picking with sale line an other without it.

TT37674
This commit is contained in:
sergio-teruel
2022-06-22 10:00:43 +02:00
parent 374cc65da5
commit 4ed41adfd6

View File

@@ -55,7 +55,7 @@ class StockMoveLine(models.Model):
quantity = line._get_report_valued_quantity()
valued_line = line.sale_line
# If order line quantity don't match with move line quantity compute values
if float_compare(
if valued_line and float_compare(
quantity,
line.sale_line.product_uom_qty,
precision_rounding=line.product_uom_id.rounding,