[FIX] stock_account: anglo saxon mode account switch for supplier invoice should not be triggered for service products
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user