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

Module: Purchase Stock

Entity: stock.warehouse.orderpoint

Compute Method: _compute_show_supplier

Inputs Method Outputs
  • effective_route_id
  • effective_route_id.id
buy_route = []
for res in self.env['stock.rule'].search_read([('action', '=', 'buy')], ['route_id']):
            buy_route.append(res['route_id'][0])
for orderpoint in self:
            orderpoint.show_supplier = orderpoint.effective_route_id.id in buy_route

Back to entity