Skip to content

Commit

Permalink
[IMP] l10n_br_cte: change xNome when tpAmb = 2
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelsavegnago committed Jul 4, 2024
1 parent 4309750 commit 3926ec5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions l10n_br_cte/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@ def _compute_cep(self):
rec.cte40_CEP = punctuation_rm(rec.zip)

def _export_field(self, xsd_field, class_obj, member_spec, export_value=None):
if (
xsd_field == "cte40_xNome"
and class_obj._name
in ["cte.40.tcte_rem", "cte.40.tcte_dest", "cte.40.exped"]
and self.env.context.get("tpAmb") == "2"
):
return "CTE EMITIDO EM AMBIENTE DE HOMOLOGACAO - SEM VALOR FISCAL"

if not self.cnpj_cpf and self.parent_id:
cnpj_cpf = punctuation_rm(self.parent_id.cnpj_cpf)
else:
Expand Down

0 comments on commit 3926ec5

Please sign in to comment.