File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -302,6 +302,25 @@ def _compute_l10n_latam_document_number(self):
302302 name = name .split (" " )[- 1 ]
303303 rec .l10n_latam_document_number = name
304304
305+ def _l10n_uy_edi_get_line_nom_and_desc (self , aml ):
306+ """
307+ Sobreescribimos este método que devuelve el valor de NomItem y DscItem para cada línea del comprobante,
308+ para utilizar siempre la descripción de la línea (aml.name) como está en Odoo nativo, ya que a veces se quiere
309+ modificar el valor a mostrar en la factura manteniendo el producto en la línea.
310+ """
311+ # B7 NomItem, B8 DscItem
312+ nom_item = aml .name and aml .name [:80 ] or "-"
313+ description = aml .name and aml .name [80 :] or ""
314+
315+ if aml .l10n_uy_edi_addenda_ids :
316+ adenda = [
317+ " {%s}" % addenda .content if addenda .is_legend else " " + addenda .content
318+ for addenda in aml .l10n_uy_edi_addenda_ids
319+ ]
320+ description += str (* adenda )
321+
322+ return nom_item , description
323+
305324 # Nuevos metodos
306325
307326 def action_l10n_uy_get_pdf (self ):
You can’t perform that action at this time.
0 commit comments