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.

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 inventree-harmonized-system-codes

Setup

Activate the Plugin

... todo ...

Run Migrations

... todo ...

Configuration

... todo ...

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-0.2.0.tar.gz (102.5 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-0.2.0.tar.gz.

File metadata

File hashes

Hashes for inventree_harmonized_system_codes-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e14977c0b4f8d2e0ad85abf836a4251418cc486d5cf2e2eb623322d33d237ad7
MD5 3befac418d02830389a2ce5ba9bed9f5
BLAKE2b-256 05d8afaff07cef6ab11ccd4651b96a54bf559cc73efdd4780eed472962e875b7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for inventree_harmonized_system_codes-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2af7a1f4f2fb26cfb91cb8d8f4fadabad4e310afeec698a8d813a73d8d30828c
MD5 d313558bbb0a41f4c9c949b6556517a9
BLAKE2b-256 2ee5ea5a9cbfc4c3108a6662d6b42d407ecf879b2197909cf66e33a6df3d7d79

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