[FIX] stock_voucher_ux: assign voucher numbers on substituted aeroo remito#974
Open
les-adhoc wants to merge 1 commit into
Open
[FIX] stock_voucher_ux: assign voucher numbers on substituted aeroo remito#974les-adhoc wants to merge 1 commit into
les-adhoc wants to merge 1 commit into
Conversation
Collaborator
les-adhoc
force-pushed
the
18.0-h-122524-les
branch
from
July 10, 2026 19:34
7301155 to
34b84d8
Compare
…emito For preprinted books (autoprinted=False) voucher numbers are assigned at print time from the report_download controller. When the delivery report is swapped by report_substitute for an aeroo report whose name does not contain the literal "remito" (e.g. a custom "aeroo_report_ar_picking"), the aeroo branch condition `type == "aeroo" and "remito" in url` was never true, so assign_numbers never ran and the delivery guide stayed unnumbered (blocking, for instance, the ARBA COT request which requires an assigned voucher). Gate the aeroo branch on the presence of the serialized context in the URL instead of the report name. The real scope is already enforced downstream by the `assign` context flag (only set by do_print_and_assign) plus the picking having a book, so this covers any substituted aeroo delivery report without relying on its name.
les-adhoc
force-pushed
the
18.0-h-122524-les
branch
from
July 13, 2026 19:24
34b84d8 to
2697610
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.

Problema
En talonarios preimpresos (
autoprinted=False) los números de remito se asignan al imprimir, desde el controllerreport_download(stock_voucher_ux/controllers/main.py, rama aeroo).Cuando el reporte de remito es reemplazado por
report_substitutepor un reporte aeroo cuyoreport_nameno contiene el literalremito(p. ej. unaeroo_report_ar_pickingcustom), la condicióntype == "aeroo" and "remito" in urlnunca era verdadera, por lo queassign_numbersno corría y el remito quedaba sin numerar. Eso bloquea, entre otras cosas, la obtención del COT de ARBA, que exige un voucher asignado (l10n_ar_stocklevanta "No se asignó número de remito").Cambio
context=) en vez delreport_name. El alcance real ya lo garantiza el flagassigndel contexto (solo lo seteado_print_and_assign) más que el picking tenga talonario, así que cubre cualquier reporte aeroo sustituido sin depender de su nombre.active_idsa un recordset y se acota a impresión de un único picking (len(picking) == 1) antes de acceder abook_id/assign_numbers, evitando unExpected singletonen impresiones multi-picking. El batch queda a cargo destock_batch_picking_voucher.Test plan
autoprinted=False) con una regla dereport_substituteque reemplaza el remito por un reporte aeroo, en un picking de salida en estadodonesin voucher asignado.do_print_and_assign, que seteaassign=True).voucher_idsqueda vacío.voucher_idsqueda poblado; el COT puede obtenerse.Ticket: https://www.adhoc.inc/odoo/action-helpdesk.helpdesk_ticket_action_main/122524