The first method is: StockLocation.is_sublocation_of()
This method is currently used in:
* wms/stock_dynamic_routing
* wms/shopfloor
* wms/stock_move_source_relocate
* stock-logistics-warehouse/stock_reserve_rule
* ddmrp/ddmrp
The goal will be to use this module as dependency instead of
reimplementing the method in each.
Other methods should follow in "stock_helper".
Note: I opened https://github.com/odoo/odoo/pull/53866 to propose a
generic version of this method, expecting odoo's opinion, but got no
answer.
Several changes were done because of the code review:
* The category of the module is now "Warehouse", in alignment
with the categories user in OCA (https://odoo-community.org/shop)
* The list of fields in the depends() for the method
_compute_last_inventory_date() missed several fields, that are
now listed as dependencies.
* A new unit test has been added to account for the concern of the
functional needing a compute_sudo in its definition, just in case
a non privileged stock user was stuck into permission problems.
When the 2 last moves of a stock.picking are assigned at the same
time by 2 jobs (different products both available), none of the
transaction will see that it is the last move to be assigned. As a
result, the picking will stay in state "confirmed" even if all its
moves are assigned.
Lock the stock.picking records when we call auto_assign.
If we have many pickings touched for the same product, the lock
can be quite large, so we may have to find a better option.
I could not write a test to exercise this, because we can't have 2
transactions being aware of it, even if we create the picking in demo
data as tests can be run during install.
This new module adds a stored computed field on locations that stores
the last inventory date for the location, for validated inventories.
This is only computed for leaf locations, not parent ones.
In the screen for the vertical lift shuttles, accessible through
Inventory > Operations > Vertical Lift Shuttles, a new button has been
added to allow to skip an operation. This button can also be triggered
by scanning the barcode O-BTN.skip.svg that is inside the folder
'images'.
When a skip is done, the next stock.move.line to pick is chosen and
shown to the operator. A skipped move line is added to the end of the
list of pending move lines to be picked, so they will be shown again
in the future as soon as the other move lines have been successfully
processed.
This option was added because, sometimes, the operator can not process
a move line for whatever reason. Right now, the only way of proceeding
is to wait until he/she can effectively process it, which involves a
delay in the operations. With this new skip operation, the operator
can continue processing the rest of move lines.