-
Notifications
You must be signed in to change notification settings - Fork 2
Transport Order Temperature Fields Analysis
Requirement: When the reefer checkbox is checked, two fields must appear that require the minimum and maximum temperature for the cargo to be transported.
Question: Is this feature redundant for our system?
Answer: No, this feature is not redundant and would provide significant value for:
- Operational efficiency (reduces repetitive data entry)
- Data quality (enforces temperature specification)
- Vehicle matching (enables temperature capability validation)
- Consistency (aligns with existing Air Shipment pattern)
However, it is not strictly necessary for the workflow to function, as package-level temperature fields already exist.
-
Transport Order
-
reefer(Checkbox) - Boolean flag indicating refrigeration needed - No order-level temperature fields
-
-
Transport Order Package (Child Table)
-
temp_controlled(Checkbox) -
min_temperature(Float, °C) -
max_temperature(Float, °C) - These fields are independent of the parent's
reeferfield
-
-
Transport Vehicle
-
reefer(Checkbox) -
reefer_min_temp(Float, depends onreefer) -
reefer_max_temp(Float, depends onreefer)
-
-
Transport Job
-
refrigeration(Checkbox) - copied from Transport Order'sreefer - No order-level temperature fields
-
Transport Order (Requestor)
├─ reefer checkbox
├─ packages (with temp_controlled, min_temperature, max_temperature)
│
└─> Transport Job (Conversion)
├─ refrigeration checkbox (from TO.reefer)
├─ packages (copied from TO packages)
│
└─> Run Sheet (Dispatcher)
└─ Vehicle assignment
Use Case: Restaurant chain ordering 50 pallets of frozen chicken
Requirements:
- All packages need -18°C
- Single temperature requirement across entire order
Current Workflow:
- User checks
reefercheckbox - Adds 50 package rows
- Must enter -18°C in
min_temperatureandmax_temperaturefor each row - Repetitive data entry prone to errors
With Order-Level Temperature:
- User checks
reefercheckbox - Temperature fields appear
- Enter -18°C once at order level
- System validates vehicle can handle -18°C
Verdict: Order-level temperature significantly improves UX and reduces errors.
Use Case: Hospital ordering temperature-controlled medicines
Requirements:
- All packages need 2-8°C (cold chain)
- Critical for compliance
Verdict: Order-level temperature needed for quick entry and validation.
Use Case: Customer orders frozen items (-18°C) and chilled items (2-8°C)
Reality:
- These CANNOT go in the same vehicle (different temperature settings)
- Requires separate transport orders (one per temperature range)
Verdict: Order-level temperature still makes sense (one order = one temperature setting).
Use Case: Vehicle selection for temperature-controlled cargo
Example:
- Vehicle A: Can handle -25°C to +5°C
- Vehicle B: Can handle -5°C to +20°C
- Cargo needs: -18°C
Current System:
- Only checks if vehicle has
reefer=1 - No validation that vehicle's temperature range covers cargo requirement
- Could assign Vehicle B (incapable of -18°C) ❌
With Order-Level Temperature:
- System validates Vehicle A can handle -18°C ✅
- System rejects Vehicle B (range doesn't cover -18°C) ✅
Verdict: Critical for operational safety and compliance.
Current State:
- Requestor creates Transport Order with
reeferchecked - Must enter temperature for each package individually
- Transport Order → Transport Job (temperature flows via packages)
- Dispatcher sees packages with temperature, but no quick summary
With Order-Level Temperature:
- Requestor creates Transport Order with
reeferchecked - Enters temperature once at order level (or per package if different)
- Transport Order → Transport Job (order-level temperature copied)
- Dispatcher sees order-level temperature for quick vehicle matching
Impact: Improves efficiency at both requestor and dispatcher levels.
Current Implementation:
header_map = {
"refrigeration": getattr(doc, "reefer", None),
# ... other fields
}Impact:
- Medium - Need to decide if Transport Job should also have order-level temperature fields
- Risk: Low - Can add fields without breaking existing conversion
Action Required:
- Option A: Add
min_temperatureandmax_temperatureto Transport Job and copy from Transport Order - Option B: Keep temperature only on Transport Order (reference only)
- Recommendation: Option A for consistency
Current State:
- No validation that temperature is required when
reeferis checked
Impact:
- Low - Adding validation improves data quality
- Risk: Low - Only adds validation, doesn't break existing logic
Action Required:
def validate(self):
if self.reefer:
if not self.min_temperature or not self.max_temperature:
frappe.throw(_("Temperature range (min/max) is required when reefer is enabled."))Current State:
if doc.get("reefer"):
special_requests.append("REEFER")Impact:
-
None - Lalamove API only accepts
"REEFER"flag, not temperature values - Risk: None - No changes required
Current State:
- No reports query temperature fields from Transport Order
- Reports use package-level data or don't query temperature at all
Impact:
- None - No changes required
- Risk: None
Current State:
- Packages have
temp_controlled,min_temperature,max_temperature - These are independent of parent's
reeferfield
Impact:
- None - No conflict
- Order-level = summary/reference
- Package-level = detailed specification
- Can coexist
Risk: None
Current State:
- Only checks if vehicle has
reefer=1 - No validation of temperature range compatibility
Impact:
- Low - Opportunity for enhancement
- Risk: Low - Enhancement, not breaking change
Optional Enhancement:
def validate_vehicle_temperature_compatibility(self, vehicle_name):
if self.reefer and self.min_temperature and self.max_temperature:
vehicle = frappe.get_doc("Transport Vehicle", vehicle_name)
if vehicle.reefer_min_temp > self.min_temperature or \
vehicle.reefer_max_temp < self.max_temperature:
frappe.throw(_("Vehicle temperature range ({0}°C to {1}°C) is incompatible with cargo requirement ({2}°C to {3}°C)").format(
vehicle.reefer_min_temp, vehicle.reefer_max_temp,
self.min_temperature, self.max_temperature
))Current State:
if self.reefer:
factors["surcharge"] += 0.2 # Additional 20% for reeferImpact:
- None - Cost calculation doesn't use temperature values
- Risk: None
The system already implements this pattern in Air Shipment:
def validate_temperature(self):
if self.requires_temperature_control:
if self.min_temperature is None and self.max_temperature is None:
frappe.throw(_("Temperature range (min/max) is required when temperature control is enabled."))Fields:
-
requires_temperature_control(Checkbox) -
min_temperature(Float, depends on checkbox) -
max_temperature(Float, depends on checkbox)
Verdict: Transport Order should follow the same pattern for consistency.
-
Transport Order DocType (
transport_order.json)- Add
min_temperaturefield (Float, depends_on:reefer) - Add
max_temperaturefield (Float, depends_on:reefer) - Add section break for temperature fields
- Add
-
Transport Order Validation (
transport_order.py)- Add validation in
validate()method - Require temperature when
reeferis checked
- Add validation in
-
Transport Order Form Script (
transport_order.js)- Add field visibility logic (show/hide based on
reefer) - Optional: Auto-populate package temperatures from order level
- Add field visibility logic (show/hide based on
-
Transport Job DocType (
transport_job.json)- Add
min_temperaturefield (Float, depends_on:refrigeration) - Add
max_temperaturefield (Float, depends_on:refrigeration)
- Add
-
Transport Order → Transport Job Conversion (
transport_order.py)- Add temperature fields to
header_mapinaction_create_transport_job()
- Add temperature fields to
-
Vehicle Temperature Validation (
transport_order.py)- Add
validate_vehicle_temperature_compatibility()method - Call during vehicle type selection
- Add
| Feature | Impact | Risk | Action Required |
|---|---|---|---|
| TO → TJ Conversion | Medium | Low | Add fields to Transport Job if needed |
| Validation | Low | Low | Add validation logic |
| Lalamove Integration | None | None | No changes needed |
| Reports | None | None | No changes needed |
| Package Fields | None | None | No conflict |
| Vehicle Matching | Low | Low | Optional enhancement |
| Cost Calculation | None | None | No changes needed |
Overall Risk: Low - Safe to implement
Implement the feature with the following approach:
-
Add order-level temperature fields to Transport Order
-
min_temperature(Float, depends_on:reefer) -
max_temperature(Float, depends_on:reefer) - Add validation requiring temperature when
reeferis checked
-
-
Add same fields to Transport Job (for consistency)
- Copy temperature from Transport Order during conversion
-
Keep package-level temperature fields (no changes)
- Order-level = quick entry/default
- Package-level = detailed specification
- Both can coexist
-
Add vehicle temperature compatibility validation
- Validate vehicle's
reefer_min_temptoreefer_max_tempcovers cargo requirement - Prevent assignment of incompatible vehicles
- Validate vehicle's
GitHub Issue #322 is NOT redundant and should be implemented because:
- ✅ Operational Efficiency - Eliminates repetitive data entry for uniform temperature requirements
- ✅ Data Quality - Enforces temperature specification when reefer is checked
- ✅ Vehicle Matching - Enables validation that vehicle temperature capabilities match cargo requirements
- ✅ Consistency - Aligns with existing Air Shipment pattern
- ✅ Compliance - Ensures temperature requirements are captured and validated
- ✅ Low Risk - No breaking changes to existing features
However, the system can function without it since package-level temperature fields already exist. This is a UX improvement rather than a workflow blocker.
Getting Started
- Getting Started
- Recent Platform Updates
- CargoNext v1 — Release Notes
- CargoNext v1 — Astraea Press Release
- Document Management
- Milestone Tracking
- Customer Portal
Setup and Settings
- Logistics Settings
- Credit Management
- Default Details and Relationships
- Sea Freight Settings
- Air Freight Settings
- Transport Settings
- Warehouse Settings
- Customs Settings
Sea Freight
- Sea Freight Module
- Sea Booking
- Sea Shipment
- Sea Consolidation
- Master Bill
- Shipper
- Consignee
- Container Type
- Container Management
Air Freight
Transport
- Transport Module
- Transport Order
- Transport Job
- Transport Consolidation
- Transport Leg
- Transport Plan
- Run Sheet
- Proof of Delivery
- Transport Template
- Load Type
- Transport Order — Inter-module Field Copy
Customs
Warehousing
- Warehousing Module
- Inbound Order
- Release Order
- Transfer Order
- VAS Order
- Stocktake Order
- Warehouse Job
- Warehouse Contract
- Gate Pass
- Periodic Billing
- Storage Location
- Handling Unit Type
Pricing Center
- Sales Quote
- Sales Quote — Separate Billings and Internal Job
- Change Request
- Sales Quote – Calculation Method
Job Management
- Job Management Module
- Revenue Recognition Policy — Accounts, Dates, and Charges
- Proforma GL Entries
- WIP and Accrual Reversal on Invoicing
Sustainability
Intercompany
Special Projects
Pages
Features
Reports
Glossary