2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-13 15:20: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

@@ -36,9 +36,7 @@ There are two variables in the configuration file which define the operation of
In the example below, SSO provider modules are activated for *google*, *github* and *microsoft*. Specific configuration options are specified for the *microsoft* provider module:
{% with id="SSO", url="settings/sso_config.png", description="SSO Config" %}
{% include 'img.html' %}
{% endwith %}
{{ image("settings/sso_config.png", "SSO Config") }}
!!! info "Provider Module Format"
Note that the provider modules specified in `social_backends` must be prefixed with `allauth.socialaccounts.providers`
@@ -69,17 +67,13 @@ Once your external SSO app has been created, you need to create a new *SocialAcc
In the admin interface, select *Add Social Application*
{% with id="social-add", url="settings/social_account_add.png", description="Add Social Application" %}
{% include 'img.html' %}
{% endwith %}
{{ image("settings/social_account_add.png", "Add Social Application") }}
#### Configure Social Application
Configure the social application entry with the app details:
{% with id="social-configure", url="settings/social_application_configure.png", description="Configure Social Application" %}
{% include 'img.html' %}
{% endwith %}
{{ image("settings/social_application_configure.png", "Configure Social Application") }}
- Select the *provider* type as required
- Provide a *name* for the application (note that this should match the *name* used for any custom settings provided in the configuration file)
@@ -117,16 +111,12 @@ Now that the social application is created, you need to enable SSO authenticatio
In the [settings screen](./global.md), navigate to the *Login Settings* panel. Here you will see the required configuration options to enable SSO:
{% with id="sso-settings", url="settings/sso_settings.png", description="SSO Settings" %}
{% include 'img.html' %}
{% endwith %}
{{ image("settings/sso_settings.png", "SSO Settings") }}
| Setting | Description |
| --- | --- |
| Enable SSO | Enable this option to allow single sign on for user login |
| Enable SSO registration | Allow users to self-register with SSO |
| Auto-fill SSO users | Automatically fill out user account data with information provided by external SSO app |
| Allowed domains | Optionally restrict user registration to certain domains |
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("LOGIN_ENABLE_SSO") }}
{{ globalsetting("LOGIN_SIGNUP_SSO_AUTO") }}
### Configure Email
@@ -136,12 +126,12 @@ Note that [email settings](./email.md) must be correctly configured before SSO w
InvenTree has the ability to synchronize groups assigned to each user directly from the IdP. To enable this feature, navigate to the *Login Settings* panel in the [settings screen](./global.md) first. Here, the following options are available:
| Setting | Description |
| --- | --- |
| Enable SSO group sync | Enable synchronizing InvenTree groups with groups provided by the IdP |
| SSO group key | The name of the claim containing all groups, e.g. `groups` or `roles` |
| SSO group map | A mapping from SSO groups to InvenTree groups as JSON, e.g. `{"/inventree/admins": "admin"}`. If the mapped group does not exist once a user signs up, a new group without assigned permissions will be created. |
| Remove groups outside of SSO | Whether groups should be removed from the user if they are not present in the IdP data |
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("LOGIN_ENABLE_SSO_GROUP_SYNC") }}
{{ globalsetting("SSO_GROUP_KEY") }}
{{ globalsetting("SSO_GROUP_MAP") }}
{{ globalsetting("SSO_REMOVE_GROUPS") }}
!!! warning "Remove groups outside of SSO"
Disabling this feature might cause security issues as groups that are removed in the IdP will stay assigned in InvenTree

View File

