Support harmonized system codes against sales orders
Project description
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 %}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file inventree_harmonized_system_codes-1.2.0.tar.gz.
File metadata
- Download URL: inventree_harmonized_system_codes-1.2.0.tar.gz
- Upload date:
- Size: 151.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
325c172b9ecd767a8bc56bdf820b38bf0e227aed03a02a1b592264d92fdd17e3
|
|
| MD5 |
1b960888ec49a07f74868cfdf24dd1ff
|
|
| BLAKE2b-256 |
1791a19ac7bd21836dc8b0b0745a98931a782babcb5438079828aa87b23f1c4d
|
File details
Details for the file inventree_harmonized_system_codes-1.2.0-py3-none-any.whl.
File metadata
- Download URL: inventree_harmonized_system_codes-1.2.0-py3-none-any.whl
- Upload date:
- Size: 167.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e887f1f64cbbc5e14f056b67829e09d4437bf73c629f3c1e929a36f0f3bbc81
|
|
| MD5 |
aa7c057d4d4606fec5706720eda6bc77
|
|
| BLAKE2b-256 |
118913a97e2592fce2c5a81e1781a158fe887cb7ae88cbf8b70a2aafb017bca3
|