diff --git a/l10n_br_mdfe/models/document.py b/l10n_br_mdfe/models/document.py index 56655f95da77..2647020c91c2 100644 --- a/l10n_br_mdfe/models/document.py +++ b/l10n_br_mdfe/models/document.py @@ -834,9 +834,9 @@ def _serialize(self, edocs): edocs.append(mdfe) return edocs - def _processador(self): + def _edoc_processor(self): if self.document_type != MODELO_FISCAL_MDFE: - return super()._processador() + return super()._edoc_processor() certificado = self.company_id._get_br_ecertificate() @@ -877,7 +877,7 @@ def _document_export(self, pretty_print=True): result = super()._document_export() for record in self.filtered(filtered_processador_edoc_mdfe): edoc = record.serialize()[0] - processador = record._processador() + processador = record._edoc_processor() xml_file = processador.render_edoc_xsdata(edoc, pretty_print=pretty_print)[ 0 ] diff --git a/l10n_br_mdfe/tests/test_mdfe_document.py b/l10n_br_mdfe/tests/test_mdfe_document.py index 417bb73052f7..0cdcd6e7de15 100644 --- a/l10n_br_mdfe/tests/test_mdfe_document.py +++ b/l10n_br_mdfe/tests/test_mdfe_document.py @@ -62,22 +62,22 @@ def test_mdfe_inverse_fields(self): ) def test_mdfe_processor(self): - processor = self.mdfe_id._processador() + processor = self.mdfe_id._edoc_processor() self.assertTrue(isinstance(processor, MDFeAdapter)) self.mdfe_id.document_type_id = False - processor = self.mdfe_id._processador() + processor = self.mdfe_id._edoc_processor() self.assertFalse(isinstance(processor, MDFeAdapter)) self.mdfe_id.document_type_id = self.mdfe_document_type_id self.mdfe_id.company_id.certificate_nfe_id = False - processor = self.mdfe_id._processador() + processor = self.mdfe_id._edoc_processor() self.assertTrue(isinstance(processor, MDFeAdapter)) self.mdfe_id.company_id.certificate_ecnpj_id = False with self.assertRaises(UserError): - processor = self.mdfe_id._processador() + processor = self.mdfe_id._edoc_processor() def test_generate_key(self): self.mdfe_id._generate_key()