2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-17 20:45:44 +00:00

[Plugin] Auto-create builds (#9574)

* Remove existing "create child builds" functionality

- Remove API fields
- Remove background task definition

* Basic plugin structure

* Bump API version

* Bump API version

* Bug fix

* working on plugin event handling

* Add new stub method

* Implement functionality

* Fix conflicts in api_version

* Docs

* Fix docs

* Fix event type
This commit is contained in:
Oliver
2025-06-14 11:26:48 +10:00
committed by GitHub
parent 68c3a41f84
commit c027a7cf7d
9 changed files with 133 additions and 122 deletions

View File

@ -0,0 +1,21 @@
---
title: Auto Create Child Builds Plugin
---
## Auto Create Child Builds Plugin
The **Auto Create Child Builds Plugin** provides a mechanism to automatically create build orders for sub-assemblies when a higher level build order is issued.
### Activation
This plugin is an *optional* plugin, and must be enabled in the InvenTree settings.
Additionally, the {{ globalsetting("ENABLE_PLUGINS_EVENTS", short=True) }} setting must be enabled in the InvenTree plugin settings. This is required to allow plugins to respond to events in the InvenTree system.
## Usage
When this plugin is enabled, any time a build order is issued, the plugin will automatically create build orders for any sub-assemblies that are required by the issued build order.
This process is performed in the background, and does not require any user interaction.
Any new build orders that are created by this plugin will be marked as `PENDING`, and will require review and approval by the user before they can be issued.

View File

@ -10,7 +10,7 @@ The **Auto Issue Orders Plugin** provides a mechanism to automatically issue pen
This plugin is an *optional* plugin, and must be enabled in the InvenTree settings.
Additionally, the "Enable Schedule Integration" setting must be enabled in the InvenTree plugin settings. This is required to allow plugins to run scheduled tasks.
Additionally, the {{ globalsetting("ENABLE_PLUGINS_SCHEDULE", short=True) }} setting must be enabled in the InvenTree plugin settings. This is required to allow plugins to run scheduled tasks.
### Plugin Settings

View File

@ -14,6 +14,7 @@ The following builtin plugins are available in InvenTree:
| Plugin Name | Description | Mandatory |
| ----------- | ----------- | --------- |
| [Auto Create Child Builds](./auto_create_builds.md) | Automatically create child build orders for sub-assemblies | No |
| [Auto Issue Orders](./auto_issue.md) | Automatically issue pending orders when target date is reached | No |
| [BOM Exporter](./bom_exporter.md) | Custom [exporter](../mixins/export.md) for BOM data | Yes |
| [Currency Exchange](./currency_exchange.md) | Currency exchange rate plugin | Yes |

View File

@ -238,6 +238,7 @@ nav:
- Label Printer: plugins/machines/label_printer.md
- Builtin Plugins:
- Builtin Plugins: plugins/builtin/index.md
- Auto Create Builds: plugins/builtin/auto_create_builds.md
- Auto Issue: plugins/builtin/auto_issue.md
- BOM Exporter: plugins/builtin/bom_exporter.md
- Currency Exchange: plugins/builtin/currency_exchange.md