-
Notifications
You must be signed in to change notification settings - Fork 2
Transport Order Intermodule Field Copy
Reference implementation: logistics.utils.module_integration — create_transport_order_from_air_shipment, create_transport_order_from_sea_shipment, and helpers. Parent-level DG copy uses logistics.utils.dg_fields.copy_parent_dg_header.
contains_dangerous_goods is the standard parent flag on Air Shipment, Sea Shipment, Air Booking, Sea Booking, Transport Order, Transport Job, and Transport Leg (the latter fetches from the job). This matches package-level contains_dangerous_goods on Transport Order Package and Transport Job Package.
hazardous remains only where it denotes capability or classification, not “this move contains DG”: e.g. Vehicle Type (equipment can handle hazmat), Commodity / Commodities (product is hazardous).
Target (Transport Order) |
Source (Air Shipment) |
Notes |
|---|---|---|
air_shipment |
(argument) | Link set explicitly |
customer |
local_customer |
|
shipper |
shipper |
|
consignee |
consignee |
|
booking_date |
booking_date or today |
|
scheduled_date |
eta or etd or booking_date or today |
|
location_type |
— | Fixed "UNLOCO"
|
location_from |
origin_port |
|
location_to |
destination_port |
|
transport_job_type |
— | Fixed "Non-Container"
|
company |
company or default |
|
branch |
branch |
|
cost_center |
cost_center |
|
profit_center |
profit_center |
|
project |
project |
|
sales_quote |
sales_quote |
When set on shipment |
contains_dangerous_goods |
contains_dangerous_goods |
Same name as freight |
dg_declaration_complete |
dg_declaration_complete |
|
dg_compliance_status |
dg_compliance_status |
|
dg_emergency_contact |
dg_emergency_contact |
|
dg_emergency_phone |
dg_emergency_phone |
|
dg_emergency_email |
dg_emergency_email |
Legs child (one row when shipper + consignee): facility_type_from/facility_from, facility_type_to/facility_to, scheduled_date, transport_job_type, optional pick_address / drop_address from shipper_address / consignee_address.
Same pattern as air, except:
| Target | Source | Notes |
|---|---|---|
sea_shipment |
(argument) | |
transport_job_type |
"Container" if container_type else "Non-Container"
|
|
container_type |
container_type |
|
container_no |
First containers[].container_no or first package container
|
DG header mapping uses copy_parent_dg_header (same fields as air).
Implemented in logistics.utils.dg_fields.transport_order_package_row_from_shipment_pkg: common measurements plus PACKAGE_DG_FIELDS, and child contains_dangerous_goods when the shipment is flagged or the line has DG identifiers.
Header uses copy_parent_dg_header(doc, job) so contains_dangerous_goods and all parent DG tab fields copy. Packages copy by intersecting child field names (includes DG columns where both child tables match).
Different target: does not copy DG header or DG package detail. It either uses warehouse_items or default warehouse item + quantity, uom, weight, volume per package.
When a doc is saved with air_shipment / sea_shipment set, Transport Order only receives: location_type, location_from, location_to, booking_date, customer (if empty). No DG propagation on that path.
logistics.patches.v1_0_rename_transport_hazardous_to_contains_dangerous_goods renames DB column hazardous → contains_dangerous_goods on Transport Order, Transport Job, and Transport Leg before schema sync.
Header and package fields are on the transport and freight DocTypes. Full schemas:
- Transport Order, Transport Job
- Air Shipment, Sea Shipment
- Inbound Order (when created from shipment)
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