[FIX] stock_account: use fiscal position to map account

Closes #8813
This commit is contained in:
Daniel Dico
2015-10-06 13:44:03 +02:00
committed by Nicolas Martinelli
parent 595a33a2b1
commit ae69f2849b
+2 -1
View File
@@ -74,7 +74,8 @@ class account_invoice(osv.osv):
# debit account dacc will be the output account
dacc = accounts['stock_output'].id
# credit account cacc will be the expense account
cacc = accounts['expense'].id
fpos = i_line.invoice_id.fiscal_position_id
cacc = fpos.map_account(accounts['expense']).id
if dacc and cacc:
price_unit = i_line._get_anglo_saxon_price_unit()
return [