Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: WMS Accounting

Entity: stock.valuation.layer

Compute Method: _compute_warehouse_id

View 17.0
Inputs Method Outputs
  • stock_move_id
  • stock_move_id.location_id
  • stock_move_id.location_id.usage
  • stock_move_id.location_id.warehouse_id
  • stock_move_id.location_id.warehouse_id.id
  • stock_move_id.location_dest_id
  • stock_move_id.location_dest_id.warehouse_id
  • stock_move_id.location_dest_id.warehouse_id.id
- for svl in self:
-             if svl.stock_move_id.location_id.usage == "internal":
-                 svl.warehouse_id = svl.stock_move_id.location_id.warehouse_id.id
-             else:
-                 svl.warehouse_id = svl.stock_move_id.location_dest_id.warehouse_id.id
  • warehouse_id

Back to entity