[FIX] stock_account: anglo saxon mode account switch for supplier invoice should not be triggered for service products

This commit is contained in:
qdp-odoo
2015-10-09 10:46:55 +02:00
parent 59867e55df
commit 05868b5de6
+1 -1
View File
@@ -40,7 +40,7 @@ class account_invoice_line(osv.osv):
return round(price, inv.currency_id.decimal_places)
def get_invoice_line_account(self, type, product, fpos, company):
if company.anglo_saxon_accounting and type in ('in_invoice', 'in_refund'):
if company.anglo_saxon_accounting and type in ('in_invoice', 'in_refund') and product and product.type in ('consu', 'product'):
accounts = product.product_tmpl_id.get_product_accounts(fiscal_pos=fpos)
if type == 'in_invoice':
return accounts['stock_input']