
GHN Integration and GHTK Integration - Vietnam shipping for Odoo 19
Ship with Giao Hang Nhanh and Giao Hang Tiet Kiem straight from Odoo deliveries.
Two Vietnamese carriers in one module. Validate a delivery and Odoo creates the GHN or GHTK order with the COD amount, gets the label, and keeps the order code as the tracking number. Status changes arrive by webhook, and a scheduled check catches anything a webhook missed.
What it does
GHN and GHTK become providers on Odoo delivery methods. Quotations and the shop get the carrier fee in VND, converted to the order currency when you sell in USD or another currency.
When a delivery is validated, Odoo sends sender, receiver, items, weight, COD and declared value. GHN needs its own district ID and ward code, so the module loads the GHN province and district list and matches each contact by its City and Street 2 fields; wards load the first time a district is used. GHTK works with plain province, district and ward names.
The order reference is the delivery name. GHN answers a repeated reference with the order it already has, and GHTK reports it as existing, so a double click never books two parcels. If an order ships in two parts, the second delivery only collects the COD the first one did not.
Who it is for
| Shops and warehouses in Vietnam that ship with GHN, GHTK or both. | |
| Sellers who take cash on delivery and want the amount on the carrier order without retyping it. | |
| Teams that want to know about a stuck parcel before the customer calls. |
Key features
Screens from a test database with the module installed and carrier demo mode on.
GHN delivery method
Token and shop ID, the webhook URL to give GHN, COD, who pays shipping and the GHN options.
| Required note: buyer may not see, may see, or may try the goods | |
| Service type 2 (e-commerce) or 5 (traditional), label size A5, 80x80 or 52x70 | |
| "Load GHN Areas" reads provinces and districts from GHN |

GHTK delivery method
API token, partner code, pickup or post-office drop, road or air, order tags and label layout.
| Tags such as 10 (buyer may see the goods) or 13 (call the shop if refused) | |
| Label PDF in A6 or A5, portrait or landscape |

All GHN and GHTK parcels in one list
Inventory -> Operations -> GHN / GHTK Shipments, with COD totals and filters for open, problem and idle parcels.
| Delivered rows green, problems and idle parcels red, cancelled grey |

Status history on the delivery
Each status with its time, reason and whether it came from a webhook or a status check.
| GHN statuses such as picking, delivering, delivery_fail, return and returned | |
| GHTK status codes, with shipper reports kept as information only, as GHTK advises | |
| "GHN Return" asks GHN to send a parcel back |
Labels
The GHTK label PDF lands in the chatter. For GHN, "Print GHN Label" opens the GHN print page (the link is valid for 30 minutes).
| Reprint any time from the delivery |

GHN provinces, districts and wards
The list GHN returns, with other spellings. Matching ignores accents and words like Quan or Phuong, so "Quan 1" also finds the accented GHN spelling.
| Add your own spellings in Other Names |

GHN district and ward on the contact
When an address is written differently from GHN, pick the district and ward once on the contact.

Idle shipment alert
A parcel whose status has not changed for the number of days you set gets flagged and a to-do activity for the person responsible.

API log for administrators
Every call with status and time. Tokens are sent as headers and never written to the log.
| Purged after 30 days |

How it works
| 1 | Get your keys. GHN: token and shop ID from your GHN account. GHTK: API token and partner code from the GHTK customer site. |
| 2 | Create the delivery method. Inventory -> Configuration -> Delivery Methods, provider GHN or GHTK. Paste the keys and press Test Connection. |
| 3 | GHN only: load areas. Press "Load GHN Areas". |
| 4 | Register the webhook. Copy the webhook URL from the delivery method into your GHN or GHTK account settings. |
| 5 | Ship. Write the ward in Street 2, the district in City and the province in State on your contacts, then validate deliveries as usual. |
Settings
| GHN token / shop ID | From GHN. The token is visible to administrators only |
| GHTK token / partner code | From GHTK. Administrators only |
| Webhook URL | One random secret per delivery method; "New Webhook Secret" replaces it |
| Collect COD | The order total is collected from the buyer |
| Shop pays shipping | Off: the buyer pays the fee on delivery |
| Declare value | Sends the order value for the carrier insurance fee |
| Idle after (days) | 3 by default |
| GHN required note / service type / label size | Values listed in the GHN API pages |
| GHTK pickup / transport / tags / label | Values listed in the GHTK API pages |
FAQ
Is Viettel Post included?
No. We only build against carrier API documentation that is open to read, and Viettel Post keeps its partner API documentation inside its partner portal.
Do I need GHN and GHTK accounts?
Yes, the module uses your own keys. Demo mode lets you try every screen first.
How are webhooks secured?
Neither carrier signs its callbacks, so each delivery method has a long random secret in its webhook URL. Odoo compares it in constant time and only updates deliveries of that delivery method.
What if a webhook is missed?
A scheduled check every two hours asks the carrier for the status of open parcels.
What should I check before going live?
Create one test order per service and label size you use in the carrier test environment, check the COD and fee, cancel it, then switch to production.
Compatibility and support
Odoo 19 Community and Enterprise. Needs Inventory, Sales and Delivery (Community apps).
Questions before or after you buy: modvantaapps@gmail.com. We answer setup questions and fix bugs.
Buy Now - $29Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module