From e7ca2ca3daecedccd0e7bcc608665311ef59d7d5 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 25 Feb 2016 14:08:24 +0100 Subject: [PATCH] [FIX] purchase: delivery quantities with BOMs, expected singleton `self` is the variable with all the purchase order lines, `line` is the variable with the current line in the loop iteration. This is expected to get the line quantity. Having written `self` instead of `line` is an oversight of the revision 0923d1609ded4121f09a4a7ff9a9bba41dc2afb9 opw-670502 --- addons/purchase/purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/purchase/purchase.py b/addons/purchase/purchase.py index be5a5edecda..0189f0bc16e 100644 --- a/addons/purchase/purchase.py +++ b/addons/purchase/purchase.py @@ -457,7 +457,7 @@ class PurchaseOrderLine(models.Model): continue bom_delivered = self.sudo()._get_bom_delivered(line.sudo()) if bom_delivered and any(bom_delivered.values()): - total = self.product_qty + total = line.product_qty elif bom_delivered: total = 0.0 else: