From 94a26b9b56bac82248ed8e736a0f225fd6b995da 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 64550cb95ec..cee68cbb490 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 @@ def _has_assets(group, group_val): 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)