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_allowed_location_ids
| Inputs | Method | Outputs |
|---|---|---|
|
for orderpoint in self: - loc_domain = [('usage', 'in', ('internal', 'view'))] + loc_domain = Domain('usage', 'in', ('internal', 'view')) other_warehouses = self.env['stock.warehouse'].search([('id', '!=', orderpoint.warehouse_id.id)]) for view_location_id in other_warehouses.mapped('view_location_id'): - loc_domain = expression.AND([loc_domain, ['!', ('id', 'child_of', view_location_id.id)]]) - loc_domain = expression.AND([loc_domain, ['|', ('company_id', '=', False), ('company_id', '=', orderpoint.company_id.id)]]) + loc_domain &= ~Domain('id', 'child_of', view_location_id.id) + loc_domain &= Domain('company_id', 'in', [False, orderpoint.company_id.id]) orderpoint.allowed_location_ids = self.env['stock.location'].search(loc_domain) |
|
