From a9907aac8a439bfda6904de99e44eae756d9a0ba Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Thu, 8 Jan 2015 23:16:38 +0100 Subject: [PATCH] [FIX] point_of_sale: do not group move lines with different analytic account When generating account.move.line from pos.order, orders with different analytic account should not be groupped in generated lines (possible if inherit _prepare_analytic_account). Add the analytic_account_id in the key to avoid this grouping. Fixes #4602 --- addons/point_of_sale/point_of_sale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index 15e42559a8c..03c622127f1 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1083,7 +1083,7 @@ class pos_order(osv.osv): }) if data_type == 'product': - key = ('product', values['partner_id'], values['product_id'], values['debit'] > 0) + key = ('product', values['partner_id'], values['product_id'], values['analytic_account_id'], values['debit'] > 0) elif data_type == 'tax': key = ('tax', values['partner_id'], values['tax_code_id'], values['debit'] > 0) elif data_type == 'counter_part':