InvenTree/docs
Oliver c5e81a7820
[UI] Preview Drawer (#12117)
* Add <GlobalPreviewDrawer> component

* Allow plugins to interact

* provide either pk or instance data

* open preview drawer from calendar views

* Launch preview drawer directly from tables

* Add preview types

* Fix types

* CLear data on close

* Fix transition

* Allow caller to pass preview component

* AttributeGrid

* Use a table component

* Display info items

* Navigate to detail page from drawer

* Updates

* Refactor to use part detail view

* Display parameters

* Fix image caching

* Apply same to StockItem

* Remove old component

* Refactor details grid component

* Preview panel for PurchaseOrder model

* Implement for SalesOrder

* Support ReturnOrder

* SupplierPart and ManufacturerPart

* Support preview in parameteric tables

* support Company and BuildOrder

* Fix numbervalue

* BuildOrder and SalesOrderShipment

* location and category

* add user setting

* Fix typing

* Handle link clicks within preview drawer

* fixes

* Implement onClose callback

* Handle row click when panel preview is disabled

* Support custom detail links

* update playwright tests

* UI tweaks

* Add CHANGELOG entry

* docs

* define default API params per model type

* Split out more docs pages

* Simplify state ref

* Refactoring

* Simplify PreviewDrawer component

* observe user setting in calendar view

* Enable PreviewDrawer from RowViewAction

* Push render functions onto ModelInformation dict

* Fix lib compilation

* Refactor internal uses of RowViewAction

* typescript fixes

* Simplify PreviewDrawer component structure

* remove TODO placeholders
2026-07-12 20:11:27 +10:00
..
_includes [plugin] Auto issue orders (#9565) 2025-06-03 17:07:12 +10:00
ci Enable more Ruff rules (#7930) 2024-08-27 09:04:55 +10:00
docs [UI] Preview Drawer (#12117) 2026-07-12 20:11:27 +10:00
generated refactor(docs): simplify docs files / pipelines (#9633) 2025-05-06 12:20:11 +01:00
.gitignore [plugin] Auto issue orders (#9565) 2025-06-03 17:07:12 +10:00
LICENSE Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
README.md Improvements to the documentation instructions (#11044) 2025-12-21 11:49:50 +11:00
__init__.py Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
extract_schema.py Remove unneeded AjaxView usage (#8461) 2024-11-11 09:11:20 +11:00
main.py Ensure configuration settings are documented (#11674) 2026-04-21 12:23:53 +10:00
mkdocs.yml [UI] Preview Drawer (#12117) 2026-07-12 20:11:27 +10:00
mlc_config.json chore(backend): Remove devops (#12265) 2026-06-27 11:30:28 +10:00
requirements.in chore(deps): bump the dependencies group across 2 directories with 16 updates (#12159) 2026-06-13 13:28:50 +10:00
requirements.txt chore(deps): bump the dependencies group across 1 directory with 12 updates (#12210) 2026-06-20 09:50:45 +10:00

README.md

InvenTree Documentation

Documentation Status

This repository hosts the official documentation for InvenTree, an open source inventory management system.

Prerequisites

InvenTree uses MkDocs to convert Markdown format .md files into HTML suitable for viewing in a web browser.

!!! info "Prerequisites"
To build and serve this documentation locally (e.g. for development), you will need:

* Python 3 installed on your system.
* An existing InvenTree installation containing the virtual environment that was created during installation.

These instructions assume you followed the [InvenTree bare metal installation instructions](./docs/start/install.md), so you'll have an `inventree` user, a home directory at `/home/inventree`, the InvenTree source code cloned from [GitHub](https://github.com/inventree/inventree) into `/home/inventree/src`, and a virtual environment at `/home/inventree/env`.  If you installed InvenTree some other way, this might vary, and you'll have to adjust these instructions accordingly.

!!! warning "Your InvenTree install will be updated!"
Some of the commands that follow will make changes to your install, for example, by running any pending database migrations. There's a small risk this may cause issues with your existing installation. If you can't risk this, consider setting up a separate InvenTree installation specifically for documentation development.

Building the documentation locally

To build the documentation locally, run these commands as the inventree user:

$ cd /home/inventree
$ source env/bin/activate

!!! info "(env) prefix"
The shell prompt should now display the (env) prefix, showing that you are operating within the context of the python virtual environment

You can now install the additional packages needed by mkdocs:

$ cd src
$ pip install --require-hashes -r docs/requirements.txt

Schema generation

Building the documentation requires extracting the API schema from the source code.

!!! tip
This command is only required when building the documentation for the first time, or when changes have been made to the API schema.

$ invoke build-docs

You will see output similar to this (truncated for brevity):

Running InvenTree database migrations...
Exporting definitions...
Exporting settings definition to '/home/inventree/src/docs/generated/inventree_settings.json'...
Exported InvenTree settings definitions to '/home/inventree/src/docs/generated/inventree_settings.json'
Exported InvenTree tag definitions to '/home/inventree/src/docs/generated/inventree_tags.yml'
Exported InvenTree filter definitions to '/home/inventree/src/docs/generated/inventree_filters.yml'
Exported InvenTree report context definitions to '/home/inventree/src/docs/generated/inventree_report_context.json'
Exporting definitions complete
Exporting schema file to '/home/inventree/src/docs/generated/schema.yml'

Schema export completed: /home/inventree/src/docs/generated/schema.yml
Documentation build complete, but mkdocs not requested

Viewing the documentation

Generate the HTML files from the markdown source files, and start the MkDocs webpage server:

$ mkdocs serve -f docs/mkdocs.yml

You can then point your web browser at http://localhost:8080/

Alternatively, you can use the invoke command:

$ invoke dev.docs-server

If you need to, use the -a option after mkdocs or invoke to set the address and port. Run invoke dev.docs-server --help for details.

Editing the Documentation Files

Once the server is running, it will monitor the documentation files for changes, and regenerate the HTML pages as required. Refresh your web browser to see the changes.

Admonitions

"Admonition" blocks can be added to the documentation source as follows:

!!! 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.).

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 follows:

{{ image("image_name.png", base="subfolder", title="Image title") }}

See the image macro in ./docs/main.py for more information.

Icons

Icons can be rendered (using the tabler icon set) as follows:

{{ icon("brand-github", color="red")}}

See the icon macro in ./docs/main.py for more information.

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