Skip to main content

Support harmonized system codes against sales orders

Project description

License: MIT PyPI PEP

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inventree_harmonized_system_codes-1.1.0.tar.gz (150.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file inventree_harmonized_system_codes-1.1.0.tar.gz.

File metadata

File hashes

Hashes for inventree_harmonized_system_codes-1.1.0.tar.gz
Algorithm Hash digest
SHA256 fe340b93bacbc16c073ba298bc3f1c251086fdbf13ecfa5b42f0ded4fd312e2d
MD5 bd2487c5b2f4149a7f0d641db455c91b
BLAKE2b-256 5efab0427ba50a5715d9a60050e1c9c6103eff10ecba57258eaef1d82e9abb4a

See more details on using hashes here.

File details

Details for the file inventree_harmonized_system_codes-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for inventree_harmonized_system_codes-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8b922ae75c6b0da910af6c773898fa25e5486e2ef12d6a0b39e45cccbd1a9083
MD5 4be30e007237d4f8dfbbc608a7a39325
BLAKE2b-256 ca7b8c489ac48d3cf52b3f0457910860373fdc0030ffacbfa0ff2c4fb20b2e3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page