From de160c539681bff4b64931bf30a41e00ce9aa2a2 Mon Sep 17 00:00:00 2001 From: Roman Widmann Date: Thu, 1 Mar 2018 10:48:15 +0100 Subject: [PATCH] Feedback 1436: Feedback - Dokumentenvorlagen, Gesamtgewicht in der sale.order richtig berechnen. --- ext/custom-addons/dp_custom/models/sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/custom-addons/dp_custom/models/sale.py b/ext/custom-addons/dp_custom/models/sale.py index e486d2ca..45e145dd 100644 --- a/ext/custom-addons/dp_custom/models/sale.py +++ b/ext/custom-addons/dp_custom/models/sale.py @@ -56,7 +56,7 @@ class SaleOrder(models.Model): for record in self: sum = 0 for line in record.order_line: - sum += line.product_id.weight * line.product_uom_qty + sum += (line.lot_id.weight or line.product_id.weight) * line.product_uom_qty record.weight_total = sum @api.multi