diff options
| author | qdp-odoo <qdp@odoo.com> | 2015-10-09 10:10:03 +0200 |
|---|---|---|
| committer | qdp-odoo <qdp@odoo.com> | 2015-10-09 10:46:55 +0200 |
| commit | 05868b5de693e34122e9fa74c1f52802dd7aa6d9 (patch) | |
| tree | 31564f98dcea73f7a06eb751bb5b7a6d1994eb5d | |
| parent | 59867e55df7bb0bdbae8835164949ae439b93cde (diff) | |
[FIX] stock_account: anglo saxon mode account switch for supplier invoice should not be triggered for service products
| -rw-r--r-- | addons/stock_account/stock_account.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock_account/stock_account.py b/addons/stock_account/stock_account.py index a455d8ada33..8cd9de63791 100644 --- a/addons/stock_account/stock_account.py +++ b/addons/stock_account/stock_account.py @@ -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'] |
