[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
This commit is contained in:
Nicolas Martinelli
2017-09-12 11:06:12 +02:00
parent 280d9986fd
commit 80ad2a370c
@@ -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)