summaryrefslogtreecommitdiff
path: root/addons/l10n_it_edi
diff options
context:
space:
mode:
authorJosse Colpaert <jco@odoo.com>2021-03-08 15:10:10 +0000
committerJosse Colpaert <jco@odoo.com>2021-03-11 22:11:03 +0000
commita4fb5c93f094dc1cd4de75664b7e232bc505e05c (patch)
tree00b4768fb55924cbc70ffcc0b229cd4aafec1ab0 /addons/l10n_it_edi
parentfd36a69a6ed1484d6b7570dae3ff63d3f12ad035 (diff)
[REF] l10n_it_edi: allow to pass extra values to render the template
We need this refactor for the ddt module to be able to pass the necessary information easily for the link between the invoice lines and the ddts.
Diffstat (limited to 'addons/l10n_it_edi')
-rw-r--r--addons/l10n_it_edi/models/account_invoice.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/l10n_it_edi/models/account_invoice.py b/addons/l10n_it_edi/models/account_invoice.py
index da3098852ab..a88e5d1badd 100644
--- a/addons/l10n_it_edi/models/account_invoice.py
+++ b/addons/l10n_it_edi/models/account_invoice.py
@@ -154,7 +154,7 @@ class AccountMove(models.Model):
)
return {'attachment': attachment}
- def _export_as_xml(self):
+ def _prepare_fatturapa_export_values(self):
''' Create the xml file content.
:return: The XML content as str.
'''
@@ -249,6 +249,10 @@ class AccountMove(models.Model):
'pdf_name': pdf_name,
'tax_map': tax_map,
}
+ return template_values
+
+ def _export_as_xml(self):
+ template_values = self._prepare_fatturapa_export_values()
content = self.env.ref('l10n_it_edi.account_invoice_it_FatturaPA_export')._render(template_values)
return content