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

View 18.0 View 20.0
Inputs Method Outputs
  • route_id
  • route_id.id
  • 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.route_id.id in buy_route
+             orderpoint.show_supplier = orderpoint.effective_route_id.id in buy_route
  • show_supplier

Back to entity