diff --git a/addons/account_edi_ubl/models/account_edi_format.py b/addons/account_edi_ubl/models/account_edi_format.py index 00988998461..6e3182e82a8 100644 --- a/addons/account_edi_ubl/models/account_edi_format.py +++ b/addons/account_edi_ubl/models/account_edi_format.py @@ -259,10 +259,3 @@ class AccountEdiFormat(models.Model): attachment = self._export_ubl(invoice) res[invoice] = {'success': True, 'attachment': attachment} return res - - def _is_embedding_to_invoice_pdf_needed(self): - # OVERRIDE - self.ensure_one() - if self.code != 'ubl_2_1': - return super()._is_embedding_to_invoice_pdf_needed() - return False # ubl must not be embedded to PDF. diff --git a/addons/l10n_nl_edi/models/account_edi_format.py b/addons/l10n_nl_edi/models/account_edi_format.py index f041e5812d9..23d11b8329b 100644 --- a/addons/l10n_nl_edi/models/account_edi_format.py +++ b/addons/l10n_nl_edi/models/account_edi_format.py @@ -83,11 +83,9 @@ class AccountEdiFormat(models.Model): #################################################### def _check_move_configuration(self, invoice): - res = super()._check_move_configuration(invoice) + errors = super()._check_move_configuration(invoice) if self.code != 'nlcius_1': - return res - - errors = [] + return errors supplier = invoice.company_id.partner_id.commercial_partner_id if not supplier.street or not supplier.zip or not supplier.city: @@ -130,12 +128,6 @@ class AccountEdiFormat(models.Model): attachment = self._export_nlcius(invoice) return {invoice: {'success': True, 'attachment': attachment}} - def _is_embedding_to_invoice_pdf_needed(self): - self.ensure_one() - if self.code != 'nlcius_1': - return super()._is_embedding_to_invoice_pdf_needed() - return False - def _create_invoice_from_xml_tree(self, filename, tree): self.ensure_one() if self.code == 'nlcius_1' and self._is_nlcius(filename, tree):