@@ -47,9 +47,7 @@ To access the admin interface, select the "Admin" option from the drop-down user
An administration panel will be presented as shown below:
{% with id="admin", url="admin/admin.png", description="InvenTree Admin Panel" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/admin.png", "Admin panel") }}
!!! info "Admin URL"
To directly access the admin interface, append /admin/ to the InvenTree site URL - e.g. http://localhost:8000/admin/
@@ -58,9 +56,7 @@ An administration panel will be presented as shown below:
Database objects can be listed and filtered directly. The image below shows an example of displaying existing part categories.
{% with id="part_cats", url="admin/part_cats.png", description="Display part categories" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/part_cats.png", "Part categories") }}
!!! info "Permissions"
A "staff" account does not necessarily provide access to all administration options, depending on the roles assigned to the user.
@@ -69,14 +65,10 @@ Database objects can be listed and filtered directly. The image below shows an e
Some admin views support filtering of results against specified criteria. For example, the list of Part objects can be filtered as follows:
{% with id="filter", url="admin/filter.png", description="Filter part list" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/filter.png", "Filter part list") }}
#### Edit Database Objects
Individual database objects can be edited directly in the admin interface. The image below shows an example of editing a Part object:
{% with id="edit_part", url="admin/edit_part.png", description="Edit Part object" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/edit_part.png", "Edit part") }}

View File

@@ -8,6 +8,4 @@ InvenTree provides data export functionality for a variety of data types. Most d
In the top right corner of the table, click the "Export Data" button to export the data in the table.
{% with id="export", url="admin/export.png", description="Export data" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/export.png", "Export data") }}

View File

@@ -25,8 +25,11 @@ Configuration of basic server settings:
{{ globalsetting("INVENTREE_COMPANY_NAME") }}
{{ globalsetting("INVENTREE_INSTANCE") }}
{{ globalsetting("INVENTREE_INSTANCE_TITLE") }}
{{ globalsetting("INVENTREE_INSTANCE_ID") }}
{{ globalsetting("INVENTREE_ANNOUNCE_ID") }}
{{ globalsetting("INVENTREE_RESTRICT_ABOUT") }}
{{ globalsetting("DISPLAY_FULL_NAMES") }}
{{ globalsetting("DISPLAY_PROFILE_INFO") }}
{{ globalsetting("INVENTREE_UPDATE_CHECK_INTERVAL") }}
{{ globalsetting("INVENTREE_DOWNLOAD_FROM_URL") }}
{{ globalsetting("INVENTREE_DOWNLOAD_IMAGE_MAX_SIZE") }}
@@ -101,6 +104,8 @@ Configuration of pricing data and currency support:
| ---- | ----------- | ------- | ----- |
{{ globalsetting("INVENTREE_DEFAULT_CURRENCY") }}
{{ globalsetting("CURRENCY_CODES") }}
{{ globalsetting("CURRENCY_UPDATE_PLUGIN") }}
{{ globalsetting("CURRENCY_UPDATE_INTERVAL") }}
{{ globalsetting("PRICING_DECIMAL_PLACES_MIN") }}
{{ globalsetting("PRICING_DECIMAL_PLACES") }}
{{ globalsetting("PRICING_UPDATE_DAYS") }}
@@ -131,6 +136,15 @@ Configuration of report generation:
{{ globalsetting("REPORT_DEBUG_MODE") }}
{{ globalsetting("REPORT_LOG_ERRORS") }}
### Label Printing
Configuration of label printing:
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ globalsetting("LABEL_ENABLE") }}
{{ globalsetting("LABEL_DPI") }}
### Parts
| Name | Description | Default | Units |
@@ -226,3 +240,7 @@ Refer to the [return order settings](../sales/return_order.md#return-order-setti
{{ globalsetting("ENABLE_PLUGINS_SCHEDULE") }}
{{ globalsetting("ENABLE_PLUGINS_EVENTS") }}
{{ globalsetting("ENABLE_PLUGINS_INTERFACE") }}
### Project Codes
Refer to the [project code settings](../concepts/project_codes.md).

View File

@@ -41,17 +41,13 @@ The following steps outline the process of importing data into InvenTree:
An import session can be created via the methods outlined above. The first step is to create an import session, and upload the data file to import. Note that depending on the context of the data import, the user may have to select the database model to import data into.
{% with id="import-create", url="admin/import_session_create.png", description="Create import session" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/import_session_create.png", "Create import session") }}
### Map Data Fields
Next, the user must map the data fields in the uploaded file to the fields in the database model. This is a critical step, as the data fields must be correctly matched to the database fields.
{% with id="import-map", url="admin/import_session_map.png", description="Map data fields" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/import_session_map.png", "Map data fields") }}
The InvenTree server will attempt to automatically associate the data fields in the uploaded file with the database fields. However, the user may need to manually adjust the field mappings to ensure that the data is imported correctly.
@@ -65,9 +61,7 @@ Note that this process may take some time if the data file is large. The import
Once the data has been loaded into the import session, the user can process the data. This step will attempt to validate the data, and check for any errors or issues that may prevent the data from being imported.
{% with id="import-process", url="admin/import_session_process.png", description="Process data" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/import_session_process.png", "Process data") }}
Note that each row must be selected and confirmed by the user before it is actually imported into the database. Any errors which are detected will be displayed to the user, and the user can choose to correct the data and re-process it.

View File

@@ -8,18 +8,15 @@ Any critical server error logs are recorded to the database, and can be viewed b
In the admin interface, select the "Errors" view:
{% with id="admin_error_link", url="admin/admin_errors_link.png", description="Admin errors" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/admin_errors_link.png", "Admin errors") }}
!!! info "URL"
Alternatively, navigate to the error list view at /admin/error_report/error/
A list of error logs is presented.
{% with id="admin_error_logs", url="admin/admin_errors.png", description="Error logs" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/admin_errors.png", "Error logs") }}
!!! info "Deleting Logs"
Error logs should be deleted periodically

View File

@@ -35,9 +35,7 @@ InvenTree functionality is split into a number of distinct roles. A group will h
- **Sales Order** - The *sales* role is related to accessing Sales Order data
- **Return Order** - The *return* role is related to accessing Return Order data
{% with id="Roles Admin View", url="admin/roles.png", description="Roles" %}
{% include 'img.html' %}
{% endwith %}
{{ image("admin/roles.png", "Roles") }}
### Role Permissions

View File

@@ -10,25 +10,23 @@ The various user settings described below can be configured for an individual us
The *Account Settings* screen shows configuration options for your user account, including linking [third party logins](./SSO.md) and [multi factor authentication](./MFA.md):
{% with id="user-account", url="settings/user_account.png", description="User Account Settings" %}
{% include 'img.html' %}
{% endwith %}
{{ image("settings/user_account.png", "User Account Settings") }}
### Display Settings
The *Display Settings* screen shows general display configuration options. Additionally, this screen allows the user to select the primary language in which InvenTree is displayed.
The *Display Settings* screen shows general display configuration options:
{% with id="user-display", url="settings/user_display.png", description="User Display Settings" %}
{% include 'img.html' %}
{% endwith %}
### Home Page
This screen allows the user to customize display of items on the InvenTree home page.
{% with id="user-home", url="settings/user_home.png", description="Home Page Settings" %}
{% include 'img.html' %}
{% endwith %}
| Name | Description | Default | Units |
| ---- | ----------- | ------- | ----- |
{{ usersetting("ICONS_IN_NAVBAR") }}
{{ usersetting("STICKY_HEADER") }}
{{ usersetting("DATE_DISPLAY_FORMAT") }}
{{ usersetting("FORMS_CLOSE_USING_ESCAPE") }}
{{ usersetting("PART_SHOW_QUANTITY_IN_FORMS") }}
{{ usersetting("DISPLAY_SCHEDULE_TAB") }}
{{ usersetting("DISPLAY_STOCKTAKE_TAB") }}
{{ usersetting("TABLE_STRING_MAX_LENGTH") }}
{{ usersetting("ENABLE_LAST_BREADCRUMB") }}
### Search Settings