Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Inventory
Entity: stock.move
Compute Method: _compute_location_id
| Inputs | Method | Outputs |
|---|---|---|
|
for move in self:
if move.picked:
continue
if not (location := move.location_id) or move.picking_id != move._origin.picking_id or move.picking_type_id != move._origin.picking_type_id:
if move.picking_id:
location = move.picking_id.location_id
elif move.picking_type_id:
location = move.picking_type_id.default_location_src_id
+ elif move.is_scrap:
+ location = move.company_id.default_stock_location_id
move.location_id = location
|
|
