odoo/odoo#191114
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- label
- odoo-dev:master-17.0-opw-4358121-picking_lot-lase-t8h7-fw
- head
- 9c228dafdeff6fae38d677a1371659ad6af5505b
- merged
- 9 months ago by Bugfix, Lancelot Semal (lase)
odoo/odoo | |
---|---|
17.0 | #188840 |
saas-17.2 | #189009 |
saas-17.4 | #191080 |
18.0 | #191086 |
saas-18.2 | |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #191114 |
[FW][FIX] stock: onchange lot on moves to reassign move lines
Initial issue:
On a stock move, when using a lot from a sub-location, the created SML will still start from SM's source location instead of lot's location
This issue was fixed in:
- 17.0 by: 6b158aa333cf111472e4b850543b8379f0e998b7
- saas-17.2+ by: 8dec391fff243b4d079ceafd6c19b84008d2fe36
However, there is a tiny corner case where the fix of 17.0 is better than the one of saas-17.2:
If you were to put half of a lot in a pack in a sublocation and the other half eslewhere, the current fix of saas-17.2 would not use the sublocation that is however available as it relies on the 'location_id' field of the stock.lot
model which will not be set in that valid use case:
https://github.com/odoo/odoo/blob/d9cca6201a39c431deaf13891a314dde2db7e82e/addons/stock/models/stock_lot.py#L155-L159
The purpose of the present PR is to reconcile both fix by reverting the current one and by adapting the test to both usecases.
Revert "[FIX] stock: start SML from sub location"
This reverts commit 8dec391fff243b4d079ceafd6c19b84008d2fe36.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr