-
Notifications
You must be signed in to change notification settings - Fork 2
Shipper and Consignee Fields Feature
This document describes the implementation of the Shipper and Consignee fields feature that enables automatic data flow from Sales Quote → Warehouse Contract → Warehouse Orders → Warehouse Jobs. This feature ensures that shipper and consignee information is consistently propagated through the entire warehouse management workflow, providing complete traceability from quote to execution.
The shipper and consignee fields have been added to the warehouse management workflow to track the parties involved in warehouse operations. These fields automatically populate when documents are linked, reducing manual data entry and ensuring data consistency.
Sales Quote
↓ (Create Warehouse Contract)
Warehouse Contract
↓ (Create Orders)
├── Inbound Order → Warehouse Job (Putaway)
├── Release Order → Warehouse Job (Pick)
├── VAS Order → Warehouse Job (VAS)
├── Transfer Order (Customer type only) → Warehouse Job (Move)
└── Stocktake Order → Warehouse Job (Stocktake)
Location: logistics/pricing_center/doctype/sales_quote/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Field Configuration:
- Both fields are visible in list view
- Located in the main form section alongside customer and date fields
- Field type: Link
- Options: Shipper / Consignee respectively
File: sales_quote.json (lines 190-201)
{
"fieldname": "shipper",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Shipper",
"options": "Shipper"
},
{
"fieldname": "consignee",
"fieldtype": "Link",
"in_list_view": 1,
"label": "Consignee",
"options": "Consignee"
}Location: logistics/warehousing/doctype/warehouse_contract/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Sales Quote is selected in the Warehouse Contract form, the shipper and consignee fields are automatically populated from the selected Sales Quote.
Implementation: warehouse_contract.js (lines 29-47)
sales_quote(frm) {
// Populate shipper and consignee from Sales Quote
if (frm.doc.sales_quote) {
frappe.db.get_value("Sales Quote", frm.doc.sales_quote, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if sales_quote is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the Connections tab
- Field type: Link
- Options: Shipper / Consignee respectively
File: warehouse_contract.json (lines 99-108)
Location: logistics/warehousing/doctype/inbound_order/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Warehouse Contract is selected in the Inbound Order form, the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: inbound_order.js (lines 64-82)
contract(frm) {
// Populate shipper and consignee from Warehouse Contract
if (frm.doc.contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the main form section
- Field type: Link
- Options: Shipper / Consignee respectively
File: inbound_order.json (lines 184-194)
Location: logistics/warehousing/doctype/release_order/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Warehouse Contract is selected in the Release Order form, the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: release_order.js
contract(frm) {
// Populate shipper and consignee from Warehouse Contract
if (frm.doc.contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the main form section (after Order Date)
- Field type: Link
- Options: Shipper / Consignee respectively
File: release_order.json
Location: logistics/warehousing/doctype/vas_order/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Warehouse Contract is selected in the VAS Order form, the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: vas_order.js
contract(frm) {
// Populate shipper and consignee from Warehouse Contract
if (frm.doc.contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the main form section (after Order Date)
- Field type: Link
- Options: Shipper / Consignee respectively
File: vas_order.json
Location: logistics/warehousing/doctype/transfer_order/
Fields Added:
-
shipper(Link to Shipper) - Only visible when Transfer Type is "Customer" -
consignee(Link to Consignee) - Only visible when Transfer Type is "Customer"
Auto-Population Logic: When a Warehouse Contract is selected in the Transfer Order form (and Transfer Type is "Customer"), the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: transfer_order.js
contract(frm) {
// Populate shipper and consignee from Warehouse Contract (only for Customer transfer type)
if (frm.doc.transfer_type === "Customer" && frm.doc.contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared or transfer type is not Customer
if (frm.doc.transfer_type !== "Customer") {
frm.set_value("shipper", "");
frm.set_value("consignee", "");
} else if (!frm.doc.contract) {
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}
},
transfer_type(frm) {
// Clear shipper and consignee when switching away from Customer type
if (frm.doc.transfer_type !== "Customer") {
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the main form section (after Order Date)
- Field type: Link
- Options: Shipper / Consignee respectively
-
Visibility: Only shown when
transfer_type == "Customer"(usingdepends_on)
File: transfer_order.json
Location: logistics/warehousing/doctype/stocktake_order/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Warehouse Contract is selected in the Stocktake Order form, the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: stocktake_order.js
contract(frm) {
// Populate shipper and consignee from Warehouse Contract
if (frm.doc.contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Field Configuration:
- Located in the main form section (after Date)
- Field type: Link
- Options: Shipper / Consignee respectively
File: stocktake_order.json
Location: logistics/warehousing/doctype/warehouse_job/
Fields Added:
-
shipper(Link to Shipper) -
consignee(Link to Consignee)
Auto-Population Logic: When a Warehouse Contract is selected in the Warehouse Job form, the shipper and consignee fields are automatically populated from the selected Warehouse Contract.
Implementation: warehouse_job.js
warehouse_contract: function(frm) {
// ... existing charge refresh logic ...
// Populate shipper and consignee from Warehouse Contract
if (frm.doc.warehouse_contract) {
frappe.db.get_value("Warehouse Contract", frm.doc.warehouse_contract, ["shipper", "consignee"], function(r) {
if (r) {
if (r.shipper) {
frm.set_value("shipper", r.shipper);
}
if (r.consignee) {
frm.set_value("consignee", r.consignee);
}
}
});
} else {
// Clear shipper and consignee if contract is cleared
frm.set_value("shipper", "");
frm.set_value("consignee", "");
}
}Data Mapping from Orders: When Warehouse Jobs are created from orders, shipper and consignee are automatically mapped from the source order:
-
Inbound Order → Putaway Job: Maps
shipperandconsigneefrom Inbound Order -
Release Order → Pick Job: Maps
shipperandconsigneefrom Release Order -
VAS Order → VAS Job: Maps
shipperandconsigneefrom VAS Order -
Transfer Order → Move Job: Maps
shipperandconsigneefrom Transfer Order (Customer type only) -
Stocktake Order → Stocktake Job: Maps
shipperandconsigneefrom Stocktake Order
Field Configuration:
- Located in the main form section (after Customer)
- Field type: Link
- Options: Shipper / Consignee respectively
- Fields are editable (not read-only) to allow manual override if needed
File: warehouse_job.json
Python Mapping Functions Updated:
-
inbound_order.py-make_warehouse_job(): Maps shipper/consignee from Inbound Order -
release_order.py-make_warehouse_job(): Maps shipper/consignee from Release Order -
vas_order.py-make_warehouse_job(): Maps shipper/consignee from VAS Order -
transfer_order.py-make_warehouse_job(): Maps shipper/consignee from Transfer Order -
stocktake_order.py-make_warehouse_job(): Maps shipper/consignee from Stocktake Order
-
Create/Open Sales Quote
- Fill in customer, date, and other required fields
- Enter Shipper and Consignee (if applicable)
- Submit the Sales Quote
-
Create Warehouse Contract
- Click "Create Warehouse Contract" button on the submitted Sales Quote
- The Warehouse Contract is created with basic information
- Manually select the Sales Quote in the Warehouse Contract form (if not auto-linked)
- Shipper and Consignee are automatically populated from the Sales Quote
-
Submit Warehouse Contract
-
Create/Open Inbound Order
- Select Customer
- Select Warehouse Contract from the Contract field
- Shipper and Consignee are automatically populated from the Warehouse Contract
- Fill in other required fields (items, dates, etc.)
- Submit the Inbound Order
-
Create/Open Release Order
- Select Customer
- Select Warehouse Contract from the Contract field
- Shipper and Consignee are automatically populated from the Warehouse Contract
- Fill in other required fields (items, dates, etc.)
- Submit the Release Order
-
Create/Open VAS Order
- Select Customer and VAS Order Type
- Select Warehouse Contract from the Contract field
- Shipper and Consignee are automatically populated from the Warehouse Contract
- Fill in other required fields (items, VAS inputs, etc.)
- Submit the VAS Order
-
Create/Open Transfer Order
- Set Transfer Type to "Customer"
- Select Customer
- Select Warehouse Contract from the Contract field
- Shipper and Consignee fields become visible and are automatically populated from the Warehouse Contract
- Fill in other required fields (items, reason, etc.)
- Submit the Transfer Order
Note: Shipper and Consignee fields are only available when Transfer Type is "Customer". They are hidden for "Internal" and "Others" transfer types.
-
Create/Open Stocktake Order
- Select Customer, Type, and Scope
- Select Warehouse Contract from the Contract field
- Shipper and Consignee are automatically populated from the Warehouse Contract
- Fill in other required fields (items, dates, etc.)
- Submit the Stocktake Order
-
Create Warehouse Job from any Order
- From Inbound/Release/VAS/Transfer/Stocktake Order, click "Create Warehouse Job"
- Shipper and Consignee are automatically mapped from the source order
- The Warehouse Job is created with all relevant information including shipper/consignee
-
Manual Warehouse Job Creation
- Create Warehouse Job manually
- Select Customer
- Select Warehouse Contract from the Warehouse Contract field
- Shipper and Consignee are automatically populated from the Warehouse Contract
- Users can manually enter or modify shipper and consignee fields at any stage
- If a linked document (Sales Quote or Contract) is cleared, the shipper and consignee fields are automatically cleared
-
Sales Quote → Warehouse Contract
- Trigger: User selects Sales Quote in Warehouse Contract form
- Action: JavaScript event handler
sales_quote()fetches shipper/consignee from Sales Quote - Result: Fields are auto-populated
-
Warehouse Contract → All Order Types
- Trigger: User selects Warehouse Contract in any order form (Inbound, Release, VAS, Transfer, Stocktake)
- Action: JavaScript event handler
contract()fetches shipper/consignee from Warehouse Contract - Result: Fields are auto-populated
-
Orders → Warehouse Jobs
- Trigger: User creates Warehouse Job from an order (via
make_warehouse_jobfunction) - Action: Python mapping function copies shipper/consignee from source order to Warehouse Job
- Result: Fields are automatically mapped during job creation
- Trigger: User creates Warehouse Job from an order (via
-
Warehouse Contract → Warehouse Job
- Trigger: User selects Warehouse Contract in Warehouse Job form
- Action: JavaScript event handler
warehouse_contract()fetches shipper/consignee from Warehouse Contract - Result: Fields are auto-populated
-
Transfer Order Special Case
- Additional trigger: When Transfer Type changes
- Action: If Transfer Type is not "Customer", shipper/consignee fields are cleared and hidden
- Result: Fields are only visible and populated when Transfer Type is "Customer"
All implementations include logic to clear the shipper and consignee fields when the parent link is cleared:
- If Sales Quote is cleared in Warehouse Contract → shipper/consignee are cleared
- If Warehouse Contract is cleared in any Order → shipper/consignee are cleared
- If Warehouse Contract is cleared in Warehouse Job → shipper/consignee are cleared
- If Transfer Type changes from "Customer" to another type → shipper/consignee are cleared
- Data Consistency: Ensures shipper and consignee information flows consistently through the warehouse workflow
- Reduced Manual Entry: Automatic population reduces data entry errors and saves time
- Traceability: Maintains link between parties across the entire warehouse process
- User-Friendly: Seamless experience with automatic field population
-
logistics/pricing_center/doctype/sales_quote/sales_quote.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/warehouse_contract/warehouse_contract.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/warehouse_contract/warehouse_contract.js- Added auto-population logic when Sales Quote is selected
-
logistics/warehousing/doctype/inbound_order/inbound_order.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/inbound_order/inbound_order.js- Added auto-population logic when Warehouse Contract is selected
-
logistics/warehousing/doctype/release_order/release_order.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/release_order/release_order.js- Added auto-population logic when Warehouse Contract is selected
-
logistics/warehousing/doctype/vas_order/vas_order.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/vas_order/vas_order.js- Added auto-population logic when Warehouse Contract is selected
-
logistics/warehousing/doctype/transfer_order/transfer_order.json- Added shipper and consignee fields (with depends_on for Customer transfer type)
-
logistics/warehousing/doctype/transfer_order/transfer_order.js- Added auto-population logic when Warehouse Contract is selected (Customer type only)
- Added transfer_type handler to clear fields when switching away from Customer type
-
logistics/warehousing/doctype/stocktake_order/stocktake_order.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/stocktake_order/stocktake_order.js- Added auto-population logic when Warehouse Contract is selected
-
logistics/warehousing/doctype/warehouse_job/warehouse_job.json- Added shipper and consignee fields
-
logistics/warehousing/doctype/warehouse_job/warehouse_job.js- Added auto-population logic when Warehouse Contract is selected
-
logistics/warehousing/doctype/inbound_order/inbound_order.py- Updated
make_warehouse_job()to map shipper/consignee from Inbound Order
- Updated
-
logistics/warehousing/doctype/release_order/release_order.py- Updated
make_warehouse_job()to map shipper/consignee from Release Order
- Updated
-
logistics/warehousing/doctype/vas_order/vas_order.py- Updated
make_warehouse_job()to map shipper/consignee from VAS Order
- Updated
-
logistics/warehousing/doctype/transfer_order/transfer_order.py- Updated
make_warehouse_job()to map shipper/consignee from Transfer Order
- Updated
-
logistics/warehousing/doctype/stocktake_order/stocktake_order.py- Updated
make_warehouse_job()to map shipper/consignee from Stocktake Order
- Updated
- Create Sales Quote with shipper and consignee
- Create Warehouse Contract from Sales Quote
- Select the Sales Quote in Warehouse Contract
- Expected: Shipper and consignee are auto-populated
- Create Warehouse Contract with shipper and consignee
- Create Inbound Order
- Select the Warehouse Contract
- Expected: Shipper and consignee are auto-populated
- Create Warehouse Contract with shipper and consignee
- Create Release Order
- Select the Warehouse Contract
- Expected: Shipper and consignee are auto-populated
- Create Warehouse Contract with shipper and consignee
- Create VAS Order
- Select the Warehouse Contract
- Expected: Shipper and consignee are auto-populated
- Create Warehouse Contract with shipper and consignee
- Create Transfer Order
- Set Transfer Type to "Customer"
- Select Customer and Warehouse Contract
- Expected: Shipper and consignee fields become visible and are auto-populated
- Create Transfer Order with Transfer Type "Customer"
- Set shipper and consignee
- Change Transfer Type to "Internal"
- Expected: Shipper and consignee fields are cleared and hidden
- Create Warehouse Contract with shipper and consignee
- Create Stocktake Order
- Select the Warehouse Contract
- Expected: Shipper and consignee are auto-populated
- In Warehouse Contract, select a Sales Quote (fields populate)
- Clear the Sales Quote field
- Expected: Shipper and consignee are cleared
- Create Inbound Order with shipper and consignee
- Create Warehouse Job from Inbound Order
- Expected: Shipper and consignee are automatically mapped to Warehouse Job
- Create Warehouse Job manually
- Select Warehouse Contract with shipper and consignee
- Expected: Shipper and consignee are auto-populated from Warehouse Contract
- Auto-populate shipper/consignee from linked document
- Manually change the values
- Expected: Manual values are preserved
Potential improvements for future releases:
- Automatic Mapping on Creation: When creating Warehouse Contract programmatically from Sales Quote, automatically map shipper/consignee in the Python code
- Validation: Add validation to ensure shipper/consignee are consistent across linked documents
- Reporting: Add shipper/consignee to warehouse reports and analytics
- Gate Pass Integration: Consider adding shipper/consignee to Gate Pass documents for complete end-to-end traceability
- The fields are optional (not required) to maintain flexibility
- The auto-population only occurs when the parent link is selected, not during programmatic creation
- Users can always manually override the auto-populated values
- The feature maintains backward compatibility with existing documents
Document Version: 2.0
Last Updated: 2025
Author: Development Team
This feature has been fully implemented across all warehouse documents:
- ✅ Sales Quote
- ✅ Warehouse Contract
- ✅ Inbound Order
- ✅ Release Order
- ✅ VAS Order
- ✅ Transfer Order (Customer type only)
- ✅ Stocktake Order
- ✅ Warehouse Job
All implementations follow the same pattern: fields auto-populate from Warehouse Contract when selected, and clear when the contract link is removed or (in the case of Transfer Order) when the transfer type changes away from "Customer".
Complete Data Flow: Shipper and consignee information now flows seamlessly from Sales Quote → Warehouse Contract → Orders → Warehouse Jobs, providing complete traceability throughout the entire warehouse management workflow.
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