Files
InvenTree/docs
OliverandClaude Opus 5.5 a44d6da500 Fixes for stale stock (#13369)
* Remove unused settings

Remove settings which have had no effect since the legacy user interface
was removed (or which were never implemented):

- STOCK_SHOW_INSTALLED_ITEMS
- PART_SHOW_RELATED
- BARCODE_INPUT_DELAY
- PLUGIN_UPDATE_CHECK
- REPORT_INLINE (user)
- LABEL_INLINE (user)

Remove them from the settings pages and documentation, and use other
boolean user settings in the tests which used LABEL_INLINE as an example.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Respect part creation and duplication settings

The PART_COPY_TESTS, PART_CATEGORY_PARAMETERS and PART_CREATE_SUPPLIER
settings had no effect since the legacy user interface was removed. The
part forms now use them for the defaults of the "copy tests" and "copy
category parameters" options, and to show the initial supplier fields.

Adds Playwright tests for the create and duplicate part forms.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Enforce expired stock and IPN edit settings

The STOCK_ALLOW_EXPIRED_BUILD, STOCK_ALLOW_EXPIRED_SALE and
PART_ALLOW_EDIT_IPN settings had no effect since the legacy user
interface was removed.

- When stock expiry is enabled, expired stock can only be allocated to
  build orders / sales orders if the corresponding setting permits it.
  This applies to manual (API) allocation, allocation by serial number,
  auto-allocation, and new allocations created via the model. Existing
  allocations of since-expired stock remain editable.
- When PART_ALLOW_EDIT_IPN is disabled, the IPN of an existing part cannot
  be changed via the API, and the IPN field is disabled in the edit form.

Adds unit tests for each allocation path and the IPN rule, a Playwright
test for the IPN field, and documents the expired stock settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Additional docs

* Update CHANGELOG

* Fix playwright test

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-26 11:06:41 +11:00
..
2026-11-14 22:34:18 +11:00
2024-08-27 09:04:55 +10:00
2026-11-26 11:06:41 +11:00
2023-04-22 23:35:25 +10:00
2026-11-14 22:34:18 +11:00
2026-11-24 13:40:46 +11:00
2023-04-22 22:40:29 +10:00
2026-11-24 10:53:12 +11:00
2026-11-14 22:34:18 +11:00
2026-11-14 22:34:18 +11:00
2026-11-14 22:34:18 +11:00

InvenTree Documentation

Documentation Status

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

Prerequisites

InvenTree uses Zensical to convert Markdown format .md files into HTML suitable for viewing in a web browser. The site configuration is in docs/mkdocs.yml (Zensical reads the mkdocs configuration format).

!!! 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 to build the documentation:

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

Schema generation

Building the documentation requires extracting the API schema (and settings definitions) from the source code. The API reference pages in docs/docs/api/schema/ are generated from this schema and are not tracked in git.

!!! 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 zensical build not requested

To generate the schema files and build the static HTML site (in docs/site/), including the post-build checks that all settings are documented, run:

invoke build-docs --build

Viewing the documentation

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

zensical serve -a localhost:8080 -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 zensical serve 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 is built with Zensical, from the team behind Material for MkDocs