Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Route Planning
Entity: res.partner
Compute Method: _compute_route_area_id
| Inputs | Method | Outputs |
|---|---|---|
|
|
- RouteArea = self.env["route.area"] - domain = [("auto_assign", "=", True), ("company_id", "=", self.env.company.id)] - all_areas = RouteArea.search(domain).sorted( - key=lambda area: area._get_specificity_score(), reverse=True - ) - for partner in self: - area_found = self.env["route.area"] - for area in all_areas: - if area._match_address(partner): - area_found = area - break - partner.route_area_id = area_found |
|
