From b21909078110d3480aaf464593f7de234013727b Mon Sep 17 00:00:00 2001 From: Tom Blauwendraat Date: Wed, 21 Feb 2024 14:52:19 +0100 Subject: [PATCH] [FIX] Improved fix for #398 --- l10n_nl_xaf_auditfile_export/models/ir_qweb.py | 3 +-- .../models/xaf_auditfile_export.py | 2 +- .../tests/test_l10n_nl_xaf_auditfile_export.py | 12 ++++++++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/l10n_nl_xaf_auditfile_export/models/ir_qweb.py b/l10n_nl_xaf_auditfile_export/models/ir_qweb.py index cfc71b387..8bc33062f 100644 --- a/l10n_nl_xaf_auditfile_export/models/ir_qweb.py +++ b/l10n_nl_xaf_auditfile_export/models/ir_qweb.py @@ -13,8 +13,7 @@ class IrQwebAuditfileStringWidget999(models.AbstractModel): @api.model def value_to_html(self, value, options): value = value[: self._max_length] if value else "" - res = super().value_to_html(value, options) - return str(res) # From markup to string + return super().value_to_html(value, options) class IrQwebAuditfileStringWidget9(models.AbstractModel): diff --git a/l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py b/l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py index 643608da0..74b536204 100644 --- a/l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py +++ b/l10n_nl_xaf_auditfile_export/models/xaf_auditfile_export.py @@ -160,7 +160,7 @@ def button_generate(self): ) # convert to string and prepend XML encoding declaration xml = ( - xml.unescape() + str(xml) .strip() .replace( "