Skip to content

Commit

Permalink
[WIP] XML Generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ODBreno committed Aug 25, 2023
1 parent 98d5d69 commit 0fe8f35
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 21 deletions.
20 changes: 0 additions & 20 deletions l10n_br_cte/models/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -526,26 +526,6 @@ def _processador(self):
self.company_id.state_id.ibge_code,
)

# def _document_export(self, pretty_print=True):
# result = super()._document_export()
# for record in self.filtered(filter_processador_edoc_cte):
# edoc = record.serialize()[0]
# processador = record._processador()
# xml_file = processador.to_xml()[0]
# event_id = self.event_ids.create_event_save_xml(
# company_id=self.company_id,
# environment=(
# EVENT_ENV_PROD if self.cte40_tpAmb == "1" else EVENT_ENV_HML
# ),
# event_type="0",
# xml_file=xml_file,
# document_id=self,
# )
# record.authorization_event_id = event_id
# xml_assinado = processador.assinar_edoc(edoc, edoc.infCte.Id)
# self._valida_xml(xml_assinado)
# return result

def _document_export(self, pretty_print=True):
result = super()._document_export()
for record in self.filtered(filter_processador_edoc_cte):
Expand Down
2 changes: 1 addition & 1 deletion l10n_br_cte/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ResPartner(spec_models.SpecModel):
_cte_search_keys = ["cte40_CNPJ", "cte40_CPF", "cte40_xNome"]

cte40_choice_cnpj_cpf = fields.Selection(
selection=[("nfe40_CNPJ", "CNPJ"), ("nfe40_CPF", "CPF")],
selection=[("cte40_CNPJ", "CNPJ"), ("cte40_CPF", "CPF")],
string="CNPJ/CPF do Parceiro",
)

Expand Down

0 comments on commit 0fe8f35

Please sign in to comment.