diff --git a/l10n_br_nfe/models/res_partner.py b/l10n_br_nfe/models/res_partner.py index bd1eab67c08a..2af698078825 100644 --- a/l10n_br_nfe/models/res_partner.py +++ b/l10n_br_nfe/models/res_partner.py @@ -354,7 +354,7 @@ def _export_field(self, xsd_field, class_obj, member_spec, export_value=None): return "EX" if xsd_field == "nfe40_idEstrangeiro": - return self.vat or self.cnpj_cpf or self.rg or "EXTERIOR" + return self.vat or self.cnpj_cpf or self.l10n_br_rg_code or "EXTERIOR" return super()._export_field(xsd_field, class_obj, member_spec, export_value)