DHL 整合

DHL 是 Odoo 的 库存 应用程序中提供*运输连接器*的运输承运商之一。通过在应用程序的设置中启用运输连接器,并配置至少一种 运输方法计算运费 和 :doc:`生成运输标签<labels>`的过程大大简化。

注解

While a variety of shipping connectors are available for different carriers, this documentation details the configuration settings specific to integrating DHL. For instructions on configuring the integration settings common to all shippers, see the documentation on third-party shippers.

Enable DHL shipping connector

Before creating a DHL shipping method, it is necessary to enable the carrier’s shipping connector. To do so, navigate to Inventory app ‣ Configuration ‣ Settings.

Scroll down to the Shipping Connectors section, and tick the checkbox next to DHL Express Connector. Finally, click Save to apply the changes.

Once the connector has been enabled, a DHL Shipping Methods link appears below. Click the link to open a page showing all shipping methods configured for DHL.

Configure DHL shipping method

After enabling the shipping connector for DHL, shipping methods can be configured for the carrier. Once configured, a shipping method can be added as a line item to sales orders (SOs), which allows for automatic computation of shipping rates, and generation of shipping labels.

To create a new DHL shipping method, navigate to Inventory app ‣ Configuration ‣ Settings. In the Shipping Connectors section, select the DHL Shipping Methods link below the DHL Express Connector checkbox.

注解

It is also possible to see existing shipping methods for every carrier, by navigating to Inventory app ‣ Configuration ‣ Shipping Methods.

Click New to open a blank shipping method form. If a shipping method has already been created, it can be selected from this screen.

The form for a DHL shipping method.

一般信息

Begin configuring the shipping method by entering its title in the Shipping Method field.

In the Provider drop-down menu, select the DHL option. After doing so, a new DHL Configuration tab appears at the bottom of the form.

All other fields in this section are identical on the shipping method forms for each shipping carrier. See the documentation on third-party shippers for instructions on how to properly configure them.

DHL配置

The DHL Configuration tab on the shipping method form is used to connect the user’s DHL account to Odoo, and configure the shipping method’s details.

DHL SiteID, password, and account number

A DHL SiteID, password, and account number are used to link a DHL account with third-party services, like Odoo’s Inventory app. The SiteID and password are different credentials than the ones used to log in to a DHL account.

To obtain a DHL SiteID, password, and account number, it is necessary to register on the DHL API Developer Portal, by filling out the following information:

  • First name

  • Last name

  • 电子邮件地址

  • 用户名

  • 公司名称

  • 国家/地区

填写完所有字段后,在 我已阅读并接受使用条款和隐私政策`复选框上打勾,然后点击 :guilabel:`发送 进行注册。

注册后,系统会发送一封确认电子邮件来验证申请。点击电子邮件中的链接,激活开发者门户账户并设置密码。

此电子邮件还包括开发者门户账户的账号。请在运送方式表单的 DHL 账号 字段中输入该号码。

确认开发者门户账户后,使用用户名和密码登录门户。点击屏幕右上角的用户头像,打开用户仪表板。

On the dashboard, click on the Apps tab, and select an app. In the Credentials section, click the Show key button below the API Key and API Secret fields.

Return to the shipping method form in the Odoo database. Enter the DHL API Key in the DHL SiteID field, and the API Secret in the DHL Password field.

Shipping details

The rest of the fields in the DHL Configuration tab are used to configure the shipping method itself:

  • Region: the region in which the shipping method is used.

  • DHL Product: the shipping service purchased from DHL (e.g. Express Worldwide).

  • DHL Package Type: the type of DHL package used for delivery (e.g. DHL Box).

  • Package Weight Unit: the unit of measure used to display package weight.

  • Package Dimension Unit: the unit of measure used to display package size.

  • Label Format: the file format used to generate shipping labels.

  • Label Template: the paper size used to print shipping labels.

重要

Before selecting service options for a shipping method, make sure those services are actually available for the DHL account. Available services depend on the contract negotiated with DHL.

选项

Additional settings are available in the Options section at the bottom of the DHL Configuration tab:

  • Generate Return Label: Enable this option to automatically generate a return label after validating a delivery order.

  • Dutiable Material: Enable this option if the shipping method is liable to customs or other duties.