From 43445db7e432c46252339d2aed4f284fb7b30746 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 22 Mar 2016 11:27:01 +0100 Subject: [PATCH] [FIX] point_of_sale: fiscal position on invoice In v8.0 and saas-6, the PoS does not support the concept of fiscal position. Therefore, the invoice generated should not use it, otherwise there might be an inconsistency between the PoS order and the invoice. FORWARDPORT TO SAAS-6 ONLY! Fixes #11299 opw-671743 --- addons/point_of_sale/point_of_sale.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/point_of_sale/point_of_sale.py b/addons/point_of_sale/point_of_sale.py index f665a5b1d32..46c84849bf6 100644 --- a/addons/point_of_sale/point_of_sale.py +++ b/addons/point_of_sale/point_of_sale.py @@ -1029,6 +1029,8 @@ class pos_order(osv.osv): 'currency_id': order.pricelist_id.currency_id.id, # considering partner's sale pricelist's currency } inv.update(inv_ref.onchange_partner_id(cr, uid, [], 'out_invoice', order.partner_id.id)['value']) + # FORWARDPORT TO SAAS-6 ONLY! + inv.update({'fiscal_position': False}) if not inv.get('account_id', None): inv['account_id'] = acc inv_id = inv_ref.create(cr, uid, inv, context=context) @@ -1045,8 +1047,7 @@ class pos_order(osv.osv): inv_line.update(inv_line_ref.product_id_change(cr, uid, [], line.product_id.id, line.product_id.uom_id.id, - line.qty, partner_id = order.partner_id.id, - fposition_id=order.partner_id.property_account_position.id)['value']) + line.qty, partner_id = order.partner_id.id)['value']) if not inv_line.get('account_analytic_id', False): inv_line['account_analytic_id'] = \ self._prepare_analytic_account(cr, uid, line,