[IMP] account_asset_management: Depreciation board compute upon asset confirmation
This commit is contained in:
parent
5117722b06
commit
e53bd5b26e
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Assets Management",
|
"name": "Assets Management",
|
||||||
"version": "13.0.1.0.2",
|
"version": "13.0.1.0.3",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
"depends": ["account"],
|
"depends": ["account"],
|
||||||
"excludes": ["account_asset"],
|
"excludes": ["account_asset"],
|
||||||
|
@ -461,6 +461,10 @@ class AccountAsset(models.Model):
|
|||||||
asset.state = "close"
|
asset.state = "close"
|
||||||
else:
|
else:
|
||||||
asset.state = "open"
|
asset.state = "open"
|
||||||
|
if not asset.depreciation_line_ids.filtered(
|
||||||
|
lambda l: l.type != "create"
|
||||||
|
):
|
||||||
|
asset.compute_depreciation_board()
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def remove(self):
|
def remove(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user