mirror of
https://github.com/inventree/inventree-website.git
synced 2026-11-28 00:48:45 +00:00
Zensical Refactor (#300)
* refactor into zensical * adjust nav layout * more nav changes * update features page * open external hero links in new tab * consolidate small pages * add legacy page redirects * tweak content * further cleanup * adjust netlify config * disable redirect * remove redirect script * fix tag splitting for plugins * Display plugin metadata on left-hand side * revert icon changes * move gallery to index page * Add page deascriptions * fix image size for carousel * adjust theme
This commit is contained in:
1 parent
372cc20788
commit
dd7d563e79
347 files changed
+3009
-17807
No files matched your search
@@ -0,0 +1,2 @@
|
||||
# Default front matter for all plugin entries in this directory
|
||||
template: plugin.html
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Plugins by Category
|
||||
template: main.html
|
||||
render_macros: true
|
||||
description: "Community plugins for InvenTree, grouped by category."
|
||||
---
|
||||
|
||||
# Plugins by Category
|
||||
|
||||
The full list of plugins is available on the main [plugin list](community.md) page. Click on a category to jump to the plugins that are marked with it.
|
||||
|
||||
{{ plugin_index('categories') }}
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
title: Community Plugins
|
||||
template: main.html
|
||||
render_macros: true
|
||||
description: "Browse plugins for InvenTree developed by the community."
|
||||
---
|
||||
|
||||
# Community Plugins
|
||||
|
||||
The plugins below have been developed by the InvenTree community. To add your own plugin to this list, follow the [instructions on GitHub](https://github.com/inventree/inventree-website#adding-a-plugin-to-the-list).
|
||||
You can also browse plugins [by category](categories.md), [by tag](tags.md) or [by publisher](publishers.md).
|
||||
|
||||
!!! warning "Community plugins"
|
||||
Being on this list does not mean that the plugin is officially supported by the InvenTree core team. We also do not check for security, privacy or performance issues or compatibility with the latest InvenTree version.
|
||||
|
||||
{{ plugin_cards() }}
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
title: Plugins
|
||||
template: main.html
|
||||
description: "Extend InvenTree with plugins - add UI panels, integrations, label printers, barcode formats and more - or create your own."
|
||||
---
|
||||
|
||||
# Plugins
|
||||
|
||||
InvenTree is a modular application with a powerful plugin system. Plugins run inside the InvenTree server and can extend almost every part of it, without any changes to the core code. Plugins can:
|
||||
|
||||
- **Extend the user interface**: add custom panels, dashboard widgets, navigation items and settings pages
|
||||
- **React to events**: run custom code when parts, stock items or orders are created or changed
|
||||
- **Integrate with external systems**: connect to suppliers, ERP, accounting or notification services
|
||||
- **Print and report**: add label printer drivers, custom report templates and data exports
|
||||
- **Scan barcodes**: support custom barcode formats and supplier barcodes
|
||||
- **Add API endpoints and URLs**: expose new functionality to other applications
|
||||
- **Run scheduled tasks** and **validate data** against your own business rules
|
||||
|
||||
Plugins are standard Python packages, and can be installed from PyPI via the InvenTree admin interface, or placed in the plugins directory of your installation.
|
||||
Read more about the [plugin architecture](https://docs.inventree.org/en/stable/plugins/) and [installing plugins](https://docs.inventree.org/en/stable/plugins/install/) in the documentation.
|
||||
|
||||
## Create Your Own Plugin
|
||||
|
||||
The [InvenTree Plugin Creator](https://github.com/inventree/plugin-creator) is a command line tool which scaffolds a new plugin in a few seconds - select the features you need, and it generates a ready-to-develop project. Refer to the [plugin creator guide](https://docs.inventree.org/en/stable/plugins/creator/) and the [plugin walkthrough](https://docs.inventree.org/en/stable/plugins/walkthrough/) to get started.
|
||||
|
||||
Once your plugin is published, add it to the [community plugin list](community.md) by following the [instructions on GitHub](https://github.com/inventree/inventree-website#adding-a-plugin-to-the-list).
|
||||
|
||||
## Community Plugins
|
||||
|
||||
Browse the [community plugin list](community.md) to find plugins developed by the InvenTree community, or browse them [by category](categories.md), [by tag](tags.md) or [by publisher](publishers.md).
|
||||
@@ -0,0 +1,356 @@
|
||||
---
|
||||
name: InvenTree Advanced Sheet Label # Name of the plugin (should be either NAME, TITLE or SLUG)
|
||||
author: melektron # Maintainer must be the same as the publisher reference
|
||||
license: MIT # License, we prefer open source
|
||||
open_source: true # Is this project licensed with an OSI-approved license - aka 'open source'
|
||||
stable: true # Is this project stable? Should users deploy this in their instance?
|
||||
maintained: true # Is this project maintained?
|
||||
pypi: true # Is available via PyPi
|
||||
package_name: inventree-adv-sheet-label # Name of the package on the index, required if pypi true
|
||||
github: https://github.com/melektron/inventree-adv-sheet-label/ # Ĺink to repo in GitHub, one of github, gitlab or source is required
|
||||
issue_tracker: https://github.com/melektron/inventree-adv-sheet-label/issues # Link to Issue tracker, optional
|
||||
website: https://elektron.work # Website, full path with protocol, optional
|
||||
categories: # Mixins/integrations that are used, optional
|
||||
- Label
|
||||
- Settings
|
||||
tags: # Freetext tags - treat them like kewords, optional
|
||||
- Sheet layout
|
||||
- Office
|
||||
- Printing
|
||||
- Label
|
||||
---
|
||||
|
||||
A label printing plugin for [InvenTree](https://inventree.org) which provides support for printing labels on off-the-shelf label sheet layouts and adds some more useful features compared to the sheet label plugin included with InvenTree.
|
||||
|
||||
## Index
|
||||
|
||||
1. [Installation](#installation)
|
||||
1. [Usage and Features](#usage-and-features)
|
||||
1. [Sheet layout](#sheet-layout)
|
||||
1. [Number of labels](#number-of-labels)
|
||||
1. [Skip label positions](#skip-label-positions)
|
||||
1. [Ignore label size mismatch](#ignore-label-size-mismatch)
|
||||
1. [Print border](#print-border)
|
||||
1. [Label fill color](#label-fill-color)
|
||||
1. [Errors](#errors)
|
||||
1. [Settings](#settings)
|
||||
1. [Default sheet layout](#default-sheet-layout)
|
||||
1. [Printer offset X / Y](#printer-offset-x-y)
|
||||
1. [Contribution](#contribution)
|
||||
1. [Reporting and fixing bugs](#reporting-and-fixing-bugs)
|
||||
1. [Adding new layouts](#adding-new-layouts)
|
||||
1. [Plugin development setup](#plugin-development-setup)
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
> [!NOTE]
|
||||
> The latest version of this plugin currently supports the following InvenTree versions:
|
||||
> - **1.5.x** (tested with version **1.5.0**)
|
||||
> - **1.3.x** (tested with version **1.3.0** and **1.3.2**)
|
||||
> - **1.2.x** (tested with version **1.2.0**)
|
||||
> - **1.1.x** (tested with version **1.1.3**)
|
||||
> - **1.0.x** (tested with version **1.0.5**)
|
||||
>
|
||||
> For older InvenTree versions, use version `1.2.2`, which supports the following InvenTree versions:
|
||||
> - **0.17.x** (tested with version **0.17.14**)
|
||||
> - **0.16.x** (tested with version **0.16.5**)
|
||||
> - **0.15.x**
|
||||
>
|
||||
> Some even older or newer versions might also work, but have not been tested.
|
||||
>
|
||||
> If you are having trouble installing, see [Common Issues](#common-issues) for possible solutions or create an issue.
|
||||
|
||||
The simplest and recommended way of installing is by using the ```Install Plugin``` button above the plugins table on the InvenTree ```Plugins``` page in the ```Admin Center``` and then entering the package name:
|
||||
|
||||

|
||||
|
||||
|
||||
Alternatively you can add the package name to your plugins.txt file (this is automatically done when using the UI method) to install automatically when using the ```invoke install``` command:
|
||||
|
||||
```
|
||||
inventree-adv-sheet-label
|
||||
```
|
||||
|
||||
Or, you can install this plugin manually in the InvenTree server AND worker container as follows (not recommended for production):
|
||||
|
||||
```bash
|
||||
pip install inventree-adv-sheet-label
|
||||
```
|
||||
|
||||
In any case, after installation, the plugin needs to be enabled in the above mentioned plugin settings page:
|
||||
|
||||

|
||||
|
||||
## Usage and Features
|
||||
|
||||
This plugin adds the "AdvancedLabelSheet" printing option to the label printing dialog:
|
||||
|
||||

|
||||
|
||||
Printing with this plugin generates a PDF file which will be opened in a new tab in order to subsequently be printed using a regular office printer.
|
||||
|
||||
Rendering should not take longer than a few seconds, usually less than two.
|
||||
|
||||
### Sheet layout
|
||||
|
||||
Unlike the builtin sheet label printing plugin of InvenTree, this plugin presents a selection of preconfigured sheet label layout options corresponding to various kinds of off-the-shelf label printing paper that can be purchased from most office supply shops and easily printed on any standard 2D printer.
|
||||
|
||||
You can select the layout corresponding your paper in the ```Sheet layout``` dropdown:
|
||||
|
||||

|
||||
|
||||
These layouts are identified by a several digit number written on the paper packaging, which (as far as I can tell) is unique to the layout independent of the manufacturer (at least where I live). The identifier is however just a string, so any other scheme can also be used in the future.
|
||||
|
||||
The dropdown list also shows some additional information about the layout for orientation:
|
||||
|
||||
- Paper size (e.g. A4)
|
||||
- Dimensions of the individual labels
|
||||
- How many rows and columns are on one page
|
||||
- Whether the labels have rounded corners
|
||||
|
||||
Currently supported layouts:
|
||||
|
||||
| Layout Identifier | Paper size | Label dimensions | Label layout | Corner style |
|
||||
| ----------------------- | ---------- | ---------------- | ------------------- | ------------ |
|
||||
| 8160 | US Letter | 66.7mm x 25.4mm | 3 columns x 10 rows | round |
|
||||
| 22805 | US Letter | 37.0mm x 37.0mm | 4 columns x 6 rows | sharp |
|
||||
| 4780 | A4 | 48.5mm x 25.4mm | 4 columns x 10 rows | sharp |
|
||||
| 4737 | A4 | 63.5mm x 29.6mm | 3 columns x 9 rows | round |
|
||||
| 4201 | A4 | 45.7mm x 16.9mm | 4 columns x 16 rows | round |
|
||||
| 7120-25 | A4 | 35.0mm x 35.0mm | 5 columns x 7 rows | sharp |
|
||||
| 7160-10 | A4 | 63.5mm x 38.1mm | 3 columns x 7 rows | round |
|
||||
| 4360 | A4 | 70.0mm x 36.0mm | 3 columns x 8 rows | sharp |
|
||||
| 1367853 | A4 | 48.5mm x 16.9mm | 4 columns x 16 rows | sharp |
|
||||
| 4210 | A4 | 38.1mm x 12.7mm | 5 columns x 22 rows | sharp |
|
||||
| 1367586 | A4 | 70.0mm x 36.0mm | 3 columns x 8 rows | sharp |
|
||||
| 8724 | A4 | 46.0mm x 11.1mm | 4 columns x 21 rows | round |
|
||||
| Avery 50x25-R | A4 | 50.0mm x 25.0mm | 3 columns x 8 rows | round |
|
||||
| Avery 105x42-R | A4 | 105.0mm x 42.0mm | 2 columns x 7 rows | sharp |
|
||||
| Avery 40x12-R | A4 | 40.0mm x 12.0mm | 4 columns x 17 rows | round |
|
||||
| 8698 | A4 | 52.5mm x 29.7mm | 4 columns x 10 rows | sharp |
|
||||
| HERMA 4336 / Avery 4732 | A4 | 35.6mm x 16.9mm | 5 columns x 16 rows | round |
|
||||
| Avery L7163 / J8163 | A4 | 99.1mm x 38.1mm | 2 columns x 7 rows | sharp |
|
||||
|
||||
|
||||
This selection is limited to whatever users of this plugin have contributed. If the paper layout you need is not included, please file an [Issue with the "Sheet Layout" template](https://github.com/melektron/inventree-adv-sheet-label/issues/new?assignees=melektron&labels=sheet+layout&projects=&template=sheet-layout.md&title=New+Sheet+layout%3A+%5Blayout+name%5D) or - even better - contribute it yourself. See the [Adding new layouts](#adding-new-layouts) section for details.
|
||||
|
||||
You can also select one of the two ```Auto``` sheet layout presets. These will automatically select the correct sheet layout for the label template you are printing. This is done in one of three ways:
|
||||
|
||||
- If you have a specific layout that's always used for a specific template, you can add the ```{"sheet_layout": "..."}``` metadata key to your label template configuration (replace ... with the identifier of the layout. This might not be the same as the display name, see [here](https://github.com/melektron/inventree-adv-sheet-label/blob/main/advanced_sheet_label/layouts.py#L77) what the identifier is). This is the cleanest way configure the correct layout for your templates, but it is no longer easily available as of InvenTree version `1.0.0` due to the Django admin UI being removed.
|
||||
- If the selected template template has no such metadata, the plugin will attempt to find a layout with exactly the required label size and use that one. If multiple matches are found, the first one is selected while preferring ones with round or sharp corners depending on your selection.
|
||||
- If no exact matches are found, the closest layout that can fit your label template will be selected and shown to the user in an error message. The user can then decide to use this option by selecting the ['Ignore label size mismatch'](#ignore-label-size-mismatch) switch.
|
||||
|
||||
|
||||
### Number of labels
|
||||
|
||||
The ```Number of labels``` field lets you print multiple of the same label in one go. By default, the number of labels printed is 1, resulting in an output like this:
|
||||
|
||||

|
||||
(The label template is only an example and this is only part of a page)
|
||||
|
||||
Let's say you want to print two of the same label. By entering the desired amount in the field, multiple of the same label will be printed at once, of course arranged according to the selected layout:
|
||||
|
||||

|
||||
|
||||
If you are printing labels for multiple items at once, such as for an entire selection of parts, this amount is applied to all items. For example, lets print two labels for each of those four capacitors:
|
||||
|
||||

|
||||

|
||||
|
||||
This results in a printout looking like this:
|
||||
|
||||

|
||||
|
||||
You can also specify to print zero labels. This is useful in combination with the "Skip label positions" and "Debug: Print border" options to print an empty grid of cells for testing.
|
||||
|
||||
### Skip label positions
|
||||
|
||||
When printing on label sheets, it is likely that you don't use up the entire sheet of labels at once. Maybe you only want to print a single label and then another one later. To do so, you can enter the number of labels on a sheet that are already used up in the ```Skip label positions``` fields (counting from top left to bottom right). These positions are then skipped and labels will start to print at the next unused position. This also works when printing multiple labels.
|
||||
|
||||
For example, let's assume the first two labels are already used up and we want to start printing at the third one:
|
||||
|
||||

|
||||
|
||||
This results in the following output:
|
||||
|
||||

|
||||
|
||||
When printing small labels with many of them on a single sheet, it can be confusing and annoying to keep track of the amount of labels skipped. Since this is such a common task, the plugin automatically remembers how many labels have been used up already and populates the ```Skip label positions``` field with the correct number of labels to skip after the previous printing operations. For example, after the above shown printing operation, the plugin automatically remembers that next time, it needs to skip four labels and pre-populates the field with that value:
|
||||
|
||||

|
||||
|
||||
When an entire page or more is used up, this counter automatically wraps around to the correct value for the next page.
|
||||
|
||||
Of course, this feature only makes sense when printing a lot of labels on the same label sheet (and therefore label sheet layout) back-to-back. Since this value is stored only once globally, when switching between different label sheets (for example because multiple users are printing on different sheets at once) the value is probably not accurate and needs to be manually checked and possibly adjusted each time.
|
||||
|
||||
|
||||
### Ignore label size mismatch
|
||||
|
||||
To ensure the desired result, the plugin automatically check whether the size of the label according to the selected template matches the size of the labels on the selected sheet layout.
|
||||
|
||||
If that is not the case, the user is presented with an error message. This can happen in a few different scenarios:
|
||||
|
||||
- Manually selecting a sheet layout that doesn't match the label template: 
|
||||
- When automatic layout selection is enabled and the label template specifies a sheet layout but its label size does not match that of the template (no longer relevant as of InvenTree `1.0.0`): 
|
||||
- When automatic layout selection is enabled but the label template doesn't specify any layout in the metadata and no exact size match was found: 
|
||||
|
||||
In any of these cases, you might want to continue anyway, e.g. because you may not have the correct sheet at hand. To do so, you can enable the ```Ignore label size mismatch``` switch to override these safety checks and print anyway. If the label template doesn't fit exactly, it is aligned at the top left corner of the physical label. The result might look something like this:
|
||||
|
||||

|
||||
|
||||
|
||||
### Print border
|
||||
|
||||
When debugging or testing your sheet layouts and templates, it might be useful to see the shape of the physical label (e.g. for the previous image). For this purpose, you can enable the ```Debug: Print border``` switch, to print a 0.25mm border around the label. This border is aligned on the INSIDE of the label, so it doesn't overlap other labels but will cover up a tiny bit of area on the edge of your label. The scale and position of the label content are not affected by the border.
|
||||
|
||||
When skipping labels, the skipped positions also have a border.
|
||||
|
||||
The result looks something like this:
|
||||
|
||||

|
||||
|
||||
|
||||
### Label fill color
|
||||
|
||||
Similarly to the border, you might want to fill the background of the labels with a color to debug your template and see what is covered. This can be achieved by entering the desired color in the ```Debug: Label fill color``` field. Any CSS color string is valid. To have no fill color, use the value "unset", which is also the default. Leaving the field empty doesn't work unfortunately since I wasn't able to get the form to accept an empty field.
|
||||
|
||||
The result might look something like this with color "lightgreen":
|
||||
|
||||

|
||||
(White lines between rows are just rendering defects of my browser)
|
||||
|
||||
You can also combine this option with the border.
|
||||
|
||||
|
||||
## Errors
|
||||
|
||||
In addition to the errors covered in section [Ignore label size mismatch](#ignore-label-size-mismatch) you might encounter the following error messages when printing:
|
||||
|
||||
- **Sheet layout '[sheet_layout_code]' does not exist.**: This means that an API request was received with an invalid sheet layout in the selection. During normal operation, this should never happen because the dropdown list is automatically populated with all valid options. If you are using the API from a 3rd party application, this could mean that the application has requested to print using a sheet layout which is either not supported by this plugin or the application has a typo in the sheet layout code.
|
||||
- **No labels were generated**: This means that you are not printing any labels (Number of labels = 0) and are not generating any empty fields either (Skip label positions = 0). This would result in a blank page and is likely not what you want.
|
||||
- **Error printing label**: This error along with another error box containing a Python exception string means that something has gone wrong in the plugin code that is not an intentional error message. Example: If you see this, feel free to file a bug report. See [Reporting and fixing bugs](#reporting-and-fixing-bugs) on how to do so.
|
||||
|
||||
|
||||
## Settings
|
||||
|
||||
This section describes the settings available in the plugins settings page.
|
||||
|
||||
### Default sheet layout
|
||||
|
||||
This setting allows you to specify which sheet layout is selected by default when opening the printing dialog. It makes sense to set this either to some *Auto* option or to the layout you are using the most. The default is ```Auto (round)```, which is probably fine for most use-cases.
|
||||
|
||||
### Printer offset X / Y
|
||||
|
||||
Most office printers do not place the page exactly where the PDF says, so a sheet that is geometrically correct can still print a millimeter or two off the die. These two settings shift the whole label grid to compensate, in mm: positive X moves labels right, positive Y moves them down. Both default to 0.
|
||||
|
||||
This is a property of your *printer*, not of the label sheet, which is why it is a global setting rather than part of a layout definition — the same correction applies whichever sheet layout you print.
|
||||
|
||||
To calibrate, print one sheet on plain paper at 100% scaling (scaling must be off, or the measurement is meaningless), hold it against a real label sheet, and measure the offset. If the labels land 2mm too high, set ```Printer offset Y``` to ```2```.
|
||||
|
||||
|
||||
## Common Issues
|
||||
|
||||
### "No matching distributionfound" / "Could not find a version that satisfies the requirement"
|
||||
|
||||
This means that the Python version installed on the InvenTree host is too old for the plugin. This error may occur when trying to install plugin versions up to `1.2.2` on an InvenTree instance installed bare-metal or via the package installer on a system with Python 3.9. This is because the plugin used to require Python >= 3.11, which is the version used in the containers, therefore working for most setups. As of plugin version `1.3.0`, the version requirement has been reduced, and this should no longer occur.
|
||||
|
||||
|
||||
## Contribution
|
||||
|
||||
If you have ideas for new features, found typos, have encountered a bug or want to add more sheet layouts, feel free to contribute to this plugin by [filing an Issue](https://github.com/melektron/inventree-adv-sheet-label/issues/new/choose) or [creating a Pull Request](https://github.com/melektron/inventree-adv-sheet-label/compare). See [Plugin development setup](#plugin-development-setup) to learn how you can set up your development environment to test your modifications.
|
||||
|
||||
See the below information and instructions for common contribution types.
|
||||
|
||||
### Reporting and fixing bugs
|
||||
|
||||
If you have encountered a problem or a bug with the plugin, please file an [Issue with the Bug Report template](https://github.com/melektron/inventree-adv-sheet-label/issues/new?assignees=melektron&labels=bug&projects=&template=bug-report.md&title=).
|
||||
|
||||
The template requires you to provide a screenshot of your label template configuration. You can get this by going to https://your.inventree.url/web/settings/admin/labels and `Edit`ing the template in question. You need administrator privileges to do this. If you don't have them, ask your administrator. This page might look something like this:
|
||||
|
||||

|
||||
|
||||
In addition to this screenshot, you will be asked to attach the label template file which can be downloaded by clicking on the Template in the list and copying the code. Please make sure this file doesn't contain any confidential data and remove it if it does.
|
||||
|
||||
You will also be asked to provide some other information about when and how the bug ocurred which is described in the template.
|
||||
|
||||
#### PRs
|
||||
|
||||
If you know how to fix a bug, feel free to [create a Pull Request](https://github.com/melektron/inventree-adv-sheet-label/compare) with the solution.
|
||||
|
||||
### Adding new layouts
|
||||
|
||||
If you have a label paper layout that is not yet supported by this plugin, please [file an Issue with the Sheet Layout template](https://github.com/melektron/inventree-adv-sheet-label/issues/new?assignees=melektron&labels=sheet+layout&projects=&template=sheet-layout.md&title=New+Sheet+layout%3A+%5Blayout+name%5D)
|
||||
|
||||
In the template you will be asked to provide some basic information about the sheet layout such as possible manufacturers/suppliers and where the product can be purchased.
|
||||
|
||||
Then, you will be presented with a code template of a layout configuration which you must fill out with your values. The options are commented and mostly self-explanatory.
|
||||
|
||||
If your layout uses a page size that has never been used before, you will also be asked to define the paper format with a name and its dimensions. Otherwise you can simply reference an existing format and omit that part of the issue template.
|
||||
|
||||
#### Adding sheet layouts yourself
|
||||
|
||||
We will review your layout and add it to the main plugin distribution as soon as possible. However, if you need the layout immediately and cannot wait for it to be added officially, you can fork the repository and include it yourself.
|
||||
|
||||
To do so, you can edit the [advanced_sheet_label/layouts.py](https://github.com/melektron/inventree-adv-sheet-label/blob/main/advanced_sheet_label/layouts.py) file. In there you will find a dictionary of all defined paper sizes and a dictionary of all defined sheet layouts. After filling out the code in the Issue template, you can simply append the new definitions at the end of the dictionaries.
|
||||
|
||||
```python
|
||||
# ... more file content
|
||||
|
||||
PAPER_SIZES = {
|
||||
"A4": PaperSize("A4", 210, 297)
|
||||
# ... possibly more paper sizes
|
||||
# add your new paper size here if required
|
||||
}
|
||||
|
||||
LAYOUTS = {
|
||||
"4780": SheetLayout(
|
||||
display_name="4780",
|
||||
page_size=PAPER_SIZES["A4"],
|
||||
label_width=48.5,
|
||||
label_height=25.4,
|
||||
columns=4,
|
||||
rows=10,
|
||||
column_spacing=0,
|
||||
row_spacing=0,
|
||||
corner_radius=0
|
||||
),
|
||||
# ... more sheet layouts
|
||||
# add your new sheet layout here
|
||||
}
|
||||
|
||||
# ... more file content
|
||||
```
|
||||
|
||||
Make sure that the layout codes (the strings before the colon) are UNIQUE, otherwise the plugin will not work.
|
||||
|
||||
To install the modified plugin in your InvenTree instance, simply enter **YOUR** repository link instead of the package name in the installation modal. Example with this repository:
|
||||
|
||||

|
||||
|
||||
> Make sure to uninstall the official plugin before you install your fork, otherwise they will conflict!
|
||||
|
||||
> Plugins installed in this way seem to not be added to plugins.txt file properly in InvenTree version `1.0.5+`. For me, I have been able to install the plugin directly from GitHub by stopping the InvenTree server, adding the URL to the plugins.txt file and then running `invoke plugins`.
|
||||
> Alternatively, you can install it directly using pip:
|
||||
> ```bash
|
||||
> pip uninstall inventree-adv-sheet-label # uninstall normal package
|
||||
> pip install git+https://github.com/melektron/inventree-adv-sheet-label.git
|
||||
> ```
|
||||
> You have to adjust the link to your repo.
|
||||
|
||||
If you have added a sheet layout yourself, you are still encouraged to [create a Pull Request](https://github.com/melektron/inventree-adv-sheet-label/compare) with your changes so the changes can be added to the mainline plugin for everyone to benefit.
|
||||
|
||||
|
||||
## Plugin development setup
|
||||
|
||||
When making bigger changes than just adding layouts, it is recommended to set up a proper development environment.
|
||||
|
||||
To develop the plugin, setup an InvenTree development instance using devcontainers according to this [this](https://docs.inventree.org/en/stable/develop/devcontainer/) official documentation. It is also recommended to setup the example dataset for experimenting.
|
||||
|
||||
Then clone this repo (or your fork) separately on your host computer and link it to the devserver according to [the documentation](https://docs.inventree.org/en/stable/develop/devcontainer/#plugin-development).
|
||||
|
||||
It is also recommended to save the workspace as a file (maybe somewhere in inventree repo but don't commit it) and include the intellisenseconfig as well as editor layout there.
|
||||
|
||||
The InvenTree intellisense path might be something like ```/home/inventree/src/backend/InvenTree``` instead of the path from the documentation.
|
||||
|
||||
After that, start the InvenTree server with the debugger and the plugin should now be usable and debugable.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: InvenTree Apprise
|
||||
author: matmair
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-apprise
|
||||
github: https://github.com/matmair/inventree-apprise
|
||||
issue_tracker: https://github.com/matmair/inventree-apprise/issues
|
||||
website: https://mjmair.com
|
||||
categories:
|
||||
- Notifications
|
||||
tags:
|
||||
- Apprise
|
||||
- 3rd party integration
|
||||
- Discord
|
||||
- IFTTT
|
||||
- Matrix
|
||||
- Microsoft Teams
|
||||
- Slack
|
||||
- Twilio
|
||||
---
|
||||
Send notifications from InvenTree via Apprise
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install this plugin in the webinterface with the packagename `inventree-apprise`
|
||||
|
||||
1. Enable the plugin in the plugin settings. You need to be signed in as a superuser for this.
|
||||
**The server will restart if you enable the plugin**
|
||||
|
||||
1. Add all endpoints you want to use in the plugin settings. You can use the [Apprise URL Syntax](https://github.com/caronc/apprise#supported-notifications).
|
||||
|
||||
## License
|
||||
This project is licensed as MIT. Copy and do what you want - maybe tag your new plugin so others can find it. The more the merrier.
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: inventree-brother-plugin
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: false
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-brother-plugin
|
||||
github: https://github.com/inventree/inventree-brother-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/inventree/inventree-brother-plugin/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Printer
|
||||
tags:
|
||||
- Label
|
||||
- Printer
|
||||
- Brother
|
||||
---
|
||||
Brother label printer plugin for InvenTree
|
||||
|
||||
A label printing plugin for [InvenTree](https://inventree.org), which provides support for the [Brother label printers](https://www.brother.com.au/en/products/all-labellers/labellers).
|
||||
|
||||
This plugin supports printing to *some* Brother label printers with network (wired or WiFi) support. Refer to the [brother_ql docs](https://github.com/pklaus/brother_ql/blob/master/brother_ql/models.py) for a list of label printers which are directly supported.
|
||||
|
||||
## Installation
|
||||
|
||||
Install this plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-brother-plugin
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file to install automatically using the `invoke install` command:
|
||||
|
||||
```
|
||||
inventree-brother-plugin
|
||||
```
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: inventree-bulk-plugin
|
||||
author: wolflu05
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-bulk-plugin
|
||||
github: https://github.com/wolflu05/inventree-bulk-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/wolflu05/inventree-bulk-plugin/issues
|
||||
website:
|
||||
categories:
|
||||
- AppMixin
|
||||
tags:
|
||||
- Bulk
|
||||
- Stock
|
||||
- Part
|
||||
- Locations
|
||||
---
|
||||
Bulk creation plugin for InvenTree
|
||||
|
||||
# inventree-bulk-plugin
|
||||
|
||||
[](https://opensource.org/licenses/MIT)
|
||||

|
||||
|
||||
This plugin helps you bulk create storage locations and part categories in [InvenTree](https://inventree.org/) by using customized naming strategies. That means you not only have the option to generate multidimensional\* names for stock locations or part categories, but also have the option to save the templates for later usage if your storage room uses e.g. drawer towers, saved templates help to ensure naming consistency for all later added towers.
|
||||
|
||||
> ℹ️ \* multidimensional means that you are not limited to namings like `D1`,`D2`, .. but also something like `D1.A`, `D1.B`, `D2.A`, `D2.B`, ...
|
||||
|
||||
This will generate the previous mentioned example:
|
||||
|
||||
<img src="https://github.com/wolflu05/inventree-bulk-plugin/assets/76838159/c1ad6ccd-bc27-445b-a3fc-ae5ce74390b5" alt="image" />
|
||||
|
||||
If you want to try out the templates on you're own, you can just copy the below json to your clipboard and use the "New untitled schema from clipboard" button to import them (see [import/export](https://github.com/wolflu05/inventree-bulk-plugin#import-export)). For more examples refer to the [plugin documentation](https://github.com/wolflu05/inventree-bulk-plugin).
|
||||
|
||||
```json
|
||||
{"name":"Example","template_type":"STOCK_LOCATION","template":{"version":"1.0.0","input":{},"templates":[],"output":{"parent_name_match":"true","dimensions":["*NUMERIC","*ALPHA"],"count":["3","2"],"generate":{"name":"D{{dim.1}}.{{dim.2}}"},"childs":[]}}}
|
||||
```
|
||||
|
||||
## ⚙️ Installation
|
||||
|
||||
Install this plugin as follows:
|
||||
|
||||
1. Make sure you allow the use of the url integration and app integration (see [Why does this plugin needs the app mixin?](https://github.com/wolflu05/inventree-bulk-plugin#why-does-this-plugin-needs-the-app-mixin))
|
||||
2. Goto Settings > Plugins > Install Plugin, enter `inventree-bulk-plugin` as package name. Enable the confirm switch and click submit.
|
||||
3. Restart your server and activate the plugin.
|
||||
4. Stop your server and run `invoke update` (for docker installs it is `docker-compose inventree-server invoke update`). This ensures that all migrations run and the static files get collected. You can now start your server again and start using the plugin.
|
||||
|
||||
> ❗At least InvenTree v0.12.7 is required to use this plugin.
|
||||
|
||||
## 📖 Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/wolflu05/inventree-bulk-plugin) for further examples, instructions and information.
|
||||
@@ -0,0 +1,38 @@
|
||||
---
|
||||
name: inventree-consolidated-shipment-lines
|
||||
title: InvenTree Consolidated Shipping Lines
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-consolidated-shipment-lines
|
||||
github: https://github.com/SchrodingersGat/inventree-consolidated-shipping-report
|
||||
issue_tracker: https://github.com/SchrodingersGat/inventree-consolidated-shipping-report/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Shipping
|
||||
tags:
|
||||
- shipping
|
||||
- consolidated
|
||||
- report
|
||||
---
|
||||
|
||||
InvenTree Consolidated Shipping Lines
|
||||
|
||||
Adds extra report context when generating shipping reports, consolidating multiple stock items against each line item.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-consolidated-shipment-lines
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/SchrodingersGat/inventree-consolidated-shipping-report) for further instructions and information.
|
||||
@@ -0,0 +1,51 @@
|
||||
---
|
||||
name: inventree-cups-plugin
|
||||
author: wolflu05
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: false
|
||||
package_name:
|
||||
github: https://github.com/wolflu05/inventree-cups-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/wolflu05/inventree-cups-plugin/issues
|
||||
website:
|
||||
categories:
|
||||
- Printer
|
||||
tags:
|
||||
- Label
|
||||
- Printer
|
||||
- CUPS
|
||||
- DYMO
|
||||
---
|
||||
Label printing plugin for generic cups printers
|
||||
|
||||
A label printing plugin for [InvenTree](https://inventree.org), which provides support for [Cups label printing servers](https://www.cups.org). If your printer is not cups compatible, you can setup a cups printing server. This [article](https://nerdig.es/labelwriter-im-netz-teil1/) describes how to setup a cups printing server for the DYMO LabelWriter 450 Duo.
|
||||
|
||||
## Installation
|
||||
|
||||
> :warning: This plugin needs `cups-devel` installed to install its dependencies. You can read more about the requirements at [`pycups`](https://github.com/OpenPrinting/pycups). If you're using `apt` as a package manager run `apt install libcups2-dev` before.
|
||||
|
||||
Install this plugin as follows:
|
||||
|
||||
```bash
|
||||
pip install git+https://github.com/wolflu05/inventree-cups-plugin
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file:
|
||||
|
||||
```txt
|
||||
git+https://github.com/wolflu05/inventree-cups-plugin
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
|
||||
| Name| Description| Example |
|
||||
| --- | --- | --- |
|
||||
| Server | IP/Hostname to connect to the cups server | `192.168.1.5` |
|
||||
| Port | Port to connect to the cups server | `631` |
|
||||
| Benutzer | User to connect to the cups server | *can also be empty* |
|
||||
| Passwort | Password to connect to the cups server | *can also be empty* |
|
||||
| Printer | Printer from cups server, can be selected if valid connection options are saved in | `myprinter` |
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
name: Default sales order items # Name of the plugin (should be either NAME, TITLE or SLUG)
|
||||
author: lippoliv # Maintainer must be the same as the publisher reference
|
||||
license: MIT # License, we prefer open source
|
||||
open_source: true # Is this project licensed with an OSI-approved license - aka 'open source'
|
||||
stable: true # Is this project stable? Should users deploy this in their instace?
|
||||
maintained: true # Is this project maintained?
|
||||
pypi: false # Is availanle via PyPi
|
||||
package_name: inventree_default_salesorder_items # Name of the package on the index, required if pypi true
|
||||
github: https://github.com/lippoliv/inventree-default-salesorder-items # Ĺink to repo in GitHub, one of github, gitlab or source is required
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/lippoliv/inventree-default-salesorder-items/issues # Link to Issue tracker, optional
|
||||
website: https://github.com/lippoliv/inventree-default-salesorder-items # Website, full path with protocol, optional
|
||||
categories: # Mixins/integrations that are used, optional
|
||||
- Event
|
||||
- Settings
|
||||
tags: # Freetext tags - treat them like kewords, optional
|
||||
- Sales orders
|
||||
- Parts
|
||||
- Automation
|
||||
---
|
||||
Add default parts (configurable) to every newly created sales order automatically.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: inventree-dymo-plugin
|
||||
author: wolflu05
|
||||
license: GPL-3.0+
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-dymo-plugin
|
||||
github: https://github.com/wolflu05/inventree-dymo-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/wolflu05/inventree-dymo-plugin/issues
|
||||
website:
|
||||
categories:
|
||||
- Printer
|
||||
tags:
|
||||
- Label
|
||||
- Printer
|
||||
- Dymo
|
||||
---
|
||||
Dymo label printer driver plugin for InvenTree
|
||||
|
||||
# inventree-dymo-plugin
|
||||
|
||||
[](https://opensource.org/license/gpl-3-0)
|
||||

|
||||
|
||||
A label printer driver plugin for [InvenTree](https://inventree.org/), which provides support for Dymo Label Writer® printers.
|
||||
|
||||
## Compatibility
|
||||
|
||||
The following printers are already supported by the driver:
|
||||
|
||||
- DYMO Label Writer 450
|
||||
- DYMO Label Writer 450 Duo (Tape is not supported currently)
|
||||
- DYMO Label Writer 450 Turbo
|
||||
- DYMO Label Writer 450 Twin Turbo
|
||||
|
||||
## Requirements
|
||||
|
||||
Currently only printing over network is supported, so an RAW network socket server needs to be connected to the printer. A raspberry pi zero w is just enough for that job.
|
||||
|
||||
The easiest way to set this up, is using cups and configure a RAW printer device in combination with `xinetd` like described in this [blog post](https://nerdig.es/labelwriter-im-netz-teil1/).
|
||||
|
||||
## Installation
|
||||
|
||||
> :warning: This plugin is only compatible with InvenTree>=0.16 because this uses the new label printer driver interface introduced with [inventree/InvenTree#4824](https://github.com/inventree/InvenTree/pull/4824) and was fixed with 0.16 to work inside of workers.
|
||||
|
||||
Goto "Admin Center > Plugins > Install Plugin" and enter `inventree-dymo-plugin` as package name.
|
||||
|
||||
Then goto "Admin Center > Machines" and create a new machine using this driver.
|
||||
|
||||
## Technical working
|
||||
|
||||
This driver implements the RAW Dymo LabelWriter® 450 Series commands like described in the [technical reference manual](https://download.dymo.com/dymo/technical-data-sheets/LW%20450%20Series%20Technical%20Reference.pdf) to send the label data to the printer.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: inventree-harmonized-codes
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-harmonized-system-codes
|
||||
github: https://github.com/SchrodingersGat/inventree-harmonized-codes
|
||||
issue_tracked: https://github.com/SchrodingersGat/inventree-harmonized-codes/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Shipping
|
||||
tags:
|
||||
- shipping
|
||||
- harmonized
|
||||
- codes
|
||||
---
|
||||
|
||||
Harmonized System Codes for InvenTree
|
||||
|
||||
A plugin which provides facility to assign harmonized system (HS) codes against parts when shipping internationally.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-harmonized-system-codes
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/SchrodingersGat/inventree-harmonized-codes) for further instructions and information.
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
name: inventree-ipn-generator
|
||||
author: LavissaWoW
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-ipn-generator
|
||||
github: https://github.com/LavissaWoW/inventree-ipn-generator
|
||||
issue_tracker: https://github.com/LavissaWoW/inventree-ipn-generator/issues
|
||||
categories:
|
||||
- Event
|
||||
tags:
|
||||
- Part
|
||||
- IPN
|
||||
- Generator
|
||||
---
|
||||
|
||||
## Introduction
|
||||
Installing this plugin enables the automatic generation if Internal Part Numbers (IPN) for parts.
|
||||
|
||||
## Installation
|
||||
To automatically install the plugin when running `invoke install`:
|
||||
Add `inventree-ipn-generator` to your plugins.txt file.
|
||||
|
||||
Or, install the plugin manually:
|
||||
|
||||
```
|
||||
pip install inventree-ipn-generator
|
||||
```
|
||||
|
||||
For the plugin to be listed as available, you need to enable "Event Integration" in your plugin settings.
|
||||
This setting is located with the Plugin Settings on the settings page.
|
||||
|
||||
## Settings
|
||||
|
||||
- Active - Enables toggling of plugin without having to disable it
|
||||
- On Create - If on, the plugin will assign IPNs to newly created parts
|
||||
- On Change - If on, the plugin will assign IPNs to parts after a change has been made.
|
||||
Enabling this setting will remove the ability to have parts without IPNs.
|
||||
|
||||
## Pattern
|
||||
Part Number patterns follow three basic groups. Literals, Numerics, and characters.
|
||||
When incrementing a part number, the rightmost group that is mutable will be incremented.
|
||||
All groups can be combined in any order.
|
||||
|
||||
A pattern cannot consist of _only_ Literals.
|
||||
|
||||
For any pattern, only the rightmost non-literal group will be incremented.
|
||||
When this group rolls over its max, the next non-literal group to the left will be incremented.
|
||||
Example: Given the groups (named for demo): L1C1N1C2L2
|
||||
Incrementing follows this order: C2, N1, C1.
|
||||
|
||||
> **_NOTE:_** When C1 in the above example rolls over, the plugin will loop back to the first IPN.
|
||||
> This will cause duplicate IPNs if your InvenTree allows duplicate IPNs.
|
||||
> If your InvenTree does not allow duplicate IPNs, this will cause an error at the moment!
|
||||
> This will be addressed in an upcoming update.
|
||||
|
||||
### Literals (Immutable)
|
||||
Anything encased in `()` will be rendered as-is. no change will be made to anything within.
|
||||
|
||||
Example: `(A6C)` will _always_ render as "A6C", regardless of other groups
|
||||
|
||||
### Numeric
|
||||
Numbers that should change over time should be encased in `{}`
|
||||
|
||||
- `{5}` respresents a number with max 5 digits
|
||||
- `{25+}` represents a number 25-99
|
||||
|
||||
Example: `{5+}{3}` will result in this range: 5000-9999
|
||||
|
||||
### Characters
|
||||
Characters that change should be encased in `[]`
|
||||
|
||||
- `[abc]` represents looping through the letters `a`, `b`, `c` in order.
|
||||
- `[a-f]` represents looping through the letters from `a` to `f` alphabetaically
|
||||
|
||||
These two directives can be combined.
|
||||
|
||||
- `[aQc-f]` represents:
|
||||
- - `a`, `Q`, `c-f`
|
||||
|
||||
### Examples
|
||||
1. `(AB){3}[ab]` -> AB001a, AB001b, AB002a, AB021b, AB032a, etc
|
||||
2. `{2}[Aq](BD)` -> 01ABD, 01qBD, 02ABD, 02qBD, etc
|
||||
3. `{1}[a-d]{8+}` -> 1a8, 1a9, 1b8, 1b9, 1c8, 1c9, 1d8, 1d9, 2a8, etc
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: inventree-kicad-plugin
|
||||
author: afkiwers
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-kicad-plugin
|
||||
github: https://github.com/afkiwers/inventree_kicad
|
||||
issue_tracked: https://github.com/afkiwers/inventree_kicad/issues
|
||||
categories:
|
||||
- Integration
|
||||
tags:
|
||||
- schematic
|
||||
- bom
|
||||
- kicad
|
||||
---
|
||||
|
||||
KiCad Integration for InvenTree
|
||||
|
||||
A plugin which allows InvenTree to serve component data to [KiCad](https://kicad.org) via the HTTP library interface.
|
||||
|
||||
This plugin provides an API wrapper which provides an API interface that conforms to the KiCad HTTP library interface specification. This allows KiCad to pull component data directly from your InvenTree database.
|
||||
|
||||
## Installation
|
||||
|
||||
The plugin can be installed via the InvenTree web interface, using the tag `inventree-kicad-plugin`.
|
||||
|
||||
Alternatively, install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-kicad-plugin
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file and run `invoke install`.
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/afkiwers/inventree_kicad) for further instructions and information.
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: inventree-mcp
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-mcp
|
||||
github: https://github.com/inventree/inventree-mcp
|
||||
issue_tracker: https://github.com/inventree/inventree-mcp/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- AI
|
||||
---
|
||||
|
||||
InvenTree MCP
|
||||
|
||||
A plugin which provides MCP functionality for the InvenTree platform, allowing AI agents to interact directly with InvenTree.
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/inventree-mcp) for detailed instructions on how to use the InvenTree MCP plugin.
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
---
|
||||
name: inventree-niimbot-plugin
|
||||
author: piramja
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-niimbot-plugin
|
||||
github: https://github.com/piramja/inventree-niimbot-plugin
|
||||
issue_tracker: https://github.com/piramja/inventree-niimbot-plugin/issues
|
||||
categories:
|
||||
- Label
|
||||
tags:
|
||||
- Niimbot
|
||||
- Printer
|
||||
- Label
|
||||
---
|
||||
|
||||
## Introduction
|
||||
A label printing plugin for [InvenTree](https://inventree.org), which provides support for the [Niimbot Label Printers](https://www.niimbot.com/enweb/product_label.html?category_id=6). This plugin is based on the amazing work from [labbots/NiimPrintX](https://github.com/labbots/NiimPrintX/tree/main) and modifications from [LorisPolenz/NiimPrintX](https://github.com/LorisPolenz/NiimPrintX/tree/main).
|
||||
|
||||
## Installation
|
||||
|
||||
Install this plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-niimbot-plugin
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file to install automatically using the `invoke install` command:
|
||||
|
||||
```
|
||||
inventree-niimbot-plugin
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
The following list gives an overview of the available settings. You find them under the InvenTree plugin specific settings.
|
||||
|
||||
* **Printer Model**
|
||||
Currently supported models are:
|
||||
b1, b18, b21, d11, d110 (but i was only able to test b1 because i don't have other printer models. Please report back if you can test other models!!).
|
||||
|
||||
* **Density**
|
||||
The print density. Different models seem to accept only certain values (b1 accepts 1-3).
|
||||
|
||||
* **Rotation**
|
||||
Rotation angle, either 0, 90, 180 or 270 degrees.
|
||||
|
||||
* **Scaling**
|
||||
Scaling factor, from 10% to 200%.
|
||||
|
||||
* **Vertical Offset**
|
||||
Vertical offset, from 0 to 200px.
|
||||
|
||||
* **Horizontal Offset**
|
||||
Horizontal offset, from 0 to 200px.
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: inventree-order-history
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-order-history
|
||||
github: https://github.com/inventree/inventree-order-history
|
||||
issue_tracked: https://github.com/inventree/inventree-order-history/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Reporting
|
||||
tags:
|
||||
- order
|
||||
- history
|
||||
- data
|
||||
---
|
||||
|
||||
Order History for InvenTree
|
||||
|
||||
A plugin which generates historical order data for parts in InvenTree
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-order-history
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/inventree-order-history) for further instructions and information.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: Inventree RapiDoc
|
||||
author: matmair
|
||||
license: MIT license
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-rapidoc
|
||||
github: https://github.com/matmair/inventree-rapidoc
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/matmair/inventree-rapidoc/issues
|
||||
website: https://mjmair.com/
|
||||
categories:
|
||||
- API
|
||||
tags:
|
||||
- RapiDoc
|
||||
---
|
||||
|
||||
Use RapiDoc for Inventree API docs.
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install
|
||||
Install this plugin in the webinterface with the packagename `inventree-rapidoc`
|
||||
|
||||
2. Enable
|
||||
Enable the plugin in the plugin settings. You need to be signed in as a superuser for this.
|
||||
**The server will restart if you enable the plugin**
|
||||
|
||||
3. Configure
|
||||
There are no configuration options for this plugin. Your server needs to have `URL` and `App` mixins enabled.
|
||||
|
||||
## License
|
||||
This project is licensed under the MIT license.
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
---
|
||||
name: inventree-report-lsp-plugin
|
||||
author: wolflu05
|
||||
license: GPL-3.0+
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-report-lsp-plugin
|
||||
github: https://github.com/wolflu05/inventree-report-lsp-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/wolflu05/inventree-report-lsp-plugin/issues
|
||||
website:
|
||||
categories:
|
||||
- Label
|
||||
- Reporting
|
||||
tags:
|
||||
- Label
|
||||
- report
|
||||
- LSP
|
||||
---
|
||||
|
||||
A report editor with auto completion, diagnostic messages and many more capabilities to help with creating custom templates, powered by [django-template-lsp](https://github.com/fourdigits/django-template-lsp).
|
||||
|
||||
[](https://opensource.org/license/gpl-3-0)
|
||||

|
||||
|
||||

|
||||
|
||||
To install this plugin, follow the guide on the [Readme](https://github.com/wolflu05/inventree-report-lsp-plugin?tab=readme-ov-file#%EF%B8%8F-installation). Note, that at least InvenTree v0.18.0 is required to use this plugin.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: inventree-rolling-stocktake
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-rolling-stocktake
|
||||
github: https://github.com/inventree/rolling-stocktake-plugin
|
||||
issue_tracked: https://github.com/inventree/rolling-stocktake-plugin/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Stock
|
||||
tags:
|
||||
- stock
|
||||
- dashboard
|
||||
- inventory
|
||||
---
|
||||
|
||||
Rolling Stocktake for InvenTree
|
||||
|
||||
A plugin which provides a rolling stocktake mechanism for InvenTree.
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-rolling-stocktake
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/rolling-stocktake-plugin) for further instructions and information.
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
name: inventree-stock-forecasting
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-stock-forecasting
|
||||
github: https://github.com/inventree/inventree-stock-forecasting
|
||||
issue_tracked: https://github.com/inventree/inventree-stock-forecasting/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Reporting
|
||||
tags:
|
||||
- stock
|
||||
- forecasting
|
||||
- data
|
||||
---
|
||||
|
||||
Stock Forecasting for InvenTree
|
||||
|
||||
A plugin which generates stock forecasting data for parts in InvenTree
|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-stock-forecasting
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/inventree-stock-forecasting) for further instructions and information.
|
||||
@@ -0,0 +1,270 @@
|
||||
---
|
||||
name: inventree-supplier-panel # Name of the plugin (should be either NAME, TITLE or S
|
||||
author: SergeoLacruz # Maintainer must be the same as the publisher reference
|
||||
license: MIT # License, we prefer open source
|
||||
open_source: true # Is this project licensed with an OSI-approved license - aka 'open source'
|
||||
stable: true # Is this project stable? Should users deploy this in their instace?
|
||||
maintained: true # Is this project maintained?
|
||||
pypi: true # Is availanle via PyPi
|
||||
package_name: inventree-supplier-panel # Name of the package on the index, required if pypi true
|
||||
github: https://github.com/sergeolacruz/inventree-supplier-panel # Ĺink to repo in GitHub, one of github, gitlab or source is required
|
||||
issue_tracker: https://github.com/SergeoLacruz/inventree-supplier-panel/issues # Link to Issue tracker, optional
|
||||
categories: # Mixins/integrations that are used, optional
|
||||
- Supplier
|
||||
tags: # Freetext tags - treat them like kewords, optional
|
||||
- supplier
|
||||
- mouser
|
||||
- digikey
|
||||
---
|
||||
# The InvenTree-supplier-panel
|
||||
|
||||
This is a plugin for [InvenTree](https://inventree.org), which uploads a purchase order
|
||||
to a supplier WEB page. After using this plugin you can directly order the parts on
|
||||
supplier WEB page. You need to have a supplier account and a different kinds of API keys
|
||||
depending on the supplier.
|
||||
The data will be created in your supplier account. Each time you transfer your PO
|
||||
a new data set cart will be created. So make sure that you delete them from time to time in
|
||||
the supplier WEB interface.
|
||||
The plugin also helps to create supplierparts based on the supplier part number..
|
||||
Actually the plugin supports two suppliers: Mouser and Digikey.
|
||||
|
||||
## Installation
|
||||
The plugin is on pypi. You can install it by just calling:
|
||||
|
||||
```
|
||||
pip install inventree-supplier-panel
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
### Mouser Supplier ID
|
||||
Place here the primary key of the supplier Mouser in your system. You can select from a list of
|
||||
your suppliers. If this is not set the panel will not be displayed and a error is raised.
|
||||
|
||||
### Digikey Supplier ID
|
||||
Place here the primary key of the supplier Digikey in your system. You can select from a list of
|
||||
your suppliers. If this is not set the panel will not be displayed and a error is raised.
|
||||
|
||||
### Mouser API key
|
||||
Place here your Mouser key for manipulating shopping carts. You find it in your Mouser account.
|
||||
|
||||
### Digikey ID and Digikey Secret
|
||||
This is the client ID and the client secret that has been generated in the Digkey API admin WEB portal.
|
||||
Copy it from there to the InvenTree settings.
|
||||
|
||||
### Digikey token and Digikey refresh token
|
||||
These fields are filled automatically. The Digikey API requires two tokens with different life times.
|
||||
Please refer to the Digikey section for more information.
|
||||
|
||||
### Proxy CON
|
||||
Protocol to proxy server e.g. https
|
||||
|
||||
### Proxy URL
|
||||
In case you need to authorise a proxy server between your InvenTree server and the internet
|
||||
put the required setting here. Example:
|
||||
|
||||
```
|
||||
https://user:password@ipaddress:port
|
||||
```
|
||||
|
||||
If you do not need this just leave the fields empty.
|
||||
A proxy can also be set using the environment variables PROXY_CON and PROXY_URL. The
|
||||
values in the environment variables overwrite InvenTree settings.
|
||||
|
||||
### Base URL
|
||||
The base URL for server instance is in the Server Settings category of InvenTree. The plugin
|
||||
uses this setting to build the OAuth callback for Digikey. Put the correct URL here.
|
||||
|
||||
## What the plugin does
|
||||
|
||||
The plugin creates a new panel which is visible on the purchase order details view.
|
||||
This is called either Mouser actions or Digikey actions depending on the supplier of the
|
||||
active PO. On the panel there are three things:
|
||||
|
||||
- a button that starts the transfer of your PO to the supplier
|
||||
- a status bar that shows error messages
|
||||
- a table that contains the created Mouser shopping cart.
|
||||
- in case of Digikey a button that initiates the token generation.
|
||||
|
||||

|
||||
|
||||
The button "Transfer PO" initiates the transfer. It takes each element of your PO using the SKU of
|
||||
the supplier part and transfers it to the suppliers WEB shop. When finished it downloads
|
||||
the data from the WEB page and puts the data into the table. Here you see
|
||||
the actual stock at the supplier and an OK bubble when the stock is large enough for you order.
|
||||
You also find the actual price as well as the total amount of your order. If the supplier
|
||||
detects an error with the part it is displayed in the very right column.
|
||||
|
||||
The plugin also transfers your IPNs (internal part numbers). Most suppliers reserve a field
|
||||
for such numbers. They show up in your shopping cart as well as on the invoice and even
|
||||
on the labels that they put onto the bags and reels.
|
||||
|
||||
Finally the actual prices are copied back into your
|
||||
InvenTree purchase order line items. So you can always see what you payed for the part when
|
||||
you ordered it. This does not modify the price breaks of the supplier part. These are stored
|
||||
with the supplier part. Here we just modify the purchase order.
|
||||
|
||||
## Working with Mouser
|
||||
|
||||
### Set up
|
||||
|
||||
For this plugin to work you need to have Mouser as a supplier in your InvenTree database.
|
||||
Supplierparts must be added to all the parts that you like to buy at Mouser. All Mouser supplier
|
||||
parts need to have the proper SKU. It needs to match the Mouser part number exactly.
|
||||
|
||||
For access to the Mouser API you need a Mouser account and a shopping cart API key.
|
||||
You can get this in your Mouser WEB account. Do not mess up with the Mouser search API
|
||||
key. This is a different one. If the key is properly set up you can find it on the Mouser
|
||||
WEB page here:
|
||||

|
||||
|
||||
### Usage
|
||||
Using Mouser is easy. Only the Mouser shopping cart key is required for authentication. Its lifetime
|
||||
is endless. Mouser has an API for the shopping cart. On pressing the button a shopping
|
||||
cart is crated and all items are put into this shopping cart. When you login to the
|
||||
Mouser WEB shop you can use this shopping cart for your order.
|
||||
|
||||
Please be aware that the plugin creates a new cart with a new ID each time the button is pressed.
|
||||
If you afterwards create a order in the WEB UI, be careful selecting the right one
|
||||
and delete all unused carts.
|
||||
|
||||
#### Currency support
|
||||
Mouser needs a country code for currency support. The plugin selects a proper country based on
|
||||
the InvenTree currency setting and transfers this to Mouser. Mouser sends back the sopping cart
|
||||
in the correct currency. The currency name is shown in last line of the table.
|
||||
|
||||
## Working with Digikey
|
||||
|
||||
### Set up
|
||||
|
||||
You need a registration on the [Digikey API products WEB page](https://developer.digikey.com).
|
||||
This is not your normal Digikey account for shopping. You have to apply separately. After
|
||||
registration create an organisation and inside the organization a production app.
|
||||
The most important thing to set is the OAuth Callback. This is an URL on your local server
|
||||
that is called by Digikey for key generation. The plugin sets up an URL for this.
|
||||
Just add your local IP. The entry should look somehow like:
|
||||
|
||||
```
|
||||
https://192.168.1.40:8123/plugin/suppliercart/digikeytoken/
|
||||
```
|
||||
|
||||
In this example 192.168.1.40:8123 is the local IP address and port where my
|
||||
InvenTree development server runs. Place here the appropriate address.
|
||||
In Production products section make sure that Product information and MyLists is activated.
|
||||
|
||||
In the View tab of your app you find the Client-ID and the Client-Secret. Place those in
|
||||
the plugin settings.
|
||||
|
||||
Digikey Supplierparts have to by in your InvenTree Database as described already in
|
||||
the Mouser section.
|
||||
|
||||
### Usage
|
||||
Using Digikey is more complex. The authorisation system is token based and they do not
|
||||
have a shopping cart API.
|
||||
|
||||
#### Authorization
|
||||
The Digikey Client ID and the Client secret are the first things you need. With those
|
||||
you call an API endpoint. You HAVE to go through an interactive browser window and
|
||||
enter your credentials. Afterwards Digikey opens a callback URL on your local machine
|
||||
and transfers a key. With this key the plugin calls another API endpoint to create
|
||||
a token and a refresh token. The key gets bad after 60 seconds.
|
||||
|
||||
The token is used for each call to a Digikey API. It is good for 30 minutes. It has to
|
||||
be refreshed using the refresh token. This one is valid for 90 days.
|
||||
|
||||
The plugin has a button in the panel that initiates the first step. It opens a browser
|
||||
where you enter your credentials. When the OAuth callback is properly set the URL
|
||||
...plugin/suppliercart/digikeytoken/ is called. This triggers a call to
|
||||
https://api.digikey.com/v1/oauth2/token from where the plugin get the tokens. The tokens
|
||||
are stored in the plugin setting area. Do not change them manually.
|
||||
|
||||
Each time you transfer a PO the refresh token is called independently from the
|
||||
tokens live time. This also refreshes the refresh token. So you are save when
|
||||
you use the plugin ate least once in 90 days. In case the token gets bad you need to
|
||||
create a fresh set using the token button again.
|
||||
|
||||
If you are confused now read the documentation on the Digikey WEB page for more details.
|
||||
|
||||
#### MyLists
|
||||
Digikey does not have such a simple shopping cart API. The plugin uses the MyLists API.
|
||||
It creates a list on the WEB shop that can easily be transferred to a shopping
|
||||
cart. When creating a list a list name has to be provided. The plugin creates a name
|
||||
based on the PO name and adding a -xx that counts upwards each time you push the button.
|
||||
The reason is that each name is allowed only once. Even when the list is deleted, the
|
||||
name stays blocked forever. If you are done with your order delete the lists from your
|
||||
Digikey WEB account.
|
||||
|
||||
#### Currency support
|
||||
Digikey requires a country code and a currency code. The plugin uses the same translation
|
||||
as mentioned in the Mouser section and transfers both to Digikey. Digikey sends back the
|
||||
list in the correct currency. Unfortunately the currency code is not sent back. The only
|
||||
thing Digikey sends is a currency symbol but no info if $ is USD, AUD or whatever kind of Dollar.
|
||||
The plugin shows the symbol in the table for control.
|
||||
|
||||
## Automatically add supplierparts
|
||||
The plugin can add supplierparts based on the supplier part number. For users with
|
||||
edit part permission a panel called "Automatic Supplier parts" is shown. Here
|
||||
you can select the supplier and add the exact supplier part number. The plugin
|
||||
will create a corresponding supplierpart. I can fill the following part fields automatically:
|
||||
|
||||
- Supplier part number
|
||||
- URL
|
||||
- Package when available
|
||||
- Lifecycle status
|
||||
- Minimum order
|
||||
- Description
|
||||
|
||||
If the supplier does not provide information for a field it it left empty.
|
||||
|
||||
## How it works
|
||||
|
||||
```
|
||||
def get_custom_panels(self, view, request)
|
||||
```
|
||||
|
||||
This defines the panel. The function must return a panels list. Here it returns just one
|
||||
panel. The panel is returned under three conditions: The view must be PurchaseOrderDetail,
|
||||
the supplier must be Mouser or Digikey and the user must have edit permissions to purchase orders.
|
||||
The content_template is an html file that defines how the panel content looks.
|
||||
|
||||
```
|
||||
re_path(r'transfercart/(?P<pk>\d+)/', self.TransferCart, name='transfer-cart'),
|
||||
```
|
||||
Here we define the url that controls the panel. Let's look at the details here:
|
||||
|
||||
- ```name='transfer-cart'```: This is the name under which the url is called from the html file. We will
|
||||
come to that later when we discuss the template.
|
||||
|
||||
- ```self.TransferCart``` is the function that is called. It is defined later in this plugin
|
||||
|
||||
- ```transfercart/(?P<pk>\d+)/``` The string that looks a bit like white noise defines the url. transfercart
|
||||
is the url which can be chosen freely. The ? is well known for parameters. In this case we get just one
|
||||
parameter, the orders primary key. \d+ is a regular expression that limits the parameters to a digital
|
||||
number with n digits.
|
||||
|
||||
May be it is worth to leave a few more words on this. We define the url of the plugin. This is called by the Javascript
|
||||
function when we push the button. Let's have a look on the names and how they belong together:
|
||||
|
||||

|
||||
|
||||
In the picture you see the relevant lines in the python and java code. The names in the coloured boxes need to match.
|
||||
In case something does not fit the panel will not render and you will get an error message.
|
||||
|
||||
## Issues
|
||||
|
||||
### API keys are global
|
||||
The API keys and especially the proxy password are user specific and shall not be given to
|
||||
others. Up to now there are no user specific settings in InvenTree. So these keys are global
|
||||
and visible to, at least every admin. All users who use the plugin will have the same
|
||||
keys. We use a team key to solve this.
|
||||
|
||||
### Missing DigiKey features
|
||||
Digikey allows more features like customer ID and list owners. These are not implemented so far.
|
||||
The plugin supports just a single Digikey organization and user. Some APIs require a createdBy
|
||||
value to be set. xxxx works fine so far.
|
||||
|
||||
### https Callback
|
||||
The OAuto callback setting in your Digikey WEB account allows only https. http is not allowed.
|
||||
This is usually not a problem in production environments. However the development server
|
||||
usually runs http. But InvenTree has the required stuff for https on board. I just changed
|
||||
the runserver to runsslserver in tasks.py.
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: inventree-test-statistics
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-test-statistics
|
||||
github: https://github.com/inventree/inventree-test-statistics
|
||||
issue_tracked: https://github.com/inventree/inventree-test-statistics/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Reporting
|
||||
tags:
|
||||
- test
|
||||
- report
|
||||
- data
|
||||
---
|
||||
|
||||
Test Statistics for InvenTree
|
||||
|
||||
A plugin which generates test statistics for parts in InvenTree
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
The easiest way to install the plugin is via the InvenTree user interface.
|
||||
|
||||
Alternatively, you can install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-test-statistics
|
||||
```
|
||||
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/inventree-test-statistics) for further instructions and information.
|
||||
@@ -0,0 +1,45 @@
|
||||
---
|
||||
name: inventree-wireviz-plugin
|
||||
author: SchrodingersGat
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-wireviz-plugin
|
||||
github: https://github.com/inventree/inventree-wireviz
|
||||
issue_tracked: https://github.com/inventree/inventree-wireviz/issues
|
||||
website: https://inventree.org
|
||||
categories:
|
||||
- Extension
|
||||
tags:
|
||||
- BOM
|
||||
- Build
|
||||
- Part
|
||||
---
|
||||
|
||||
Wireviz Extension for InvenTree
|
||||
|
||||
A plugin which provides support for [wireviz](https://github.com/wireviz/WireViz), a software tool for generating harness / wiring diagrams programmatically.
|
||||
|
||||
This plugin generates wireviz diagrams and integrates them natively into the InvenTree interface. Additionally, BOM data can be extracted directly from the wireviz file:
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
Install the plugin manually as follows:
|
||||
|
||||
```
|
||||
pip install inventree-wireviz-plugin
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file to install automatically using the `invoke install` command:
|
||||
|
||||
```
|
||||
inventree-wireviz-plugin
|
||||
```
|
||||
|
||||
## Documentation
|
||||
|
||||
Refer to the [plugin documentation](https://github.com/inventree/inventree-wireviz) for further instructions and information.
|
||||
@@ -0,0 +1,56 @@
|
||||
---
|
||||
name: inventree-zapier
|
||||
author: matmair
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: false
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-zapier
|
||||
github: https://github.com/matmair/inventree-zapier
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/matmair/inventree-zapier/issues
|
||||
website: https://mjmair.com
|
||||
categories:
|
||||
- Event
|
||||
tags:
|
||||
- Zapier
|
||||
---
|
||||
Integrate Zapier into InvenTree
|
||||
|
||||
## Setup
|
||||
|
||||
1. Install
|
||||
Install this plugin as follows **in the enviroment of your InvenTree instance**:
|
||||
|
||||
```bash
|
||||
pip install inventree-zapier
|
||||
```
|
||||
|
||||
Or, add to your `plugins.txt` file:
|
||||
|
||||
```txt
|
||||
inventree-zapier
|
||||
```
|
||||
|
||||
2. Enable
|
||||
Enable the plugin in the plugin settings. You need to be signed in as a superuser for this.
|
||||
**The server will erstart if you enable the plugin**
|
||||
|
||||
3. Migrate
|
||||
Access your instances python enviroment and run
|
||||
|
||||
```bash
|
||||
inv migrate
|
||||
```
|
||||
|
||||
4. Configure
|
||||
Create an API-token in the admin interface and add set up the zapier integration in Zapier.com itself.
|
||||
|
||||
## License
|
||||
This project is licensed as MIT. Copy and do what you want - maybe tag your new plugin so others can find it. The more the merrier.
|
||||
|
||||
## State of the Code
|
||||
This is currently a PoC / 'beta' - at least till the Zapier App is published. Please feel free to file FRs, issues or just ideas.
|
||||
|
||||
@@ -0,0 +1,321 @@
|
||||
---
|
||||
name: inventree-zebra-plugin
|
||||
author: SergeoLacruz
|
||||
license: MIT
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name:
|
||||
github: https://github.com/SergeoLacruz/inventree-zebra-plugin
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/SergeoLacruz/inventree-zebra-plugin/issues
|
||||
website:
|
||||
categories:
|
||||
- Printer
|
||||
tags:
|
||||
- Label
|
||||
- Printer
|
||||
- Zebra
|
||||
- ZPL
|
||||
---
|
||||
Zebra Label Printer Plugin for Inventree
|
||||
|
||||
This is a label printing plugin for [InvenTree](https://inventree.org), which provides
|
||||
support for Zebra Label printers. It allows two modes of operation:
|
||||
|
||||
- Use the ZPL library to convert the png data provided by InvenTree to Zebra's bitmap
|
||||
format and send this to the printer.
|
||||
- Write a ZPL template and let the printer do the rendering.
|
||||
|
||||
It can output the print data either to a local printer connected to the computer via
|
||||
USB or to a network printer with an IP address. The output can be configured in the
|
||||
InvenTree plugin user interface.
|
||||
|
||||
Error handling is very basic.
|
||||
|
||||
## Installation
|
||||
|
||||
The plugin is on pypi. Install this plugin using pip with the following command:
|
||||
|
||||
```
|
||||
pip install inventree-zebra-plugin
|
||||
```
|
||||
|
||||
## Configuration Options
|
||||
### Printer Interface
|
||||
Here you can chose between local printer, network printer or the labelary.com API.
|
||||
The last one is useful for preview of labels, especially when ZPL templates are used.
|
||||
Default value is a local printer.
|
||||
|
||||
### IP address
|
||||
In case you use an IP printer set the IPv4 address here.
|
||||
|
||||
### Port
|
||||
In case you use an IP printer set the port number here. The default port number is 9100.
|
||||
|
||||
### Local Device
|
||||
In case of a local printer set the device here. The plugin actually puts the data directly to the
|
||||
device /dev/usb/lp0. No printer spooler is involved so far.
|
||||
|
||||
### Threshold
|
||||
The image from pillow comes in greyscale. The plugin converts it ti pure BW because this gives a much
|
||||
better print result. The threshold between black and white can be adjusted here.
|
||||
|
||||
### Darkness
|
||||
This is a value that influences the darkness of the print. Allowed values are 0 (white) to 30 (black).
|
||||
It is directly converted to a SD command in ZPL. If your black areas tend to blur out reduce the
|
||||
darkness.
|
||||
|
||||
### Dots per mm
|
||||
This sets the resolution of the printer. You can choose between 8, 12 and 24
|
||||
dpmm depending on your printer model.
|
||||
|
||||
### Printer init
|
||||
This string added to the printer output. It can be used to set special commands
|
||||
e.g. label rotation, mirror or white on black. Please refer to the ZPL manual
|
||||
for more information.
|
||||
|
||||
Zebra printers store settings after printing. So if a rotated label has been
|
||||
printed all following label will be rotated unless you change it. The default
|
||||
sets the printer to settings that have been useful for me. You might want to
|
||||
change it according to your requirements. Please keep in mind that this string
|
||||
is passed directly to the printer without any checks. So be careful when editing
|
||||
here.
|
||||
|
||||
### Get Printer info
|
||||
Turn this switch on to display a collection of all IP printers below on this page.
|
||||
|
||||
## Label Template
|
||||
The label needs a template described in html and css. The template should
|
||||
start with a page definition that defines the label size as shown below:
|
||||
|
||||
```
|
||||
|
||||
@page {
|
||||
{% localize off %}
|
||||
height: {{ height }}mm;
|
||||
width: {{ width }}mm;
|
||||
{% endlocalize %}
|
||||
padding: 0mm;
|
||||
margin: 0px 0px 0px 0px;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
The height and width parameters are defined in the InvenTree admin panel
|
||||
in the label section. These values have to fit the label size that is in
|
||||
the printer. See the example templates for details on template definition.
|
||||
|
||||
## Multi printer hack
|
||||
We have the requirement to print labels in different sizes. As we do not
|
||||
want to change the reel for each print we set up a second printer loaded
|
||||
with a different label size. InvenTree is not yet able to handle different
|
||||
printers. So I added a multi printer hack. You can define a key with an IP
|
||||
address in the label meta data:
|
||||
|
||||
```
|
||||
{"ip_address":"xxx.yyy.zzz.eee"}
|
||||
{"darkness":xx}
|
||||
```
|
||||
|
||||
If the printer driver finds that key, the IP address from the printer settings
|
||||
is overwritten with the address from the meta data. So the print will end up
|
||||
in another printer.
|
||||
|
||||
Only the IP address and darkness can be overwritten so far. All other settings remain.
|
||||
|
||||
## Quality matters
|
||||
The InvenTree printer system uses a graphical representation of the label. The label is described
|
||||
in HTML, converted to a pixel graphic and printed. The advantage is independency from printer
|
||||
models and systems. Disadvantage is larger data and quality problems with darkness and scaling.
|
||||
Let's have a look at the following printout:
|
||||
|
||||

|
||||
|
||||
Both codes have been printed with the same printer on the same reel. The left one is
|
||||
hardly readable using my mobile. The right one reads easily even as it is smaller.
|
||||
|
||||
### Secret 1, Scale
|
||||
The printer resolution is 8 dots per mm resulting in a dot size of 0.125mm. The QR code pixel
|
||||
and the printer pixel size should be integrally divisible. The code in the picture has 21
|
||||
pixels plus one in the frame, so 23 pixel. The frame is set in the HTML description.
|
||||
|
||||
```
|
||||
{% qrcode qr_data border=1 %}
|
||||
```
|
||||
|
||||
I selected two dots per pixel. So 23 * 2 * 0.125 = 6.125mm. If the size is something different
|
||||
scaling takes place and the result might be worse. If you like a larger printout select more
|
||||
dots per pixel. From a certain size upwards the value does not matter any more because the code
|
||||
gets large enough to be readable in any quality.
|
||||
|
||||
### Secret 2: Darkness
|
||||
Zebra printers allow to set the darkness of the print in values between 0 (white) and 30 (max)
|
||||
The left code was printed with a value of 30. The black dots tend to blur out a bit resulting
|
||||
in smaller white areas. The right code was printed with a value of 25 resulting in larger white
|
||||
pixels. The darkness values are just examples. Your values will differ based on printer model,
|
||||
media type and printer age. The printer head tends to wear out and the darkness value might
|
||||
need an adjustment from time to time.
|
||||
|
||||
## In printer rendering
|
||||
You can also bypass the InvenTree print engine and render the label inside the printer.
|
||||
The printer knows how to render the label for best quality. Inspired by the
|
||||
inventree-zpl-plugin [inventree-zpl-plugin](https://github.com/yellowcrescent/inventree-zpl-plugin) a similar
|
||||
function was aded to the zebra printer driver. You can write a ZPL template and upload
|
||||
it to the InvenTree Label templates as usual. Add a command to the template's metadata:
|
||||
|
||||
```
|
||||
{"zpl_template": "True"}
|
||||
```
|
||||
|
||||
In that case the printer driver ignores the picture rendered by WeasyPrint. Instead
|
||||
it calls the render_to_string function of the template and sends the
|
||||
result to the printer. The result can look like:
|
||||
|
||||

|
||||
|
||||
The upper label was created using this template:
|
||||
|
||||
```
|
||||
|
||||
{% autoescape off %}
|
||||
^FT30,25^A0N,18,22^FDIPN^FS
|
||||
^FT150,30^FB100,1,,C,,^A0N,24,32^FDACME^FS
|
||||
^FT320,25^A0N,18,22^FD{{ item.pk }}^FS
|
||||
^FT100,70^FB200,2,,C,,^A0N,18,22^FD{{ part.name }}^FS
|
||||
^FT100,100^FB200,1,,C,,^A0N,18,22^FD{{ part.manufacturer_parts.first.manufacturer.name }}^FS
|
||||
^FT30,150^FB340,1,,C,,^A0N,30,40^FD{{ part.IPN }}^FS
|
||||
^FT20,210^FB360,3,,L,,^A0N,18,22^FD{{ part.description }}^FS
|
||||
^FT15,110^BQ,2,3^FDQA,{{ part.IPN }}^FS
|
||||
^FT310,130^BQ,2,3^FDQA,{{ qr_data }}^FS
|
||||
{% endautoescape %}
|
||||
|
||||
```
|
||||
|
||||
Autoescape must be off. We do not need " and similar escapes here.
|
||||
Context variables can be used as usual.
|
||||
|
||||
!!! warning "Limitation"
|
||||
ZPL commands starting with backslash like \\& cannot be used so far.
|
||||
|
||||
### Preview
|
||||
The printer driver allows an output device called "preview". If this is selected
|
||||
the ZPL code is sent to the API of labelary.com. The API sends back pdf data
|
||||
which is displayed in a new browser window. This is helpful while writing ZPL
|
||||
templates but works with HTML templates too. Please be careful and do not send
|
||||
confidential information to the API.
|
||||
|
||||
In case you need to pass a proxy for the POST requests set the environment
|
||||
variables PROXY_CON and PROXY_URL on the server. The plugin does not have
|
||||
settings for this.
|
||||
|
||||
## Getting printer info
|
||||
With the multi printer feature it can happen that you have several printers in
|
||||
your setup. When the Get Printer Info switch is set ON, the driver calls each printer
|
||||
once a minute and collects some info about it. It calls the printer configured
|
||||
in the settings as well as all printers it finds in the label templates.
|
||||
In case a printer is unreachable, an error message is shown. If a printer is used
|
||||
in several templates it is listed only once.
|
||||
|
||||
The printer info feature works for local USB printers too.
|
||||
|
||||

|
||||
|
||||
## How it works
|
||||
First import all the stuff you need. Here we use the translation mechanism from Django for multi language support.
|
||||
The import the InvenTree libs and everything you need for plugin. Here we have ZPL for the Zebra bitmaps and socket
|
||||
for the IP connection to the printer.
|
||||
|
||||
The next part is this:
|
||||
|
||||
```python
|
||||
class ZebraLabelPlugin(LabelPrintingMixin, SettingsMixin, IntegrationPluginBase):
|
||||
|
||||
AUTHOR = "Michael Buchmann"
|
||||
DESCRIPTION = "Label printing plugin for Zebra printers"
|
||||
VERSION = ZEBRA_PLUGIN_VERSION
|
||||
NAME = "Zebra labels"
|
||||
SLUG = "zebra"
|
||||
TITLE = "Zebra Label Printer"
|
||||
```
|
||||
|
||||
The name of the class can be freely chosen but should be different from SLUG. Otherwise it does not
|
||||
show up. You reference to it in the entry_points section of the setup.py file.
|
||||
The parameters need to be like in the example. Then there is the description block. The keywords are fixed and
|
||||
need to be like that. The values are found in the UI as shown in the picture below.
|
||||
|
||||

|
||||
|
||||
Then we add the configuration parameters.
|
||||
```python
|
||||
SETTINGS = {
|
||||
'CONNECTION': {
|
||||
'name': _('Printer Interface'),
|
||||
'description': _('Select local or network printer'),
|
||||
'choices': [('local','Local printer e.g. USB'),('network','Network printer with IP address')],
|
||||
'default': 'local',
|
||||
},
|
||||
'PORT': {
|
||||
'name': _('Port'),
|
||||
'description': _('Network port in case of network printer'),
|
||||
'default': '9100',
|
||||
},
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
We need to define a dict with the name SETTINGS. Please be aware the keys need to be in all CAPITAL letters like CONNECTION.
|
||||
Simple parameters are just text strings like the port. We can set a default. The name and description shows up in the UI.
|
||||
Instead of a simple text we can also use choices. The first string like "local" it the key you use in the code. The second
|
||||
one is the description in the UI.
|
||||
After that we need to define a function:
|
||||
|
||||
```python
|
||||
def print_label(self, **kwargs){
|
||||
```
|
||||
|
||||
The kwargs is a dict with the following keys:
|
||||
|
||||
- pdf_data
|
||||
- user
|
||||
- filename
|
||||
- label_instance
|
||||
- item_instance
|
||||
- width
|
||||
- height
|
||||
- png_file
|
||||
|
||||
The item_instance is the part to be printed. This allows direct access to all part data. The arguments width and height
|
||||
come from the settings of the label in the admin interface. NOT from the html template.
|
||||
For the Zebra printer we use the png_file. This is a PIL (python Pillow) object with the graphic of the label in PNG format.
|
||||
The PIL object is a greyscale image. Because the printer can just print pure BW we convert this to a BW picture.
|
||||
|
||||
```python
|
||||
fn = lambda x : 255 if x > Threshold else 0
|
||||
label_image = label_image.convert('L').point(fn, mode='1')
|
||||
```
|
||||
|
||||
The threshold can by modified by a plugin parameter. 200 is a good starting value. This trick gives much better prints.
|
||||
We can put the result of this directly into the ZPL library.
|
||||
|
||||
```python
|
||||
l = zpl.Label(Height, Width, dpmm)
|
||||
li.set_darkness(darkness)
|
||||
...
|
||||
l.write_graphic(label_image, Width)
|
||||
l.endorigin()
|
||||
```
|
||||
|
||||
Width and Height define is the size of the label in millimeters as described above.
|
||||
The third parameter is the resolution of the printer in dots per mm.
|
||||
write_graphic converts the pillow data to ZPL.
|
||||
|
||||
The plugin was tested with a labels of various sizes defined using css and html. The DPI scaling
|
||||
can be chosen in the InvenTree settings. 800 is a good value because it gives high quality.
|
||||
|
||||
The rest of the code is just output to the printer on different interfaces.
|
||||
|
||||
Happy printing.
|
||||
@@ -0,0 +1,40 @@
|
||||
---
|
||||
name: inventree-zebra
|
||||
author: wolflu05
|
||||
license: GPL-3.0+
|
||||
open_source: true
|
||||
stable: true
|
||||
maintained: true
|
||||
pypi: true
|
||||
package_name: inventree-zebra
|
||||
github: https://github.com/wolflu05/inventree-zebra
|
||||
gitlab:
|
||||
source:
|
||||
issue_tracker: https://github.com/wolflu05/inventree-zebra/issues
|
||||
website:
|
||||
categories:
|
||||
- Printer
|
||||
tags:
|
||||
- Label
|
||||
- Printer
|
||||
- Zebra
|
||||
---
|
||||
Zebra label printer driver plugin for InvenTree
|
||||
|
||||
# inventree-zebra
|
||||
|
||||
[](https://opensource.org/license/gpl-3-0)
|
||||

|
||||
|
||||
A zebra label printer driver plugin compatible with the [InvenTree](https://inventree.org/) Machine Registry.
|
||||
|
||||

|
||||
|
||||
## Installation
|
||||
|
||||
> [!IMPORTANT]
|
||||
> This plugin is only compatible with InvenTree>=1.1.0
|
||||
|
||||
Goto "Admin Center > Plugins > Install Plugin" and enter `inventree-zebra` as package name and activate it.
|
||||
|
||||
Then goto "Admin Center > Machines" and create a new machine using this driver.
|
||||
@@ -0,0 +1,10 @@
|
||||
---
|
||||
title: Publishers
|
||||
template: main.html
|
||||
render_macros: true
|
||||
description: "The publishers of community plugins for InvenTree."
|
||||
---
|
||||
|
||||
Publishers are the authors and maintainers of the plugins in the [plugin list](community.md), and of posts on the [blog](../blog/index.md).
|
||||
|
||||
{{ publisher_list() }}
|
||||
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Plugins by Tag
|
||||
template: main.html
|
||||
render_macros: true
|
||||
description: "Community plugins for InvenTree, grouped by tag."
|
||||
---
|
||||
|
||||
# Plugins by Tag
|
||||
|
||||
The full list of plugins is available on the main [plugin list](community.md) page. Click on a tag to jump to the plugins that are marked with it.
|
||||
|
||||
{{ plugin_index('tags') }}
|
||||
Reference in new issue
Block a user