mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[12.0] [IMP] Depreciation board compute upon asset confirmation
This commit is contained in:
@@ -410,6 +410,10 @@ class AccountAsset(models.Model):
|
||||
asset.state = 'close'
|
||||
else:
|
||||
asset.state = 'open'
|
||||
if not asset.depreciation_line_ids.filtered(
|
||||
lambda l: l.type != 'create'
|
||||
):
|
||||
asset.compute_depreciation_board()
|
||||
return True
|
||||
|
||||
@api.multi
|
||||
|
||||
Reference in New Issue
Block a user