Skip to content

Commit

Permalink
[IMP] l10n_it_fatturapa_out: CodiceValore is now String35LatinExtType…
Browse files Browse the repository at this point in the history
… (no encoding required) (#14)
  • Loading branch information
SimoRubi authored and TheMule71 committed May 26, 2021
1 parent abba0d3 commit 5a6088c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions l10n_it_fatturapa_out/wizard/wizard_export_fatturapa.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,19 +676,19 @@ def setDettaglioLinea(
if line.admin_ref:
DettaglioLinea.RiferimentoAmministrazione = line.admin_ref
if line.product_id:
if line.product_id.default_code:
product_code = line.product_id.default_code
if product_code:
CodiceArticolo = CodiceArticoloType(
CodiceTipo=self.env['ir.config_parameter'].sudo(
).get_param('fatturapa.codicetipo.odoo', 'ODOO'),
CodiceValore=encode_for_export(
line.product_id.default_code, 35, 'ascii')
CodiceValore=product_code[:35],
)
DettaglioLinea.CodiceArticolo.append(CodiceArticolo)
if line.product_id.barcode:
product_barcode = line.product_id.barcode
if product_barcode:
CodiceArticolo = CodiceArticoloType(
CodiceTipo='EAN',
CodiceValore=encode_for_export(
line.product_id.barcode, 35, 'ascii')
CodiceValore=product_barcode[:35],
)
DettaglioLinea.CodiceArticolo.append(CodiceArticolo)
body.DatiBeniServizi.DettaglioLinee.append(DettaglioLinea)
Expand Down

0 comments on commit 5a6088c

Please sign in to comment.