Skip to content

Commit

Permalink
Merge PR OCA#2810 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by marcelsavegnago
  • Loading branch information
OCA-git-bot committed Nov 29, 2023
2 parents 73849ed + 6245968 commit 6ee4128
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions l10n_br_nfe/models/document_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6ee4128

Please sign in to comment.