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.warehouse.orderpoint
Compute Method: _compute_warehouse_id
| Inputs | Method | Outputs |
|---|---|---|
|
for orderpoint in self:
if orderpoint.location_id.warehouse_id:
orderpoint.warehouse_id = orderpoint.location_id.warehouse_id
elif orderpoint.company_id:
orderpoint.warehouse_id = orderpoint.env['stock.warehouse'].search([
('company_id', '=', orderpoint.company_id.id)
], limit=1)
+ if not orderpoint.warehouse_id:
+ self.env['stock.warehouse']._warehouse_redirect_warning()
|
|
