[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
This commit is contained in:
Nicolas Martinelli
2016-10-14 14:44:47 +02:00
parent a7b976c704
commit 5e9a93e051
+1 -1
View File
@@ -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: