[IMP] l10n_uy_ux, l10n_uy_edi_stock_ux: report product codes in the CFE XML - #441
Open
jue-adhoc wants to merge 1 commit into
Open
[IMP] l10n_uy_ux, l10n_uy_edi_stock_ux: report product codes in the CFE XML#441jue-adhoc wants to merge 1 commit into
jue-adhoc wants to merge 1 commit into
Conversation
Contributor
jue-adhoc
force-pushed
the
19.0-t-72672-jue
branch
3 times, most recently
from
August 26, 2026 13:28
361555c to
033ef00
Compare
…FE XML Bring to OBA 19 the improvement proposed upstream to odoo/enterprise master (not accepted in 19.0), so the image no longer needs a patched l10n_uy_edi: the product codes are reported in their own <CodItem> nodes of the CFE (INT1 for the internal reference, GTIN13 for a valid EAN-13 barcode) and NomItem no longer carries the [reference] prefix. l10n_uy_ux: - product.product._l10n_uy_edi_get_cod_items(): same name as the upstream method so the override is idempotent and can be dropped once merged. - Override _l10n_uy_edi_cfe_B_details to add CodItem to each detail line. - Inherit l10n_uy_edi.cfe_template to render <CodItem> after <NroLinDet> (defensive .get() for third-party item builders, e.g. e-Resguardos). - Tests: test_140_cfe_cod_items; the enterprise expected CFEs are adapted in test_patch_l10n_uy_edi (reference moved from NomItem to CodItem, idempotent so it works with or without the upstream change). l10n_uy_edi_stock_ux: - Depends on l10n_uy_ux. Override _l10n_uy_stock_cfe_B_details: CodItem and NomItem without the reference prefix. New tests (test_15). Change note: En Uruguay, el código interno del producto (referencia interna) y el código de barras (EAN-13 válido) ahora se informan en el CFE en su propio bloque <CodItem>, tanto en comprobantes de venta como en e-Remitos, y el nombre del ítem (NomItem) ya no lleva el prefijo [referencia]. Así los sistemas receptores pueden identificar el artículo sin parsear la descripción. Task: https://www.adhoc.inc/odoo/project.task/72672
jue-adhoc
force-pushed
the
19.0-t-72672-jue
branch
from
August 26, 2026 13:55
033ef00 to
77d68fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Traemos a OBA 19 la mejora propuesta a Odoo (odoo/enterprise#129215, contra
master; en 19.0 no la aceptan), para que la imagen no necesite más ell10n_uy_ediparcheado (#128600): el código del producto se informa en su propio bloque<CodItem>del CFE yNomItemqueda limpio.l10n_uy_ux
product.product._l10n_uy_edi_get_cod_items(): referencia interna comoINT1(default_code[:35], B3 es ALFA 35 según Formato CFE v24) y código de barras comoGTIN13solo si es un EAN-13 válido (DGI valida el dígito verificador). Mismo nombre que el método propuesto upstream, para que el override sea idempotente y se pueda borrar cuando Odoo lo mergee._l10n_uy_edi_cfe_B_details: agregaCodItema cada línea del detalle.l10n_uy_edi.cfe_template: nodos<CodItem>después de<NroLinDet>(render defensivo con.get()por builders de terceros, ej. e-Resguardos).[referencia]deNomItemya lo quita el override de_l10n_uy_edi_get_line_nom_and_desc([IMP] l10n_uy_ux: strip internal reference prefix from NomItem #440).test_140_cfe_cod_items; y entest_patch_l10n_uy_edise adaptan los XML esperados del10n_uy_edial comportamiento de ux (la referencia pasa deNomItema<CodItem>), que conl10n_uy_uxinstalado pasan deNomItema<CodItem>.l10n_uy_edi_stock_ux
l10n_uy_ux. Override de_l10n_uy_stock_cfe_B_details:CodItem+NomItemsin el prefijo de la referencia (corte [:80] como en facturas). El template de e-Remito reutilizal10n_uy_edi.cfe_template, así que la herencia lo cubre.test_15_delivery_guide_product_codes.Todo lo agregado lleva
TODO 20.0: removecon link al PR de master, porque en 20 es nativo y hay que sacarlo al migrar (incluida la herencia QWeb, que duplicaría<CodItem>).Secuencia acordada: se quita odoo/enterprise#128600 del aggregate (build de runbot con
l10n_uy_edinativo) → merge de este PR el mismo día → la imagen siguiente sale con esta lógica en ux en lugar del PR de Odoo, sin cambios visibles para el cliente.Task: https://www.adhoc.inc/odoo/project.task/72672 — Ticket: https://www.adhoc.inc/odoo/helpdesk.ticket/125178