mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[FIX] account_asset_management: fix asset report
The Financial Assets report generates an error message where there is an asset without depreciation table. This is ok for most assets but not for those with method_number = 0 which is the case for assets of type 'Land and Buildings'.
This commit is contained in:
@@ -499,7 +499,7 @@ class AssetReportXlsx(models.AbstractModel):
|
||||
lambda r: r.type == "depreciate"
|
||||
)
|
||||
dls_all = dls_all.sorted(key=lambda r: r.line_date)
|
||||
if not dls_all:
|
||||
if not dls_all and asset.method_number:
|
||||
error_dict["no_table"] += asset
|
||||
# period_start_value
|
||||
dls = dls_all.filtered(lambda r: r.line_date <= wiz.date_from)
|
||||
|
||||
Reference in New Issue
Block a user