Skip to content

Fork Sync Branch 18.0 - #61

Merged
btl-bot merged 66 commits into
BTLzdravtech:18.0from
ingadhoc:18.0
Jul 24, 2026
Merged

Fork Sync Branch 18.0#61
btl-bot merged 66 commits into
BTLzdravtech:18.0from
ingadhoc:18.0

Conversation

@btl-bot

@btl-bot btl-bot commented Jul 24, 2026

Copy link
Copy Markdown

No description provided.

mav-adhoc and others added 30 commits December 9, 2025 15:16
Part-of: #827
Signed-off-by: ced-adhoc <ced@adhoc.com.ar>
closes #827

Signed-off-by: ced-adhoc <ced@adhoc.com.ar>
closes #832

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
closes #837

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
…script

closes #845

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
closes #846

X-original-commit: 5da16f1
Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
closes #850

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
closes #847

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
closes #857

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
closes #861

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
closes #854

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
…aints

closes #867

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
…alidate

- Elimina constraint _check_quantity en stock.move que validaba cantidades transferidas vs demanda inicial
- Implementa validación en button_validate de stock.picking antes de confirmar la transferencia
- Evita comportamientos inconsistentes cuando el scheduler ejecuta acciones automáticas
- El mensaje de error ahora muestra producto, demanda inicial y cantidad intentada para mejor trazabilidad

closes #871

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
closes #878

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
closes #882

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
closes #881

Signed-off-by: Felipe Garcia Suez <feg@adhoc.com.ar>
closes #886

Signed-off-by: Felipe Garcia Suez <feg@adhoc.com.ar>
closes #889

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
closes #890

Signed-off-by: Felipe Garcia Suez <feg@adhoc.com.ar>
…vl_vals_list is none

closes #894

Signed-off-by: rov-adhoc <rov@adhoc.com.ar>
…hases

closes #893

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
Allow internal processes like merge_moves to delete moves using can_delete context.

closes #875

Signed-off-by: Filoquin adhoc <maq@adhoc.com.ar>
closes #898

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
les-adhoc and others added 27 commits May 20, 2026 20:35
…tion

closes #924

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
… on picking validation

closes #932

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
closes #931

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
closes #934

X-original-commit: 0b86a64
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
closes #945

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…id XPath conflict with Studio

closes #948

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
The _check_manual_lines guard only bypassed the check when reservation
came from the automatic _trigger_assign. Pressing 'Check availability'
(action_assign) on a picking creates reservation move lines without the
trigger_assign context, so a negative available quantity (e.g. a leftover
negative quant) wrongly raised 'You can't transfer more quantity than the
quantity on stock!'. Set trigger_assign in _action_assign so the manual
button bypasses _check_quantity_available too.

closes #947

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
Al imprimir desde do_print_and_assign con autoprinted=False, los números
se asignaban luego de generar el PDF (en el controller), lo que causaba
que la primera impresión saliera sin número. Ahora se asignan antes usando
get_estimated_number_of_pages(), igual que el flujo de autoprinted=True.

Part-of: #941
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
…nted=False

Al contar páginas del PDF real (en el controller) para asignar la cantidad
correcta de números de remito, el PDF ya estaba generado sin ellos. Ahora,
después de assign_numbers, se regenera el PDF para que los números aparezcan
en la primera impresión.

Revierte el enfoque de pre-asignación basado en get_estimated_number_of_pages()
que fallaba cuando lines_per_voucher=0 (siempre asignaba 1).

Part-of: #941
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
…mito

El report_ref 'stock.report_deliveryslip' resuelve a un ir.ui.view (template
QWeb) en vez del ir.actions.report, fallando silenciosamente. Usar
'stock.action_report_delivery' que es el XML ID correcto del action.
Además se elimina el except que ocultaba el error.

Part-of: #941
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
…remito

El campo vouchers (store=True computed) tenía valor correcto en el cache ORM
pero _render_qweb_pdf crea un nuevo environment que lee desde DB, donde el
write todavía estaba pendiente (diferido). flush_all() fuerza la escritura
antes de renderizar.

Part-of: #941
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
…-printed)

stock_voucher: get_estimated_number_of_pages usa move_line_ids en lugar de
move_ids, consistente con el wizard. Esto estima correctamente cuando hay
varios lotes por producto que generan más líneas en el PDF.

