From 80ad2a370cb161b205c7fd07a97f577a07fc50b0 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Mon, 11 Sep 2017 15:40:02 +0200 Subject: [PATCH] [FIX] account_asset: deferred revenue account - Associate a product with a "Deferred Revenue Type" - Create a customer invoice and add the product => the account of the deferred revenue is used. - Create a SO with the same product, and generate the invoice => the account of the deferred revenue is NOT used. opw-769254 --- addons/account_asset/models/account_invoice.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/account_asset/models/account_invoice.py b/addons/account_asset/models/account_invoice.py index 4d6e3590037..f3726a798c0 100644 --- a/addons/account_asset/models/account_invoice.py +++ b/addons/account_asset/models/account_invoice.py @@ -107,4 +107,5 @@ class AccountInvoiceLine(models.Model): self.asset_category_id = self.product_id.product_tmpl_id.deferred_revenue_category_id.id elif invoice.type == 'in_invoice': self.asset_category_id = self.product_id.product_tmpl_id.asset_category_id.id + self.onchange_asset_category_id() super(AccountInvoiceLine, self)._set_additional_fields(invoice)