[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. X-original-commit: a4fb5c93f094dc1cd4de75664b7e232bc505e05c
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user