[FIX] rma_sale_mrp: kit line with no uom qty

If a user corrects the original sale order and lowers a kit line quantity
to 0, we don't want to compute anything on it.

TT29669
This commit is contained in:
david
2021-05-11 11:00:08 +02:00
parent 36132bccaf
commit 1a97ec4320

View File

@@ -101,7 +101,10 @@ class SaleOrderLine(models.Model):
rely on the matching of sale order and pickings demands, but if those
were manually changed, it could lead to inconsistencies"""
self.ensure_one()
if self.product_id and not self.product_id._is_phantom_bom():
if (
self.product_id and not self.product_id._is_phantom_bom() or
not self.product_uom_qty
):
return 0
component_demand = sum(
self.move_ids.filtered(