2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-04-16 08:18:53 +00:00

[plugin] Auto issue orders (#9565)

* Add builtin plugin for auto-issuing orders

* Add plugin to auto-issue orders

* Add placeholder documentation

* Fix typo

* Adds image macro

- To replace img.html
- includes checking if file exists

* Fix tooltips

* More docs

* Adjust plugin settings filters

* docs

* More docs

* More docs

* Updates

* Less restrictive URL checking

* Refactor build order page

* Fix typo

* Allow 429

* Debug output

* More debug

* Construct assets dir

* Cleanup

* Update docs README

* Refactoring more pages

* Fix image link

* Fix SSO settings

* Add hook to check for missing settings

- Ensure that all settings are documented!

* Add missing user settings

* Update docstring

* Tweak SSO.md

* Image updates

* More updates

* Tweaks

* Exclude orders without a target_date

* Fix for issuing build orders

* Further refactoring

* Fixes

* Image refactoring

* More refactoring

* More refactoring

* Refactor app images

* Fix pathing issues

* Suppress some openapidocs warnings in logs

(much easier to debug docs build issues)

* Fix image reference

* Reduce error messages

* Fix image links

* Fix image links

* Reduce docs log output

* Ensure settings are loaded before displaying them

* Fix for UI test

* Fix unit test

* Test tweaks
This commit is contained in:
Oliver
2025-06-03 17:07:12 +10:00
committed by GitHub
parent 89f8f132e1
commit 11ab0203b1
124 changed files with 1178 additions and 957 deletions

View File

@@ -9,17 +9,12 @@ New parts can be created from the *Part Category* view, by pressing the *New Par
!!! info "Permissions"
If the user does not have "create" permission for the *Part* permission group, the *New Part* button will not be available.
{% with id="new", url="part/new_part.png", description="New Part" %}
{% include "img.html" %}
{% endwith %}
{{ image("part/new_part.png", "New part") }}
A part creation form is opened as shown below:
{% with id="newform", url="part/part_create_form.png", description="New Part Form" %}
{% include "img.html" %}
{% endwith %}
{{ image("part/part_create_form.png", "New part form") }}
Fill out the required part parameters and then press *Submit* to create the new part. If there are any form errors, you must fix these before the form can be successfully submitted.
@@ -32,9 +27,7 @@ If the *Create Initial Stock* setting is enabled, then an extra section is avail
If this setting is enabled, the following elements are available in the form:
{% with id="initial_stock", url="part/part_initial_stock.png", descript="Initial stock" %}
{% include "img.html" %}
{% endwith %}
{{ image("part/part_initial_stock.png", "Initial stock") }}
Checking the *Create Initial Stock* form input then allows the creation of an initial quantity of stock for the new part.
@@ -43,18 +36,11 @@ Checking the *Create Initial Stock* form input then allows the creation of an in
If the part is marked as *Purchaseable*, the form provides some extra options to initialize the new part with manufacturer and / or supplier information:
{% with id="supplierinfo", url="part/part_create_supplier.png", descript="Add supplier information" %}
{% include "img.html" %}
{% endwith %}
{{ image("part/part_create_supplier.png", "Part supplier options") }}
If the *Add Supplier Data* option is checked, then supplier part and manufacturer part information can be added to the newly created part:
{% with id="suppliers", url="part/part_new_suppliers.png", descript="Part supplier information" %}
{% include "img.html" %}
{% endwith %}
{{ image("part/part_new_suppliers.png", "Part supplier information") }}
## Other Part Creation Methods

View File

@@ -4,7 +4,7 @@ title: Parts
## Part
The *Part* is the core element of the InvenTree ecosystem. A Part object is the archetype of any stock item in your inventory. Parts are arranged in hierarchical categories which are used to organise and filter parts by function.
The *Part* is the core element of the InvenTree ecosystem. A Part object is the archetype of any stock item in your inventory. Parts are arranged in hierarchical categories which are used to organize and filter parts by function.
## Part Category
@@ -12,9 +12,7 @@ Part categories are very flexible and can be easily arranged to match a particul
Each part category also shows a list of sub-categories which exist underneath it.
{% with id="part_category", url="part/part_category.png", description="Parts are arranged in categories" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_category.png", "Part category") }}
The category part list provides an overview of each part:
@@ -100,9 +98,7 @@ Each type of part can define a custom "unit of measure" which is a standardized
It is possible to track parts using physical quantity values, such as *metres* or *litres*. For example, it would make sense to track a "wire" in units of "metres":
{% with id="part_units", url="part/part_units.png", description="Parts units" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_units.png", "Part units") }}
### Supplier Part Units
@@ -113,17 +109,13 @@ By default, units of measure for [supplier parts](../purchasing/supplier.md#supp
If an incompatible unit type is specified, an error will be displayed:
{% with id="part_units_invalid", url="part/part_units_invalid.png", description="Invalid supplier part units" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_units_invalid.png", "Invalid supplier part units") }}
## Part Images
Each part can have an associated image, which is used for display purposes throughout the InvenTree interface. A prominent example is on the part detail page itself:
{% with id="part_image", url="part/part_image_example.png", description="Part image example" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_image_example.png", "Part image example") }}
### Image Thumbnails
@@ -135,9 +127,7 @@ Thumbnail images are also used throughout the interface, particularly in table v
In the web interface, part images can be uploaded directly from the [part view](./views.md). Hover the mouse cursor over the Part image to reveal multiple options:
{% with id="part_image_uplaod", url="part/part_image_upload.png", description="Upload part image" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_image_upload.png", "Part image upload") }}
| Action | Description |
| --- | --- |

View File

@@ -13,24 +13,20 @@ Users can select to receive notifications when certain events occur.
Each user must have a valid email address associated with their account to receive email notifications
Notifications are also shown in the user interface. New notifications are announced in the header.
{% with id="notification_header", url="part/notification_header.png", description="One new notification in the header" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/notification_header.png", "Notification header") }}
They can be viewed in a flyout.
{% with id="notification_flyout", url="part/notification_flyout.png", description="One new notification in the flyout" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/notification_flyout.png", "Notification flyout") }}
All current notifications are listed in the inbox.
{% with id="notification_inbox", url="part/notification_inbox.png", description="One new notification in the notification inbox" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/notification_inbox.png", "Notification inbox") }}
All past notification are listed in the history. They can be deleted one-by-one or all at once from there.
{% with id="notification_history", url="part/notification_history.png", description="One old notification in the notification history" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/notification_history.png", "Notification history") }}
## Part Notification Events
@@ -59,15 +55,11 @@ When subscribed to a *Part*, a user will receive notifications when events occur
If a user is subscribed to a particular part, it will be indicated as shown below:
{% with id="part_sub_on", url="part/part_subscribe_on.png", description="Subscribe" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_subscribe_on.png", "Part subscribed") }}
If the user is not subscribed, the subscription icon is greyed out, as shown here:
{% with id="part_sub_off", url="part/part_subscribe_off.png", description="Subscribe" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_subscribe_off.png", "Part not subscribed") }}
Clicking on this icon will toggle the subscription status for this part.

View File

@@ -11,9 +11,7 @@ There is no limit for the number of part parameters and they are fully customiza
Here is an example of parameters for a capacitor:
{% with id="part_parameters_example", url="part/part_parameters_example.png", description="Part Parameters Example List" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_parameters_example.png", "Part Parameters Example") }}
## Parameter Templates
@@ -42,9 +40,7 @@ To create a template:
An existing template can be edited by clicking on the "Edit" button associated with that template:
{% with id="part_parameter_template", url="part/parameter_template_edit.png", description="Edit Parameter Template" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/parameter_template_edit.png", "Edit Parameter Template") }}
### Create Parameter
@@ -52,9 +48,7 @@ After [creating a template](#create-template) or using the existing templates, y
To add a parameter, navigate to a specific part detail page, click on the "Parameters" tab then click on the "New Parameters" button, the `Create Part Parameter` form will be displayed:
{% with id="create_part_parameter", url="part/create_part_parameter.png", description="Create Part Parameter Form" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/create_part_parameter.png", "Create Part Parameter Form") }}
Select the parameter `Template` you would like to use for this parameter, fill-out the `Data` field (value of this specific parameter) and click the "Submit" button.
@@ -64,17 +58,13 @@ Parametric tables gather all parameters from all parts inside a particular [part
To access a category's parametric table, click on the "Parameters" tab within the category view:
{% with id="parametric_table_tab", url="part/parametric_table_tab.png", description="Parametric Table Tab" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/parametric_table_tab.png", "Parametric Table Tab") }}
### Sorting by Parameter Value
The parametric parts table allows the returned parts to be sorted by particular parameter values. Click on the header of a particular parameter column to sort results by that parameter:
{% with id="sort_by_param", url="part/part_sort_by_param.png", description="Sort by Parameter" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_sort_by_param.png", "Sort by Parameter") }}
## Parameter Units
@@ -89,23 +79,15 @@ The in-built conversion functionality means that parameter values can be input i
If a part parameter is created with a value which is incompatible with the units specified for the template, it will be rejected:
{% with id="invalid_units", url="part/part_invalid_units.png", description="Invalid Parameter Units" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_invalid_units.png", "Invalid Parameter Units") }}
This behaviour can be disabled if required, so that any parameter value is accepted:
{% with id="enforce_units", url="part/part_parameters_enforce.png", description="Enforce part parameters" %}
{% include 'img.html' %}
{% endwith %}
This behaviour can be disabled if required, so that any parameter value is accepted.
### Parameter Sorting
Parameter sorting takes unit conversion into account, meaning that values provided in different (but compatible) units are sorted correctly:
{% with id="sort_by_param_units", url="part/part_sorting_units.png", description="Sort by Parameter Units" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_sorting_units.png", "Sort by Parameter Units") }}
### Selection Lists

View File

@@ -42,9 +42,7 @@ The pricing tab is divided into different sections, based on the available prici
At the top of the pricing tab, an *Overview* section shows a synopsis of the available pricing data:
{% with id="pricing_overview", url="part/pricing_overview.png", description="Pricing Overview" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_overview.png", "Pricing Overview") }}
This overview tab provides information on the *range* of pricing data available within each category. If pricing data is not available for a given category, it is marked as *No data*.
@@ -65,9 +63,7 @@ A particular Part may have a set of *Internal Price Breaks* which denote quantit
If desired, price breaks can be specified based on particular quantities.
{% with id="pricing_internal", url="part/pricing_internal.png", description="Internal Pricing" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_internal.png", "Internal Pricing") }}
#### Pricing Override
@@ -77,25 +73,19 @@ If the **Internal Price Override** setting is enabled, then internal pricing dat
If the Part is designated as *purchaseable*, then historical purchase cost information is displayed (and used to calculate overall pricing). Purchase history data is collected from *completed* [purchase orders](../purchasing/purchase_order.md).
{% with id="pricing_purchase_history", url="part/pricing_purchase_history.png", description="Purchase History" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_purchase_history.png", "Purchase History") }}
### Supplier Pricing
If supplier pricing information is available, this can be also used to determine price range data.
{% with id="pricing_supplier", url="part/pricing_supplier.png", description="Supplier Pricing" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_supplier.png", "Supplier Pricing") }}
### BOM Pricing
If a Part is designated as an *assembly*, then the [Bill of Materials](../manufacturing/bom.md) (BOM) can be used to determine the price of the assembly. The price of each component in the BOM is used to calculate the overall price of the assembly.
{% with id="pricing_bom", url="part/pricing_bom.png", description="BOM Pricing" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_bom.png", "BOM Pricing") }}
#### BOM Pricing Chart
@@ -108,25 +98,19 @@ The BOM *Pricing Chart* displays two separate "pie charts", with minimum and max
For *template* parts, the price of any *variants* of the template is taken into account:
{% with id="pricing_variants", url="part/pricing_variants.png", description="Variant Pricing" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_variants.png", "Variant Pricing") }}
### Sale Pricing
If the Part is designated as *Salable* then sale price breaks are made available. These can be configured as desired by the user, to define the desired sale price at various quantities.
{% with id="pricing_sale_price_breaks", url="part/pricing_sale_price_breaks.png", description="Sale Pricing" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_sale_price_breaks.png", "Sale Pricing") }}
### Sale History
If the Part is designated as *Salable* then historical sale cost information is available. Sale history data is collected from *completed* [sales orders](../sales/sales_order.md).
{% with id="pricing_sale_history", url="part/pricing_sale_history.png", description="Sale History" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/pricing_sale_history.png", "Sale History") }}
### Price Data Caching

View File

@@ -37,9 +37,7 @@ The following options are available to control the behavior of part revisions.
Note that these options can be changed in the InvenTree settings:
{% with id="part_revision_settings", url="part/part_revision_settings.png", description="Part revision settings" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_revision_settings.png", "Part revision settings") }}
* **Enable Revisions**: If this setting is enabled, parts can have revisions. If this setting is disabled, parts cannot have revisions.
* **Assembly Revisions Only**: If this setting is enabled, only assembly parts can have revisions. This is useful if you only want to track revisions of assemblies, and not individual parts.
@@ -50,9 +48,7 @@ To create a new revision for a given part, navigate to the part detail page, and
Select the "Duplicate Part" action, to create a new copy of the selected part. This will open the "Duplicate Part" form:
{% with id="part_create_revision", url="part/part_create_revision.png", description="Create part revision" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_create_revision.png", "Create part revision") }}
In this form, make the following updates:
@@ -63,16 +59,12 @@ Once these changes (and any other required changes) are made, press *Submit* to
Once the form is submitted (without any errors), you will be redirected to the new part revision. Here you can see that it is linked to the original part:
{% with id="part_revision_b", url="part/part_revision_b.png", description="Revision B" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_revision_b.png", "Part revision B") }}
## Revision Navigation
When multiple revisions exist for a particular part, you can navigate between revisions using the *Select Part Revision* drop-down which renders at the top of the part page:
{% with id="part_revision_select", url="part/part_revision_select.png", description="Select part revision" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_revision_select.png", "Select part revision") }}
Note that this revision selector is only visible when multiple revisions exist for the part.

View File

@@ -29,6 +29,4 @@ Additionally, any orders with a target date in the "past" are also ignored for t
Finally, any unexpected or unscheduled stock operations which are not associated with future orders cannot be predicted or displayed in the scheduling tab.
{% with id="scheduling", url="part/scheduling.png", description="Part Scheduling View" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/scheduling.png", "Part Scheduling View") }}

View File

@@ -31,15 +31,11 @@ Historical stocktake data for a particular part can be viewed in the *Stocktake*
This tab displays a chart of historical stock quantity and cost data, and corresponding tabulated data:
{% with id="stocktake_tab", url="part/part_stocktake_tab.png", description="Part stocktake tab" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_tab.png", "Part stocktake tab") }}
If this tab is not visible, ensure that the *Part Stocktake* [user setting](../settings/user.md) is enabled in the *Display Settings* section.
{% with id="stocktake_tab_enable", url="part/part_stocktake_enable_tab.png", description="Enable stocktake tab" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_enable_tab.png", "Enable stocktake tab") }}
!!! info "Permission Required"
The stocktake tab will be unavailable if your user account does not have the [required permissions](#stocktake-permissions)
@@ -61,9 +57,7 @@ Stocktake reports are made available for download as a tabulated `.csv` file, wh
There are a number of configuration options available in the [settings view](../settings/global.md):
{% with id="stocktake_settings", url="part/part_stocktake_settings.png", description="Stocktake settings" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_settings.png", "Stocktake settings") }}
### Enable Stocktake
@@ -71,7 +65,7 @@ Enable or disable stocktake functionality. Note that by default, stocktake funct
### Automatic Stocktake Period
Configure the number of days between genenration of [automatic stocktake reports](#automatic-stocktake). If this value is set to zero, automatic stocktake reports will not be generated.
Configure the number of days between generation of [automatic stocktake reports](#automatic-stocktake). If this value is set to zero, automatic stocktake reports will not be generated.
### Delete Old Reports
@@ -81,9 +75,7 @@ Configure how many days stocktake reports will be retained, before being deleted
The *Stocktake Settings* display also provides a table of historical stocktake reports:
{% with id="stocktake_report_table", url="part/part_stocktake_report_table.png", description="Stocktake reports" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_report_table.png", "Stocktake report table") }}
## Stocktake Permissions
@@ -101,9 +93,7 @@ Manual stocktake can be performed via the web interface in a number of locations
When performing a stocktake, various options are presented to the user:
{% with id="stocktake_generate", url="part/part_stocktake_generate.png", description="Generate stocktake report" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_generate.png", "Generate stocktake report") }}
| Option | Description |
| --- | --- |
@@ -115,27 +105,21 @@ When performing a stocktake, various options are presented to the user:
### Part Stocktake
A stockake report for a single part can be generated from the *Stocktake Tab* on the part page:
A stocktake report for a single part can be generated from the *Stocktake Tab* on the part page:
{% with id="stocktake_part", url="part/part_stocktake_from_part.png", description="Generate part stocktake report" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_from_part.png", "Generate part stocktake report") }}
### Category Stocktake
A stocktake report for a part category can be generated from the *Part Category* page:
{% with id="stocktake_category", url="part/part_stocktake_from_category.png", description="Generate category stocktake report" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_from_category.png", "Generate category stocktake report") }}
### Location Stocktake
A stocktake report for a stock location can be generated from the *Stock Location* page:
{% with id="stocktake_location", url="part/part_stocktake_from_location.png", description="Generate location stocktake report" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stocktake_from_location.png", "Generate location stocktake report") }}
### Automatic Stocktake
@@ -144,3 +128,15 @@ If enabled, stocktake reports can be generated automatically at a configured int
### API Functionality
Stocktake actions can also be performed via the [API](../api/index.md).
## Stocktake Settings
The following settings are available for stocktake:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("STOCKTAKE_ENABLE") }}
{{ globalsetting("STOCKTAKE_EXCLUDE_EXTERNAL") }}
{{ globalsetting("STOCKTAKE_AUTO_DAYS") }}
{{ globalsetting("STOCKTAKE_DELETE_REPORT_DAYS") }}
{{ globalsetting("DISPLAY_PROFILE_INFO") }}

View File

@@ -10,9 +10,7 @@ A test template defines the parameters of the test; the individual stock items c
Test templates "cascade" down to variant parts: this means that if a master part has multiple variants, any test template defined for the master part will be assigned to the variants. Any stock items of the variant parts will have the same test templates associated with them.
{% with id="part_test_templates", url="part/part_test_templates.png", description="Part Test Templates" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_test_templates.png", "Part Test Templates") }}
### Test Template Parameters

View File

@@ -15,9 +15,7 @@ The categories of each part is displayed on the top navigation bar as show in th
Details provides information about the particular part. Parts details can be displayed in the header panel clicking on "Show Part Details" toggle button.
{% with id="part_overview", url="part/part_overview.png", description="Part details" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_overview.png", "Part Overview") }}
A Part is defined in the system by the following parameters:
@@ -57,9 +55,7 @@ If a part is a *Template Part* then the *Variants* tab will be visible.
The *Stock* tab shows all the stock items for the selected *Part*. The user can quickly determine how many parts are in stock, where they are located, and the status of each *Stock Item*.
{% with id="part_stock", url="part/part_stock.png", description="Part Stock" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_stock.png", "Part Stock") }}
#### Functions
@@ -99,9 +95,7 @@ The *Suppliers* tab displays all the *Part Suppliers* and *Part Manufacturers* f
This tab is only visible if the *Part* is designated as *Purchaseable*.
{% with id="part_manufacturers_suppliers", url="part/part_manufacturers_suppliers.png", description="Part Suppliers and Manufacturers" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_manufacturers_suppliers.png", "Part Suppliers and Manufacturers") }}
### Purchase Orders
@@ -131,9 +125,7 @@ Related Part denotes a relationship between two parts, when users want to show t
Related parts can be added and are shown under a table of the same name in the "Part" view:
{% with id="related_parts", url="part/part_related.png", description="Related Parts Example View" %}
{% include 'img.html' %}
{% endwith %}
{{ image("part/part_related.png", "Related Parts Example View") }}
This feature can be enabled or disabled in the global part settings.