2
0

[IMP] account_asset_management: Depreciation board compute upon asset confirmation

This commit is contained in:
Quentin Groulard 2020-04-23 10:40:38 +02:00 committed by Rodrigo
parent 5117722b06
commit e53bd5b26e
2 changed files with 5 additions and 1 deletions

View File

@ -4,7 +4,7 @@
{
"name": "Assets Management",
"version": "13.0.1.0.2",
"version": "13.0.1.0.3",
"license": "AGPL-3",
"depends": ["account"],
"excludes": ["account_asset"],

View File

@ -461,6 +461,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
def remove(self):