From c08e82a98a93cdcd8c7b163f437873c2ed4cb4df Mon Sep 17 00:00:00 2001 From: Luc De Meyer Date: Sat, 21 Dec 2024 17:01:59 +0100 Subject: [PATCH] [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'. --- account_asset_management/report/account_asset_report_xls.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_asset_management/report/account_asset_report_xls.py b/account_asset_management/report/account_asset_report_xls.py index 64550cb95..cee68cbb4 100644 --- a/account_asset_management/report/account_asset_report_xls.py +++ b/account_asset_management/report/account_asset_report_xls.py @@ -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)