Improve the factur-x export in two ways: make the exported PDF PDF/A-3B compliant, and add the factur-x XMP metadata inside the file. The added .ICC profile comes from https://www.color.org/srgbprofiles.xalter License terms can be found here: https://www.color.org/profiles2.xalter#license Task id # 2668919 closes odoo/odoo#80741 X-original-commit: 3a9a685fc360fee7fe10ed7fdb768414697673b2 Signed-off-by: Laurent Smet <las@odoo.com>
19 lines
679 B
Python
19 lines
679 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from odoo import models
|
|
|
|
|
|
class MailTemplate(models.Model):
|
|
_inherit = "mail.template"
|
|
|
|
def _get_edi_attachments(self, document):
|
|
"""
|
|
Will return the information about the attachment of the edi document for adding the attachment in the mail.
|
|
Can be overridden where e.g. a zip-file needs to be sent with the individual files instead of the entire zip
|
|
:param document: an edi document
|
|
:return: list with a tuple with the name and base64 content of the attachment
|
|
"""
|
|
if document.edi_format_id.code == 'fattura_pa':
|
|
return []
|
|
return super()._get_edi_attachments(document)
|