Skip to content

[19.0][MIG] sale_order_lot_selection: Migration to 19.0#4385

Open
alan196 wants to merge 70 commits into
OCA:19.0from
Jarsa-dev:19.0-mig-sale_order_lot_selection
Open

[19.0][MIG] sale_order_lot_selection: Migration to 19.0#4385
alan196 wants to merge 70 commits into
OCA:19.0from
Jarsa-dev:19.0-mig-sale_order_lot_selection

Conversation

@alan196
Copy link
Copy Markdown
Contributor

@alan196 alan196 commented Jun 4, 2026

Description
Migration of sale_order_lot_selection to 19.0.

As part of this migration, a new functionality was added by extending the qty_at_date_popover OWL widget. This allows users to select lots directly from the UI when checking availability:

  • UI/UX: Compact one-line layout per lot to optimize vertical space, displaying expiration dates when available (checking hasattr for expiration_date).
  • Sorting: Automatic backend sorting using FEFO/FIFO logic for Lots.
  • Stability: Pre-fills previous selections seamlessly and prevents RPC_ERROR and duplicate lines on splitting.
  • Validation: Handled state blocking for confirmed orders (widget remains read-only).

hurrinico and others added 30 commits June 4, 2026 08:47
[FIX] Fix product_id on test

[FIX] Fix product on test
[FIX] Use product_14 instead of product_11

[FIX] Add test's flow step
[FIX] change data in quant search

[FIX] Fixed tab

[FIX] Add check on lots list

FIX product_id_change_with_wh
Because quants_get_prefered_domain does not return quants with our lots, if other quants are available
Steps to reproduce:

1.- Create a new Sale Order with 2 or more lines of products
2.- Assign lot to every line (ensure lot has stock available)
3.- Confirm the Sale Order
4.- Go to the Delivery Order

Result:

Only the first line in the Delivery Order is in state "Available" and reserved, the rest of the lines are in state "Waiting Availability" and not reserved
florian-dacosta and others added 21 commits June 4, 2026 08:47
Currently translated at 100.0% (6 of 6 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_lot_selection/ca/
Currently translated at 83.3% (5 of 6 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_lot_selection/de/
…oduct selection.

This call of super without a return is cause that alert of warning for product wasn't working.
After this change we ensure that return of warning or domain will apply finally
Currently translated at 33.3% (2 of 6 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_lot_selection/it/

[UPD] README.rst

[UPD] README.rst
Currently translated at 50.0% (3 of 6 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_lot_selection/it/
Currently translated at 100.0% (2 of 2 strings)

Translation: sale-workflow-16.0/sale-workflow-16.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_order_lot_selection/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-17.0/sale-workflow-17.0-sale_order_lot_selection
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_order_lot_selection/
@OCA-git-bot OCA-git-bot added series:19.0 mod:sale_order_lot_selection Module sale_order_lot_selection labels Jun 4, 2026
Key changes:
- Added new functionality by extending the `qty_at_date_popover` OWL widget to allow lot selection directly from the UI.
- The widget now displays lot expiration dates (checking `hasattr` for `expiration_date`).
- Integrated FEFO or FIFO sorting logic natively for the displayed lots.
- Adapted `sale_order_line` methods to prevent duplicate line creation and `RPC_ERROR` when splitting quantities.
- Pre-fill widget inputs dynamically fetching existing quantities from `sale_order_line` records.
- Set widget to read-only for orders not in `draft` or `sent` state.
@alan196 alan196 force-pushed the 19.0-mig-sale_order_lot_selection branch from cba86f1 to 0dc8f75 Compare June 4, 2026 16:36
@rousseldenis
Copy link
Copy Markdown
Contributor

/ocabot migration sale_order_lot_selection

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Jun 5, 2026
@OCA-git-bot
Copy link
Copy Markdown
Contributor

The migration issue (#3914) has not been updated to reference the current pull request because a previous pull request (#3985) is not closed.
Perhaps you should check that there is no duplicate work.
CC @lef-adhoc

@rousseldenis
Copy link
Copy Markdown
Contributor

@alan196 Thanks for this. Couldn't you put the enhancements in separate commits if they can be backported ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sale_order_lot_selection Module sale_order_lot_selection series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.