[FIX] stock_account: Anglo Saxon Accounting and Vendor Bills

In 9.0 and 10.0 if anglosaxon accounting is active, creating a vendor
bill should generate the following entry :

Debit:Stock Input
Credit:Payable

But due to this fix: e9d6dcf16f

Debit:Expense
Credit:Payable

This reverts commit e9d6dcf16f to keep the same behavior in 11.0.

opw:777837
This commit is contained in:
Goffin Simon
2017-10-24 10:09:45 +02:00
parent cd5f61df6d
commit 6babbbbbc8
@@ -99,6 +99,6 @@ class AccountInvoiceLine(models.Model):
def get_invoice_line_account(self, type, product, fpos, company):
if company.anglo_saxon_accounting and type in ('in_invoice', 'in_refund') and product and product.type == 'product':
accounts = product.product_tmpl_id.get_product_accounts(fiscal_pos=fpos)
if product.categ_id.property_valuation != 'manual_periodic' and accounts['stock_input']:
if accounts['stock_input']:
return accounts['stock_input']
return super(AccountInvoiceLine, self).get_invoice_line_account(type, product, fpos, company)