InvenTree/docs
miggland 634daa2161
Add flag to API which allows using pack size (#4741)
* Add flag to API which allows using pack size when adding stock items manually

* Check for use_pack_size before pop

* Add test data and tests

* Improve data handling

* Add form field for use_pack_size when adding stock

* Add description of pack size to docs

* Don't check for supplier part if it is None

* Move form field to after supplier part, for better logic

* Fix wrong function

* Fix tests

* Adjust purchase price when using pack size

* Adjust help text for purchase price

* Adjust help text for purchase price some more

* Fix tests for purchase price of added stock

* Update api_version.py
2023-05-13 21:32:25 +10:00
..
_includes Replace mklint with djlint (#4746) 2023-05-02 20:03:52 +10:00
ci Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
docs Add flag to API which allows using pack size (#4741) 2023-05-13 21:32:25 +10:00
__init__.py Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
.gitignore Fixes for docs building (#4659) 2023-04-22 23:35:25 +10:00
LICENSE Documentation integration (#4653) 2023-04-22 22:40:29 +10:00
main.py Code style improvements (#4683) 2023-04-28 20:49:53 +10:00
mkdocs.yml Docs/devcontainer (#4787) 2023-05-12 17:13:48 +10:00
README.md Specify order currency (#4698) 2023-04-26 17:35:15 +10:00
requirements.txt Documentation integration (#4653) 2023-04-22 22:40:29 +10:00

InvenTree Documentation

Documentation Status

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
$ cd inventree/docs
$ pip install -r 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.).

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 indentifier for the image (most commonly, image_id is same as image_name)
  • folder with the folder in docs/assets/images in which the image is stored
  • image_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