* Move data export code out of "importer" directory * Refactoring to allow data export via plugin * Add brief docs framework * Add basic DataExportMixin class * Pass context data through to the serializer * Extract custom serializer * Refactoring * Add builtin plugin for BomExport * More refactoring * Cleanup for UseForm hooks * Allow GET methods in forms * Create new 'exporter' app * Refactor imports * Run cleanup task on boot * Add enumeration for plugin mixin types * Refactor with_mixin call * Generate export options serializer * Pass plugin information through * Offload export functionality to the plugin * Generate output * Download generated file * Refactor frontend code * Generate params for downloading * Pass custom fields through to the plugin * Implement multi-level export for BOM data * Export supplier and manufacturer information * Export substitute data * Remove old BOM exporter * Export part parameter data * Try different app order * Use GET instead of POST request - Less 'dangerous' - no chance of performing a destructive operation * Fix for constructing query parameters - Ignore any undefined values! * Trying something * Revert to POST - Required, other query data are ignored * Fix spelling mistakes * Remove SettingsMixin * Revert python version * Fix for settings.py * Fix missing return * Fix for label mixin code * Run playwright tests in --host mode * Fix for choice field - Prevent empty value if field is required * Remove debug prints * Update table header * Playwright tests for data export * Rename app from "exporter" to "data_exporter" * Add frontend table for export sessions * Updated playwright testing * Fix for unit test * Fix build order unit test * Back to using GET instead of POST - Otherwise, users need POST permissions to export! - A bit of trickery with the forms architecture * Fix remaining unit tests * Implement unit test for BOM export - Including test for custom plugin * Fix unit test * Bump API version * Enhanced playwright tests * Add debug for CI testing * Single unit test only (for debugging) * Fix typo * typo fix * Remove debugs * Docs updates * Revert typo * Update tests * Serializer fix * Fix typo * Offload data export to the background worker - Requires mocking the original request object - Will need some further unit testing! * Refactor existing models into DataOutput - Remove LabelOutput table - Remove ReportOutput table - Remove ExportOutput table - Consolidate into single API endpoint * Remove "output" tables from frontend * Refactor frontend hook to be generic * Frontend now works with background data export * Fix tasks.py * Adjust unit tests * Revert 'plugin_key' to 'plugin' * Improve user checking when printing * Updates * Remove erroneous migration file * Tweak plugin registry * Adjust playwright tests * Refactor data export - Convert into custom hook - Enable for calendar view also * Add playwright tests * Adjust unit testing * Tweak unit tests * Add extra timeout to data export * Fix for RUF045
InvenTree Documentation
This repository hosts the official documentation for InvenTree, an open source inventory management system.
To serve this documentation locally (e.g. for development), you will need to have Python 3 installed on your system.
Setup
Run the following commands from the top-level project directory:
$ git clone https://github.com/inventree/inventree
$ pip install --require-hashes -r docs/requirements.txt
Serve Locally
To serve the pages locally, run the following command (from the top-level project directory):
$ mkdocs serve -f docs/mkdocs.yml -a localhost:8080
Edit Documentation Files
Once the server is running, it will monitor the documentation files for any changes, and update the served pages.
Admonitions
"Admonition" blocks can be added as follow:
!!! info "This is the admonition block title"
This is the admonition block content
Refer to the reference documentation to customize the admonition block to the use-case (eg. warning, missing, info, etc.).
Internal Links
Links to internal documentation pages must use relative pathing, otherwise the link will be broken by the readthedocs URL formatting.
Also, linking to an internal page must use the .md
suffix!
For example, to link to the page /part/views
from /stock/stocktake
, the link must be formed as follows:
Click [here](../part/views.md)
Formatting the link as follows:
Click [here](/part/views)
will result in a broken link.
Images
Images are served from the ./docs/assets/images
folder and can be added as follow:
{% with id="image_id", url="folder/image_name.png", description="Text shown if image is not loaded properly" %}
{% include 'img.html' %}
{% endwith %}
Replace:
image_id
with a short unique identifier for the image (most commonly,image_id
is same asimage_name
)folder
with the folder indocs/assets/images
in which the image is storedimage_name
with the name of the image.png
with the image extension (PNG or JPEG are preferred formats)
Global variables
Refer to the reference documentation to find out how to add global variables to the documentation site.
Global variables should be added in the # Global Variables
section of the mkdocs.yml
configuration file.
Credits
This documentation makes use of the mkdocs-material template