From 1a97ec432042de862ad920f93433397446c7ae77 Mon Sep 17 00:00:00 2001 From: david Date: Tue, 11 May 2021 11:00:08 +0200 Subject: [PATCH] [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 --- rma_sale_mrp/models/sale_order.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rma_sale_mrp/models/sale_order.py b/rma_sale_mrp/models/sale_order.py index fb464d0e..4410c0ea 100644 --- a/rma_sale_mrp/models/sale_order.py +++ b/rma_sale_mrp/models/sale_order.py @@ -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(