[14.0][FIX] account_asset_management, error on remove for asset no depre
This commit is contained in:
parent
dc5197eaa0
commit
542e0eae58
@ -252,6 +252,8 @@ class AccountAssetRemove(models.TransientModel):
|
|||||||
if not dlines:
|
if not dlines:
|
||||||
asset.compute_depreciation_board()
|
asset.compute_depreciation_board()
|
||||||
dlines = _dlines(asset)
|
dlines = _dlines(asset)
|
||||||
|
if not dlines:
|
||||||
|
return asset.value_residual
|
||||||
first_to_depreciate_dl = dlines[0]
|
first_to_depreciate_dl = dlines[0]
|
||||||
|
|
||||||
first_date = first_to_depreciate_dl.line_date
|
first_date = first_to_depreciate_dl.line_date
|
||||||
|
Loading…
Reference in New Issue
Block a user