From 57972b87544be5f54f81207c86d75eadae9c3bb1 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 26 Aug 2016 14:37:55 +0200 Subject: [PATCH] [FIX] point_of_sale: group pos entries by tax Forward-port of dc975f3b0b1baa5d78ef0e898157383529472ef7 which have been forgotten during previous commit --- addons/point_of_sale/models/pos_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index 094db43c3dc..a8b466f1acb 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -223,7 +223,7 @@ class PosOrder(models.Model): }) if data_type == 'product': - key = ('product', values['partner_id'], (values['product_id'], values['name']), values['analytic_account_id'], values['debit'] > 0) + key = ('product', values['partner_id'], (values['product_id'], tuple(values['tax_ids'][0][2]), values['name']), values['analytic_account_id'], values['debit'] > 0) elif data_type == 'tax': key = ('tax', values['partner_id'], values['tax_line_id'], values['debit'] > 0) elif data_type == 'counter_part': @@ -287,7 +287,7 @@ class PosOrder(models.Model): 'analytic_account_id': self._prepare_analytic_account(line), 'credit': ((amount > 0) and amount) or 0.0, 'debit': ((amount < 0) and -amount) or 0.0, - 'tax_ids': [(6, 0, line.tax_ids.ids)], + 'tax_ids': [(6, 0, line.tax_ids_after_fiscal_position.ids)], 'partner_id': partner_id })