stock_voucher_ux: do_print_and_assign asigna números ANTES de llamar a
do_print_voucher para autoprinted=False, garantizando que el primer PDF
ya tenga los números. El controller queda como fallback (sin regeneración)
para rutas de impresión que no pasen por este método.

closes #941

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
closes #940

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
…ion batches

The action_confirm override zeroed the quantity of every operation line in
the batch, which on deliveries/waves (outgoing pickings) wrongly removed the
product availability and pushed orders to 'waiting'. The zeroing was meant
only for partial receptions (task 68226 RF-02), so restrict it to incoming
pickings.

Ticket 120763

closes #954

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
Return moves created by the return wizard have `additional=True`
(inherited via `copy=True`) and `origin_returned_move_id` set.
The existing check was blocking them even though they are not
manually-added moves, preventing users from validating returns
on sale orders with `block_additional_quantity` enabled.

closes #119948

closes #958

Signed-off-by: Juan Carreras <jc@adhoc.com.ar>
Part-of: #928
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
Part-of: #928
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
The MTO warehouse propagation guard checked for `raw_material_production_id`
(defined by mrp) and then read `subcontractor_id`, which only exists once
mrp_subcontracting is installed. On a database with mrp but not
mrp_subcontracting, that read raised AttributeError during procurement,
blocking the picking/order flow. Guard the subcontractor read with a field
presence check.

Part-of: #928
Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Satisfies the end-of-file-fixer pre-commit hook.

closes #928

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ng validation

The check_user_location_rights constraint validated allowed locations on
every stock.move reaching 'done' or 'cancel'. When a chained MTO purchase
order is modified/confirmed, Odoo cancels and recreates the chained moves;
those leftover moves (state='cancel', dest = Input) re-triggered the
constraint outside the picking validation flow, raising a false
'Invalid Location' for users with restricted locations.

Now the check only runs for moves reaching 'done' and only during explicit
picking validation (button_validate_picking_ids in context).

closes #957

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
closes #963

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
For preprinted books (autoprinted=False) the amount of voucher numbers must
match the real number of rendered pages of the report. Since #941 the count
came from the lines_per_voucher estimate (ceil(move_line_ids / lines_per_voucher)),
pre-assigned before printing, which under-counts whenever the report paginates
to more pages than the estimate predicts.

- do_print_and_assign: drop the estimate pre-assign for autoprinted=False and
  print with assign=True, so the controller counts the real rendered pages.
- controller: after assigning by the real page count, flush and re-render so
  the voucher numbers show up on the first delivered PDF. Done in both the
  aeroo and the qweb (report_deliveryslip) branches. This restores the
  re-render removed in #941, now also for the aeroo path.
- _action_done: do not pre-assign preprinted books by the estimate (they are
  numbered at print time by real pages); autoprinted books keep the previous
  behaviour.

Follow-up of #941.

closes #961

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>
process_cancel_backorder discarded the return value of super(), so when
the picking type was not book_required it returned None and the "No
Backorder" flow never completed: the picking stayed in "Ready" instead of
reaching "Done". This mirrors the process() sibling, which already keeps
and returns res.

Now we capture super()'s result and return it (combining it with the
voucher action when there are book_required pickings, as process() does).

closes #969

Signed-off-by: Matias Velazquez <mav@adhoc.com.ar>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
When numbering pre-printed vouchers, the controller divided the rendered
page count by the report's ``copies`` to avoid counting the physical
duplicate/triplicate copies as extra vouchers. It read ``copies`` with
``[("report_name", "ilike", "remito")], limit=1``, which matches ANY
report with "remito" in its name.

On databases with more than one aeroo remito report with different
``copies`` (e.g. a generic remito with ``copies=2`` and a "carta porte"
with ``copies=1``), that lookup returned the ``copies`` of the wrong
report. The printed remito rendered 2 pages (copies=2) but the controller
read copies=1, so ``total_pages = pages / 1 = 2`` and it assigned 2
voucher numbers instead of 1, shifting the numbering permanently.

Resolve ``copies`` from the report actually being printed, matching its
``report_name`` extracted from the download URL.

closes #971

Signed-off-by: Luciano Esperlazza <les@adhoc.inc>

@sireko sireko left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto approved

@btl-bot
btl-bot merged commit c1583b1 into BTLzdravtech:18.0 Jul 24, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.