Skip to main content

Provide consolidated line items for Sales Order Shipment reports

Project description

License: MIT PyPI PEP

Consolidated Shipment Lines

This InvenTree plugin provides consolidated line items for Sales Order Shipment reports.

Where multiple stock items are allocated against a single line item in a sales order, this plugin will consolidate those allocations into a single group for the purpose of shipment reporting.

This allows grouping of allocated stock items into a single line item in the shipment report, rather than listing each individual stock item separately.

Installation

InvenTree Plugin Manager

The recommended installation method is via the InvenTree Plugin Manager.

Command Line

To install manually via the command line, run the following command:

pip install inventree-consolidated-shipment-lines

Configuration

... todo ...

Usage

When installed and activated, this plugin will automatically provide the context variable consolidated_line_items to any report template which is associated with a Sales Order Shipment.

This consolidated_line_items variable is a list of Python dict objects, where each element in the list has the folowing structure:

{
    "line_item": <SalesOrderLineItem instance>,
    "stock_items": [<StockItem instance>, ...],
    "quantity": <total quantity allocated>,
    "serial_numbers": <serial number string>,
}

The list of consolidated line items can be iterated over in the report template to generate custom reports:

<table>
    <thead>
        <tr>
            <th>Reference</th>
            <th>Part</th>
            <th>Quantity</th>
            <th>Serial Numbers</th>
        </tr>
    </thead>
    <tbody>
    {% for entry in consolidated_line_items %}
        <tr>
            <td>{{ entry.line_item.reference }}</td>
            <td>{{ entry.line_item.part.name }}</td>
            <td>{{ entry.quantity }}</td>
            <td>{{ entry.serial_numbers }}</td>
        </tr>
    {% endfor %}
    </tbody>
</table>

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

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_consolidated_shipment_lines-0.3.2.tar.gz.

File metadata

File hashes

Hashes for inventree_consolidated_shipment_lines-0.3.2.tar.gz
Algorithm Hash digest
SHA256 2ed1eb2f5350e604673f343da3684d0e06a4c72957d15ccf2c7310851d74759a
MD5 8830f6973147459880a2e54f5bb4938f
BLAKE2b-256 b7fe994589a2b22348e16a46955fded8059158363ee3476baa8896e56667aa19

See more details on using hashes here.

File details

Details for the file inventree_consolidated_shipment_lines-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for inventree_consolidated_shipment_lines-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fbf19ecff0476f8b0a9d37cd68c715ec7932b531c2450fb686259b1f805edf39
MD5 a0558161a3a1cd46351e9f08b85f4b5c
BLAKE2b-256 a37d422a751b18ec35e8e4f8836bf1a4726aeaaf47a0d0c0d3feb7b0b8e52911

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