Commit Graph

10 Commits

Author SHA1 Message Date
Alex Cuellar
3595af3097 [MIG] stock_move_location: Migration to 16.0 2022-12-09 20:39:49 -05:00
Akim Juillerat
34285e7711 stock_move_location: Remove update of assigned moves location
The update of the source location of a move is not a good idea, as
shown in the test case that is modified by this commit and explained
below.

In general, a stock.move will be linked to a stock.picking whose
location_id and location_dest_id are defined by the picking type.
As such, the stock.move will inherit these locations and it is the
assignation of the stock.move that will create a stock.move.line
where the location (in case of outgoing picking) or the destination
location (in case of incoming picking through putaway) will be a
sub location of the respective location defined on the move.

So, if we want to empty a stock.location and move all its content
to another stock.location, we do not want to update the location
of the reserved moves, since it can break the reservation mechanism
of Odoo, as the assignation of a move will always look into the
children locations of the move, and it is not supposed to be updated
by any internal transfer, to what could be a children location.

Then, if internal transfers were planned from the location that is
being emptied, but are supposed to be executed after the location
has been emptied, there is probably an issue with the planning and
the sequence in which both transfers are being executed.
Since the internal transfer being updated in the test case was also
moving from a shelf location to its parent (where technically the goods
are already, since they are in a child location), we should prefer not
breaking the standard workflow of Odoo instead of supporting a corner
case with an internal transfer.

I guess we can revisit my assumption if we have a good reason to update
the stock location, but the one that was tested doesn't seem to be
good enough to justify breaking a standard mechanism.
2022-11-13 20:54:44 -05:00
Bernat Puig Font
fb68f62b10 [MIG] stock_move_location: Migration to 15.0 2022-11-13 20:54:44 -05:00
hveficent
0c289974e3 [FIX] stock_move_location: Error on onchange origin location 2022-11-13 20:54:44 -05:00
Joan Sisquella
46362aecf9 [MIG] stock_move_location: Migration to 13.0 2022-11-13 20:54:44 -05:00
Joan Sisquella
50ddacfe53 [IMP] stock_move_location: black, isort 2022-11-13 20:54:44 -05:00
Lois Rilo
2cf13d61ea [11.0][IMP] stock_move_location:
* fix tests as per latest changes
* extend test as per latest changes
* add little help in technical fields
2022-11-13 20:54:44 -05:00
Joan Sisquella
29471fa294 [MIG] stock_move_location to v12
[FIX] improvement move line generation
2022-11-13 20:54:44 -05:00
mpanarin
3b93ab98be [IMP] refactor to use pickings instead of inventories 2022-11-13 20:54:44 -05:00
mpanarin
5ddc5ad5b9 [MIG] 11.0 stock_move_location 2022-11-13 20:54:44 -05:00