60572d6597941a2cb88f916a0c8be38323cc9237
Steps to reproduce: * In Inventory, activate multiple warehouses and storage locations, multi-step routes, Delivery packages * On the main warehouse, activate 3 steps delivery * Create a stockable product A * Update quantity on hand: 100 units in a package PACK1 in Stock/Shelf 1 * Create a new Pick transfer with one move: 120 product A * Set the transfer as todo and check availability: a move line for the 100 units from PACK1 is created * Edit the move line: set a destination location, **change the result package to PACK2** and set a qty_done * On product A, update the quantity on hand: add a *new* package PACK3 of 20 in Stock/Shelf 1 * On the transfer, click on check availability Current behavior: * A new move line is created for the 20 units from PACK3 to PACK3: ok * The move line edited before for the 100 units has its result package **reset to PACK1** Expected behavior: * A new move line is created for the 20 units from PACK3 to PACK3: ok * The move line edited before for the 100 units has its result package kept to **PACK2 as edited by the user** who decided to open the package already Short analysis: At the end of `StockMove._action_assign()`, the method `StockPicking._check_entire_pack()` is called. For each package moved by a move line, this method checks if the package is entirely moved (sum of quants == sum of move lines). The check is done by `StockPicking._check_move_lines_map_quant_package`. When the sums match, the package level of the move lines is created or updated. When it happens, it writes the package in the `result_package_id` of the related lines. It should not change the result_package_id if it was already set. Thinking further, maybe it should not consider lines with a `qty_done` in `_check_move_lines_map_quant_package`: users already picked these lines, if they decided to empty or change the `result_package_id`, a new check of availability for the remaining quantities should not change these lines. opw-2346608 Fixes #58491 closes odoo/odoo#60025 X-original-commit: db262912eb716aed1c42be8a9d59c25bdfa400e0 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%