Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] stock_move_location: Migration to 18.0 #2244

Open
wants to merge 96 commits into
base: 18.0
Choose a base branch
from

Conversation

yankinmax
Copy link
Contributor

mathieuvatel and others added 30 commits January 22, 2025 19:23
A recordset object is not reliable enough to use as a key for the
built-in 'sorted' and 'itertools.groupby' functions (sometimes it works,
sometimes not).
Using the ID of the record (here the product ID) can fix the problem, but the
'group_lines()' has been totally rewritten for a simpler implementation without
any use of 'sorted' or 'itertools.groupby' functions to group the wizard lines
by product: an iteration on lines to fill a dictionary does the job.
Currently translated at 100.0% (32 of 32 strings)

Translation: stock-logistics-warehouse-11.0/stock-logistics-warehouse-11.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_move_location/es/
Currently translated at 100.0% (33 of 33 strings)

Translation: stock-logistics-warehouse-11.0/stock-logistics-warehouse-11.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_move_location/de/
Currently translated at 100.0% (33 of 33 strings)

Translation: stock-logistics-warehouse-11.0/stock-logistics-warehouse-11.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_move_location/de/
Currently translated at 100.0% (33 of 33 strings)

Translation: stock-logistics-warehouse-11.0/stock-logistics-warehouse-11.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-11-0/stock-logistics-warehouse-11-0-stock_move_location/de/
[FIX] improvement move line generation
- The ability to start the wizard from a picking type in the inventory dasbhoard
- A toggle to edit the origin and destination locations.
done inline because the same margin is defined in  style files
for account dashboard, however I don't want to apply the
account_kanban class here as it would have more effects.
* fix tests as per latest changes
* extend test as per latest changes
* add little help in technical fields
* fix test as per migration
* fix inconsistency in reserved quantity for planned transfers
mymage and others added 27 commits January 22, 2025 19:23
Currently translated at 43.7% (21 of 48 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location/it/
Currently translated at 100.0% (48 of 48 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location/it/
This commit ensures stock move lines with the selected lot_id are in the 'assigned' state when a specific product with a lot_id is chosen in the stock move location for a planned transfer. It resolves the issue where the selected lot_id for a specific product was being discarded and a different lot_id was inadvertently assigned in the move line.
Before this commit, the wrong company could be used in the domain.
Currently translated at 45.8% (22 of 48 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location/pt/
Currently translated at 97.9% (47 of 48 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location/fr/
This improvement commit ensures the operation type is determined by the original location,
aiming to prevent the misuse of incorrect operation types in scenarios where multiple internal transfer options exist.
The sql query is replaced by the read_group method from the orm. This
allows the use of odoo domain and the definition of a new method that can
be overriden to get the domain to retrieve the quants.  Extract the
initialization logic for the stock_move_location_line_ids field into a
dedicated method to allow to be called wy others addons.

Improve the wizard form:

 * Toggle fields are now properly displayed
 * Add a placeholder group to be used by specialized addon to add additional filters
…m_qty

This PR fixes stock quant matching in _get_gather_domain by setting strict=True,
ensuring precise matching based on lot, package, and location. This change addresses
issues arising from the previous approach, which could lead to the inclusion of
unnecessary quants, such as those without an owner or lot.
Currently translated at 100.0% (48 of 48 strings)

Translation: stock-logistics-warehouse-16.0/stock-logistics-warehouse-16.0-stock_move_location
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-16-0/stock-logistics-warehouse-16-0-stock_move_location/it/
If we disable in the wizard the "Apply putaway rules" toggle we wan't to
prevent those to be applied by any automatic logic. Simply injecting the
avoid_putaway_rules context the core does so ignoring them.

TT52561
Ensure that the picking types available for use are for internal transfers.

Not change the picking type if selected before selecting an origin location of the same location default.

Add the exclusion of reserved quantities as optional, to avoid trying to transfer more than really available but also maintaining the option to transfer all even the reserved.

Add new field to show all the quantity of the line to see the difference of the available and reserved.
@yankinmax yankinmax force-pushed the 18.0-mig-stock_move_location branch from 52f4115 to 6287135 Compare January 23, 2025 12:27
@yankinmax yankinmax mentioned this pull request Jan 23, 2025
30 tasks
@yankinmax
Copy link
Contributor Author

@rousseldenis @Jortolsa-S73 @astirpe @chienandalu
Can you pls take a look at this migration?
It includes the squashed commits from the migration to v17 (opened by @keylor2906):

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.