From 28027cbeec5127d0dbc7570c85a331739d5dc361 Mon Sep 17 00:00:00 2001 From: matteoopenf Date: Tue, 21 May 2024 11:13:45 +0200 Subject: [PATCH] [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE [FIX][l10n_it_vat_statement_communication] fix encoding file and remove zero value from xml in according the specification of ADE --- .../models/comunicazione_liquidazione.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/l10n_it_vat_statement_communication/models/comunicazione_liquidazione.py b/l10n_it_vat_statement_communication/models/comunicazione_liquidazione.py index a9253509822b..2cb73c25cf2d 100644 --- a/l10n_it_vat_statement_communication/models/comunicazione_liquidazione.py +++ b/l10n_it_vat_statement_communication/models/comunicazione_liquidazione.py @@ -139,7 +139,11 @@ def get_export_xml(self): x1_Fornitura.append(x1_2_Comunicazione) xml_string = etree.tostring( - x1_Fornitura, encoding="utf8", method="xml", pretty_print=True + x1_Fornitura, + encoding="utf8", + method="xml", + pretty_print=True, + xml_declaration=True, ) return xml_string @@ -411,6 +415,7 @@ def _export_xml_get_dati_modulo(self, quadro): DebitoPrecedente.text = "{:.2f}".format( quadro.debito_periodo_precedente ).replace(".", ",") + # 1.2.2.1.12 CreditoPeriodoPrecedente CreditoPeriodoPrecedente = etree.SubElement( xModulo, etree.QName(NS_IV, "CreditoPeriodoPrecedente") @@ -446,6 +451,7 @@ def _export_xml_get_dati_modulo(self, quadro): if quadro.metodo_calcolo_acconto: Metodo = etree.SubElement(xModulo, etree.QName(NS_IV, "Metodo")) Metodo.text = quadro.metodo_calcolo_acconto + Acconto = etree.SubElement(xModulo, etree.QName(NS_IV, "Acconto")) Acconto.text = "{:.2f}".format(quadro.accounto_dovuto).replace(".", ",") # 1.2.2.1.18 ImportoDaVersare