Skip to content

Commit

Permalink
[FIX] l10n_uy_edi: Cambiamos la asignacion de NomItem cuando no tenem…
Browse files Browse the repository at this point in the history
…os product_id

Ticket: 78560
Cuando el cliente crea lineas sin productos, el NomItem que se setea es el mismo que la descripcion
por lo tanto se duplica, con este cambio nos evitamos este problema.

closes #222

Signed-off-by: Katherine Zaoral <[email protected]>
  • Loading branch information
mem-adhoc committed Aug 15, 2024
1 parent cb3a929 commit d87ac51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions l10n_uy_edi/models/l10n_uy_cfe.py
Original file line number Diff line number Diff line change
Expand Up @@ -1198,15 +1198,15 @@ def _uy_cfe_B7_NomItem(self, line):
else:
raise UserError(_('It is not allowed to post an invoice (id: %s) with one or more invoice lines without product and without label.' % line.move_id.id))

def _uy_cfe_B8_DscItem(self, line):
def _uy_cfe_B8_DscItem(self, line, nomitem):
"""B8 Descripcion Adicional del ítem. Maximo 1000 caracteres
"""
self.ensure_one()
res = self.get_leyendas('item', line)
if line.product_id.l10n_uy_additional_info:
res.append(line.product_id.l10n_uy_additional_info)
if self._is_uy_inv_type_cfe():
if line.product_id.display_name != line.name:
if line.name and line.name != nomitem:
res.append(line.name)
elif self._is_uy_remito_type_cfe():
res.append(line.description_picking)
Expand Down Expand Up @@ -1310,7 +1310,7 @@ def _l10n_uy_get_cfe_item_detail(self):
'DescuentoMonto': self._uy_cfe_B13_DescuentoMonto(line)
})
item.update(self._uy_cfe_B11_PrecioUnitario(line, item.get('IndFact')))
item.update(self._uy_cfe_B8_DscItem(line))
item.update(self._uy_cfe_B8_DscItem(line, item.get('NomItem')))
res.append(item)

return res
Expand Down

0 comments on commit d87ac51

Please sign in to comment.