From 5e9a93e0517ff9f3c0e667d1a7a78fd4d259fb9b Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 14 Oct 2016 14:44:47 +0200 Subject: [PATCH] [FIX] account_asset: deferred revenue generation - Create a deferred revenue type > 3 depreciations, one every month - Create a deferred revenue with this revenue type - Odoo generates a depreciation board with 3 entries > one should be done in October, one November, one in december - Generate your deferred revenues entries UNTIL 31st of december Odoo create the 3 depreciations but they all have the 31ST of december as accounting date > the dates of these accounting entries should be the date defined on the depreciation board. opw-690970 --- addons/account_asset/account_asset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account_asset/account_asset.py b/addons/account_asset/account_asset.py index ea436c35505..82badc4ef83 100644 --- a/addons/account_asset/account_asset.py +++ b/addons/account_asset/account_asset.py @@ -372,7 +372,7 @@ class AccountAssetAsset(models.Model): @api.multi def _compute_entries(self, date, group_entries=False): - depreciation_ids = self.env['account.asset.depreciation.line'].with_context(depreciation_date=date).search([ + depreciation_ids = self.env['account.asset.depreciation.line'].search([ ('asset_id', 'in', self.ids), ('depreciation_date', '<=', date), ('move_check', '=', False)]) if group_entries: