From 35cd054cc835dc2d6beac72bd182b3d455b79525 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 1 Aug 2016 13:15:30 +0200 Subject: [PATCH] [FIX] point_of_sale: total revenue in report In some cases, the "Sales total(Revenue)" of the report is different from the sum of the payments. To reproduce: - create a product with a sale price of 1.00 - sell 3 times a quantity of 0.333 of this product - the "Sales total(Revenue)" will be equal to 1.00, while the total of payments is 0.99. This is because in the report, we first sum all order lines, then we perform a global rounding. The solution is to use the total amount calculated for each order, which is rounded at the appropriate time. opw-682782 --- addons/point_of_sale/report/pos_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/report/pos_details.py b/addons/point_of_sale/report/pos_details.py index cd8798e75d3..3b85eeb7660 100644 --- a/addons/point_of_sale/report/pos_details.py +++ b/addons/point_of_sale/report/pos_details.py @@ -68,9 +68,9 @@ class pos_details(report_sxw.rml_parse): 'uom': pol.product_id.uom_id.name } data.append(result) - self.total += result['total'] self.qty += result['qty'] self.discount += result['discount'] + self.total += pos.amount_total if data: return data else: