[FIX] point_of_sale: make invoices use the fiscal position on pos.order

We have to ensure that the invoices generated through the POS always
reuse whatever fiscal position is set on the pos.order. Both in the
front- and backend a user can change the fiscal position to be different
from what is set on the customer of the order.

opw-668155
This commit is contained in:
Joren Van Onder
2016-03-24 16:12:13 +01:00
parent a2c5fe4a64
commit 5fe5618b7e
+1
View File
@@ -1132,6 +1132,7 @@ class pos_order(osv.osv):
}
invoice = inv_ref.new(cr, uid, inv)
invoice._onchange_partner_id()
invoice.fiscal_position_id = order.fiscal_position_id
inv = invoice._convert_to_write(invoice._cache)
if not inv.get('account_id', None):