Merge PR #1998 into 17.0

Signed-off-by pedrobaeza
This commit is contained in:
OCA-git-bot
2025-01-08 18:44:24 +00:00

View File

@@ -494,7 +494,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)