Route Settings Documentation¶
Overview¶
The Route Settings module (route.settings) defines warehouse routing rules for product putaway and picking operations. Determines which locations products should be stored in or retrieved from, supporting efficient warehouse operations.
Model Information¶
Model Name: route.settings
Display Name: Route Settings
Key Fields: None
Features¶
- ❌ No audit logging
- ❌ No multi-company support
- ✅ Search enabled on type, sequence, product, location
- ❌ No unique constraints
Key Fields Reference¶
| Field | Type | Required | Description |
|---|---|---|---|
type |
Selection | ✅ | Operation type (putaway/picking) |
sequence |
Char | ✅ | Priority order |
product_id |
Many2One | ✅ | Product to route |
location_id |
Many2One | ✅ | Target location |
Route Types¶
| Type | Description |
|---|---|
putaway |
Rules for storing incoming goods |
picking |
Rules for retrieving goods for orders |
Default Order: Ordered by sequence
Common Use Cases¶
Use Case 1: Putaway Routes (Storage Rules)¶
# Fast-moving products → Easy access zone
get_model("route.settings").create({
"type": "putaway",
"sequence": "001",
"product_id": fast_product_id,
"location_id": zone_a_location_id
})
# Slow-moving products → Deep storage
get_model("route.settings").create({
"type": "putaway",
"sequence": "002",
"product_id": slow_product_id,
"location_id": zone_c_location_id
})
# Hazardous products → Special zone
get_model("route.settings").create({
"type": "putaway",
"sequence": "003",
"product_id": hazmat_product_id,
"location_id": hazmat_location_id
})
Use Case 2: Picking Routes (Retrieval Rules)¶
# Pick from primary location first
get_model("route.settings").create({
"type": "picking",
"sequence": "001",
"product_id": product_id,
"location_id": primary_shelf_id
})
# Fallback to overflow location
get_model("route.settings").create({
"type": "picking",
"sequence": "002",
"product_id": product_id,
"location_id": overflow_shelf_id
})
# Last resort: bulk storage
get_model("route.settings").create({
"type": "picking",
"sequence": "003",
"product_id": product_id,
"location_id": bulk_storage_id
})
Use Case 3: FIFO Enforcement¶
# Pick oldest stock first by routing to FIFO location
get_model("route.settings").create({
"type": "picking",
"sequence": "001",
"product_id": perishable_product_id,
"location_id": fifo_zone_id
})
Use Case 4: Get Route for Product¶
def get_route_location(product_id, operation_type):
"""Get target location for product and operation"""
routes = get_model("route.settings").search_browse([
["product_id", "=", product_id],
["type", "=", operation_type]
])
if routes:
# Return first (highest priority)
return routes[0].location_id
return None
# Usage
putaway_location = get_route_location(product_id, "putaway")
picking_location = get_route_location(product_id, "picking")
Related Models¶
| Model | Relationship | Description |
|---|---|---|
product |
Many2One | Product being routed |
stock.location |
Many2One | Target location |
stock.picking |
Referenced | Pickings use routes |
Best Practices¶
1. Sequence Numbering¶
# Good: Use padded sequences for easy insertion
sequences = ["001", "002", "003", "010", "020", "030"]
# Bad: Non-padded makes sorting difficult
sequences = ["1", "2", "3", "10", "20", "30"] # Sorts incorrectly
2. Type-Specific Routes¶
# Good: Separate putaway and picking logic
# Putaway: Store in bulk
get_model("route.settings").create({
"type": "putaway",
"product_id": product_id,
"location_id": bulk_location_id
})
# Picking: Pick from pick face
get_model("route.settings").create({
"type": "picking",
"product_id": product_id,
"location_id": pick_face_location_id
})
3. Multiple Picking Locations¶
# Create fallback chain
priorities = [
("001", primary_location_id),
("002", secondary_location_id),
("003", tertiary_location_id)
]
for seq, loc_id in priorities:
get_model("route.settings").create({
"type": "picking",
"sequence": seq,
"product_id": product_id,
"location_id": loc_id
})
Search Functions¶
Search by Type¶
# Get all putaway routes
putaway_routes = get_model("route.settings").search_browse([
["type", "=", "putaway"]
])
# Get all picking routes
picking_routes = get_model("route.settings").search_browse([
["type", "=", "picking"]
])
Search by Product¶
# Get all routes for a product
routes = get_model("route.settings").search_browse([
["product_id", "=", product_id]
])
Search by Location¶
# Find all products routed to a location
routes = get_model("route.settings").search_browse([
["location_id", "=", location_id]
])
Performance Tips¶
1. Cache Route Mappings¶
# Good: Cache product routing
_route_cache = {}
def get_cached_route(product_id, route_type):
cache_key = f"{product_id}_{route_type}"
if cache_key not in _route_cache:
route = get_model("route.settings").search_browse([
["product_id", "=", product_id],
["type", "=", route_type]
])
if route:
_route_cache[cache_key] = route[0].location_id.id
return _route_cache.get(cache_key)
Version History¶
Last Updated: October 2025
Model File: route_settings.py
Framework: Netforce
Additional Resources¶
- Stock Location Documentation:
stock.location - Product Documentation:
product - Stock Picking Documentation:
stock.picking
This documentation is generated for developer onboarding and reference purposes.