mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] account_asset_management: Depreciation board compute upon asset confirmation
This commit is contained in:
@@ -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"],
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user