[FIX] account_asset: posted depreciation line

When the account move line linked to a depreciation line is deleted, the
depreciation is still considered as 'Posted'.

opw-691084
Fixes #13801
This commit is contained in:
Nicolas Martinelli
2016-10-20 12:38:05 +02:00
parent ebf3b3d7a8
commit 65878a5b85
+1 -1
View File
@@ -398,7 +398,7 @@ class AccountAssetDepreciationLine(models.Model):
move_check = fields.Boolean(compute='_get_move_check', string='Posted', track_visibility='always', store=True)
@api.one
@api.depends('move_id')
@api.depends('move_id', 'asset_id.account_move_ids')
def _get_move_check(self):
self.move_check = bool(self.move_id)