diff --git a/l10n_br_nfe/models/document_line.py b/l10n_br_nfe/models/document_line.py index ea3c10041349..fe1c8e81e436 100644 --- a/l10n_br_nfe/models/document_line.py +++ b/l10n_br_nfe/models/document_line.py @@ -170,8 +170,12 @@ def _export_fields_nfe_40_prod(self, xsd_fields, class_obj, export_dict): nfe40_cProd = self.product_id.default_code or self.nfe40_cProd or "" export_dict["cProd"] = nfe40_cProd - nfe40_xProd = self.product_id.name or self.name or "" - export_dict["xProd"] = nfe40_xProd[:120].replace("\n", "").strip() + nfe40_xProd = ( + self.product_id.with_context(display_default_code=False).display_name + or self.name + or "" + ) + export_dict["xProd"] = nfe40_xProd[:120].replace("\n", " ").strip() nfe40_cEAN = nfe40_cEANTrib = self.product_id.barcode or "SEM GTIN" export_dict["cEAN"] = export_dict["cEANTrib"] = nfe40_cEAN