[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
This commit is contained in:
Nicolas Martinelli 2016-03-22 11:27:01 +01:00
parent ec21006d98
commit 43445db7e4
1 changed files with 3 additions and 2 deletions

View File

@ -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,