2
0

[14.0][FIX] account_asset_management, error on remove for asset no depre

This commit is contained in:
Kitti U 2021-09-07 16:47:37 +07:00 committed by Rodrigo
parent dc5197eaa0
commit 542e0eae58

View File

@ -252,6 +252,8 @@ class AccountAssetRemove(models.TransientModel):
if not dlines:
asset.compute_depreciation_board()
dlines = _dlines(asset)
if not dlines:
return asset.value_residual
first_to_depreciate_dl = dlines[0]
first_date = first_to_depreciate_dl.line_date