Harmonized System Codes
An InvenTree plugin to support harmonized system codes (HS codes) against sales orders and shipments.
Compatibility
The following table outlines the compatibility of this plugin with different versions of InvenTree:
| Plugin Version | InvenTree Version |
|---|---|
| >= 1.0.0 | >= 1.3.1 |
| < 1.0.0 | >= 1.0.0 |
Installation
InvenTree Plugin Manager
The recommended method to install this plugin is via the InvenTree Plugin Manager.
Command Line
To install manually via the command line, run the following command:
pip install -U inventree-harmonized-system-codes
Usage
Specifying Harmonized System Codes
To specify Harmonized System Codes (HS codes) for parts, navigate to the "Harmonized System Codes" section in the InvenTree admin interface. Here, you can create new HS codes and associate them with specific part categories. You can also specify customer-specific HS codes if needed.
When creating or editing a part, ensure that the part is assigned to a category that has an associated HS code.
Customer Specific Codes
If desired, you can create customer-specific HS codes by selecting a customer when creating the HS code entry. This allows you to override the generic HS code for specific customers.
Report Template Tags
The plugin provides a custom template tag to extract the Harmonized System Code associated with any part in a report.
To use the template tag, first load the harmonized_codes template library at the top of your report template:
{% load harmonized_codes %}
Then, you can use the harmonized_code tag to retrieve the HS code for a given part. Note that the customer should also be supplied, in case there is a customer-specific HS code associated with the part.
For example, in the context of a SalesOrderShipment report:
{% for allocation in allocations.all %}
{% harmonized_code allocation.line.part customer=order.customer as hs_code %}
<tr>
<td>{{ allocation.line.part.full_name }}</td>
<td>{% if hs_code %}{{ hs_code.code }}{% else %}N/A{% endif %}</td>
</tr>
{% endfor %}
Metadata
Release files for inventree-harmonized-system-codes 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inventree_harmonized_system_codes-1.2.0.tar.gz | 151.1 kB | Without provenance | Details for inventree_harmonized_system_codes-1.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inventree_harmonized_system_codes-1.2.0-py3-none-any.whl | Python 3 | none | any | Details for inventree_harmonized_system_codes-1.2.0-py3-none-any.whl |
Total release size: 319.0 kB
Release files / inventree_harmonized_system_codes-1.2.0.tar.gz
| Download URL | inventree_harmonized_system_codes-1.2.0.tar.gz |
|---|---|
| Size | 151.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
325c172b9ecd767a8bc56bdf820b38bf0e227aed03a02a1b592264d92fdd17e3
|
|
BLAKE2b-256 checksum How to use checksums |
1791a19ac7bd21836dc8b0b0745a98931a782babcb5438079828aa87b23f1c4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / inventree_harmonized_system_codes-1.2.0-py3-none-any.whl
| Download URL | inventree_harmonized_system_codes-1.2.0-py3-none-any.whl |
|---|---|
| Size | 167.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e887f1f64cbbc5e14f056b67829e09d4437bf73c629f3c1e929a36f0f3bbc81
|
|
BLAKE2b-256 checksum How to use checksums |
118913a97e2592fce2c5a81e1781a158fe887cb7ae88cbf8b70a2aafb017bca3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for inventree-harmonized-system-codes 1.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.