From 64ead8b0052b05e6c69bcf3acd52cb2d76ca8a73 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 12 Feb 2014 13:14:08 +0100 Subject: [PATCH] [FIX] point_of_sale: sales summary report displays actual amount of taxes, instead of displaying the amount where the taxe is applied bzr revid: dle@openerp.com-20140212121408-4tv8ca1ukqempx1k --- addons/point_of_sale/report/pos_details_summary.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/point_of_sale/report/pos_details_summary.py b/addons/point_of_sale/report/pos_details_summary.py index a4facaabcac..d6600926bd6 100644 --- a/addons/point_of_sale/report/pos_details_summary.py +++ b/addons/point_of_sale/report/pos_details_summary.py @@ -99,13 +99,10 @@ class pos_details_summary(report_sxw.rml_parse): def _get_tax_amount(self, objects): res = {} - list_ids = [] for order in objects: for line in order.lines: - if len(line.product_id.taxes_id): - tax = line.product_id.taxes_id[0] - res[tax.name] = (line.price_unit * line.qty * (1-(line.discount or 0.0) / 100.0)) + (tax.id in list_ids and res[tax.name] or 0) - list_ids.append(tax.id) + for tax in line.product_id.taxes_id: + res[tax.name] = res.setdefault(tax.name, 0.0) + (line.price_subtotal_incl - line.price_subtotal) return res def _get_sales_total(self, objects):