summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src
diff options
context:
space:
mode:
authorIEL <iel@odoo.com>2020-10-08 13:10:16 +0000
committerIEL <iel@odoo.com>2020-10-14 12:35:33 +0000
commitdb262912eb716aed1c42be8a9d59c25bdfa400e0 (patch)
tree40957dbd212855da8bdc952c931d518ac19c909b /addons/web_editor/static/src
parent690e6aff3fdc1159d8752090322d5e8115e4417f (diff)
[FIX] stock: keep previously set result package in pickings
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#59985 X-original-commit: be59c9a8639d9a81983c8e7a48615cf68d5ac8aa Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/web_editor/static/src')
0 files changed, 0 insertions, 0 deletions