diff --git a/_includes/config.yaml b/_includes/config.yaml
index 18e3197..9e18adb 100644
--- a/_includes/config.yaml
+++ b/_includes/config.yaml
@@ -7,11 +7,9 @@
# with the prefix INVENTREE_DB_
# e.g INVENTREE_DB_NAME / INVENTREE_DB_USER / INVENTREE_DB_PASSWORD
database:
- # Default configuration - sqlite filesystem database
- ENGINE: sqlite3
- NAME: '../inventree_default_db.sqlite3'
-
- # For more complex database installations, further parameters are required
+ # Uncomment (and edit) one of the database configurations below,
+ # or specify database options using environment variables
+
# Refer to the django documentation for full list of options
# --- Available options: ---
@@ -27,14 +25,22 @@ database:
# --- Example Configuration - sqlite3 ---
# ENGINE: sqlite3
- # NAME: '/path/to/database.sqlite3'
+ # NAME: '/home/inventree/database.sqlite3'
# --- Example Configuration - MySQL ---
- #ENGINE: django.db.backends.mysql
+ #ENGINE: mysql
#NAME: inventree
- #USER: inventree_username
+ #USER: inventree
#PASSWORD: inventree_password
- #HOST: '127.0.0.1'
+ #HOST: 'localhost'
+ #PORT: '3306'
+
+ # --- Example Configuration - Postgresql ---
+ #ENGINE: postgresql
+ #NAME: inventree
+ #USER: inventree
+ #PASSWORD: inventree_password
+ #HOST: 'localhost'
#PORT: '5432'
# Select default system language (default is 'en-us')
@@ -43,6 +49,7 @@ language: en-us
# System time-zone (default is UTC)
# Reference: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
# Select an option from the "TZ database name" column
+# Use the environment variable INVENTREE_TIMEZONE
timezone: UTC
# List of currencies supported by default.
@@ -57,6 +64,7 @@ currencies:
- USD
# Set debug to False to run in production mode
+# Use the environment variable INVENTREE_DEBUG
debug: True
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
@@ -65,6 +73,7 @@ debug: True
debug_toolbar: False
# Configure the system logging level
+# Use environment variable INVENTREE_LOG_LEVEL
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
log_level: WARNING
@@ -86,13 +95,14 @@ cors:
# - https://sub.example.com
# MEDIA_ROOT is the local filesystem location for storing uploaded files
-# By default, it is stored in a directory named 'inventree_media' local to the InvenTree directory
-# This should be changed for a production installation
-media_root: '../inventree_media'
+# By default, it is stored under /home/inventree
+# Use environment variable INVENTREE_MEDIA_ROOT
+media_root: '/home/inventree/media'
# STATIC_ROOT is the local filesystem location for storing static files
-# By default it is stored in a directory named 'inventree_static' local to the InvenTree directory
-static_root: '../inventree_static'
+# By default, it is stored under /home/inventree
+# Use environment variable INVENTREE_STATIC_ROOT
+static_root: '/home/inventree/static'
# Optional URL schemes to allow in URL fields
# By default, only the following schemes are allowed: ['http', 'https', 'ftp', 'ftps']
@@ -105,7 +115,8 @@ static_root: '../inventree_static'
# Backup options
# Set the backup_dir parameter to store backup files in a specific location
# If unspecified, the local user's temp directory will be used
-#backup_dir: '/home/inventree/backup/'
+# Use environment variable INVENTREE_BACKUP_DIR
+backup_dir: '/home/inventree/backup/'
# Permit custom authentication backends
#authentication_backends:
diff --git a/_includes/docker-compose.yml b/_includes/docker-compose.yml
new file mode 100644
index 0000000..c0ad82a
--- /dev/null
+++ b/_includes/docker-compose.yml
@@ -0,0 +1,100 @@
+version: "3.8"
+
+# Docker compose recipe for InvenTree
+# - Runs PostgreSQL as the database backend
+# - Runs Gunicorn as the web server
+# - Runs nginx as a reverse proxy
+# - Runs the background worker process
+
+# ---------------------------------
+# IMPORTANT - READ BEFORE STARTING!
+# ---------------------------------
+# Before running, ensure that you change the "/path/to/data" directory,
+# specified in the "volumes" section at the end of this file.
+# This path determines where the InvenTree data will be stored!
+
+services:
+ # Database service
+ # Use PostgreSQL as the database backend
+ # Note: this can be changed to a different backend,
+ # just make sure that you change the INVENTREE_DB_xxx vars below
+ db:
+ image: postgres
+ container_name: inventree_db
+ ports:
+ - 5432/tcp
+ environment:
+ - PGDATA=/var/lib/postgresql/data/pgdb
+ - POSTGRES_USER=pguser
+ - POSTGRES_PASSWORD=pgpassword
+ volumes:
+ - data:/var/lib/postgresql/data/
+ restart: unless-stopped
+
+ # InvenTree web server services
+ # Uses gunicorn as the web server
+ inventree:
+ image: inventree/inventree:latest
+ container_name: inventree_server
+ expose:
+ - 8080
+ depends_on:
+ - db
+ volumes:
+ - data:/home/inventree/data
+ - static:/home/inventree/static
+ environment:
+ - INVENTREE_DB_ENGINE=postgresql
+ - INVENTREE_DB_NAME=inventree
+ - INVENTREE_DB_USER=pguser
+ - INVENTREE_DB_PASSWORD=pgpassword
+ - INVENTREE_DB_PORT=5432
+ - INVENTREE_DB_HOST=db
+ restart: unless-stopped
+
+ # nginx acts as a reverse proxy
+ # static files are served by nginx
+ # web requests are redirected to gunicorn
+ nginx:
+ image: inventree/nginx:latest
+ container_name: inventree_proxy
+ depends_on:
+ - inventree
+ ports:
+ # Change "1337" to the port where you want InvenTree web server to be available
+ - 1337:80
+ volumes:
+ - static:/home/inventree/static
+
+ # background worker process handles long-running or periodic tasks
+ worker:
+ entrypoint: ./start_worker.sh
+ image: inventree/inventree:latest
+ container_name: inventree_worker
+ depends_on:
+ - db
+ - inventree
+ volumes:
+ - data:/home/inventree/data
+ - static:/home/inventree/static
+ environment:
+ - INVENTREE_DB_ENGINE=postgresql
+ - INVENTREE_DB_NAME=inventree
+ - INVENTREE_DB_USER=pguser
+ - INVENTREE_DB_PASSWORD=pgpassword
+ - INVENTREE_DB_PORT=5432
+ - INVENTREE_DB_HOST=db
+ restart: unless-stopped
+
+volumes:
+ # Static files, shared between containers
+ static:
+ # Persistent data, stored externally
+ data:
+ driver: local
+ driver_opts:
+ type: none
+ o: bind
+ # This directory specified where InvenTree data are stored "outside" the docker containers
+ # Change this path to a local system path where you want InvenTree data stored
+ device: /path/to/data
diff --git a/docs/admin/logs.md b/docs/admin/logs.md
index 7e85668..95564cd 100644
--- a/docs/admin/logs.md
+++ b/docs/admin/logs.md
@@ -12,7 +12,7 @@ In the admin interface, select the "Errors" view:
{% include 'img.html' %}
{% endwith %}
-!!! note "URL"
+!!! info "URL"
Alternatively, navigate to the error list view at /admin/error_report/error/
A list of error logs is presented.
@@ -21,7 +21,7 @@ A list of error logs is presented.
{% include 'img.html' %}
{% endwith %}
-!!! note "Deleting Logs"
+!!! info "Deleting Logs"
Error logs should be deleted periodically
## Reporting Errors
diff --git a/docs/admin/tasks.md b/docs/admin/tasks.md
new file mode 100644
index 0000000..1881cbb
--- /dev/null
+++ b/docs/admin/tasks.md
@@ -0,0 +1,29 @@
+---
+title: Background Tasks
+---
+
+## Background Tasks
+
+In addition to managing the database and providing a web interface, InvenTree runs various background tasks;
+
+### Blocking Operations
+
+Some tasks (such as sending emails or performing bulk database actions) may take a significant amount of time. Instead of delaying the response to the user, these tasks are handled by the background task manager.
+
+### Periodic Tasks
+
+Some tasks must be performed on a regular, periodic basis.
+
+## Django Q
+
+InvenTree uses the [django-q](https://django-q.readthedocs.io/en/latest/) background task manager.
+
+### Running Worker
+
+The Django Q work must run separately to the web server. This is started as a separate process, as part of the InvenTree installation instructions.
+
+If the worker is not running, a warning indicator is displayed in the InvenTree menu bar.
+
+## Admin Interface
+
+Scheduled tasks can be viewed in the InvenTree admin interface.
diff --git a/docs/app/app.md b/docs/app/app.md
index 90f7f4c..e0493dd 100644
--- a/docs/app/app.md
+++ b/docs/app/app.md
@@ -6,7 +6,7 @@ title: InvenTree Mobile App
The InvenTree Mobile App brings stock control to your pocket. Integrating seamlessly with the [InvenTree API](../../extend/api), the app provides immediate access to inventory data without requiring physical access to a computer.
-Native barcode support provides a multitude of context-sensitive stock control actions, allowing streamlined inventory management at your fingertips.
+Native barcode support provides a multitude of context-sensitive stock control actions, allowing streamlined inventory management at your fingertips. The app has been optimized for speed, providing instant access to stock knowledge and handy on-site functionality.
## Download
@@ -23,24 +23,102 @@ The InvenTree App can be downloaded for Android devices via the [Play Store](htt
Use of the InvenTree app assumes that you (the user) have access to an InvenTree server.
-!!! success "Profiles"
- The app supports multiple user profiles, providing simple switching between different InvenTree servers and/or account profiles.
+When first running the app, no profile has been configured. A message is displayed at the bottom of the screen, indicting that a server profile needs to be configured.
-!!! todo "Add Screenshot"
- Add screenshot of "Profiles" screen
+{% with id="no_server", url="app/initial_home_screen.jpg", maxheight="240px", description="No server configured" %}
+{% include "img.html" %}
+{% endwith %}
-!!! todo "Add Screenshot"
- Add screenshot of "connection failed" screen
+Press on the mesage to navigate to the server selection view:
-!!! todo "Add Screenshot"
- Add screenshow of "connection success" screen
+### Create Server
-## Index Page
+!!! success "Server Profiles"
+ The app supports multiple server profiles, providing simple switching between different InvenTree servers and/or account profiles.
-!!! todo "TODO"
- This section requires further work
+Press the button in the bottom-right corner of the screen to create a new server profile.
-## Menu Bar
+{% with id="add_profile", url="app/add_server_profile.jpg", maxheight="240px", description="Add server" %}
+{% include 'img.html' %}
+{% endwith %}
-!!! todo "TODO"
- This section requires further work
+Enter the required server details:
+
+| Parameter | Description |
+| --- | --- |
+| Name | Name for the server profile (can be any value, simply for reference) |
+| Server | InvenTree server address (including port, if required). e.g. `http://inventree.myserver.com:8080` |
+| Username | Your account username (case sensitive) |
+| Password | Your account password (case sensitive) |
+
+### Connect to Server
+
+Once the server profile is created, you need to connect to the server. Simply short press on the server profile to connect.
+
+Alternatively, long press on the server profile to activate the context menu, then select *Connect to Server*.
+
+When the app successfully connects to the server, a success message is briefly displayed at the bottom of the screen. A green icon next to the server profile indicate that the profile is currently *selected* and also the connection was successful.
+
+{% with id="connected", url="app/connected.jpg", maxheight="240px", description="Connected to server" %}
+{% include 'img.html' %}
+{% endwith %}
+
+### Connection Failure
+
+If (for whatever reason) the app does not successfully connect to the InvenTree server, a failure message is displayed, and a red icon is displayed next to the server profile.
+
+{% with id="failed", url="app/unauthorized.jpg", maxheight="240px", description="Connection failure" %}
+{% include 'img.html' %}
+{% endwith %}
+
+In this case, the error message displayed at the bottom of the screen provides context as to why the app could not successfully connect to the server.
+
+To edit the server profile details, long press on the server profile, and select *Edit Server Profile*:
+
+{% with id="edit", url="app/edit_server.jpg", maxheight="240px", description="Edit server profile" %}
+{% include 'img.html' %}
+{% endwith %}
+
+## Drawer Menu
+
+The *Drawer Menu* is accessible from all top-level app views, and provides quick access to important app features. To open the drawer menu, select the icon in the top-left corner of the screen (where available).
+
+{% with id="drawer", url="app/drawer.jpg", maxheight="240px", description="Open drawer menu" %}
+{% include 'img.html' %}
+{% endwith %}
+
+The *Drawer Menu* provides instant access to the following views:
+
+### InvenTree
+
+Select *InvenTree* to navigate to the [home screen](#home-screen).
+
+### Scan Barcode
+
+Select *Scan Barcode* to open the barcode scanner, and scan an InvenTree stock item or location to instantly jump to the relevent view. Refer to the [barcode documentation](./barcode) for more information.
+
+### Search
+
+Select *Search* to open a global search screen.
+
+### Parts
+
+Select *Parts* to navigate to the [Parts](./parts) view.
+
+### Stock
+
+Select *Stock* to navigate to the [Stock](./stock) view.
+
+### Settings
+
+Select *Settings* to navigate to the app [settings](./settings) menu.
+
+## Home Screen
+
+The app *home screen* provides quick-access buttons for stock view and actions.
+
+Additionally, the connection status of the server is displayed at the bottom of the screen.
+
+{% with id="home", url="app/home.jpg", maxheight="240px", description="Home screen" %}
+{% include 'img.html' %}
+{% endwith %}
\ No newline at end of file
diff --git a/docs/app/settings.md b/docs/app/settings.md
new file mode 100644
index 0000000..723c604
--- /dev/null
+++ b/docs/app/settings.md
@@ -0,0 +1,54 @@
+---
+title: App Settings
+---
+
+## Settings
+
+The *Settings* view provides access to user configurable settings, in addition to information about the app itself.
+
+The main settings view is shown below, and provides the following options:
+
+- **Server** - Configure and select server profile
+- **App Settings** - Configure app settings
+- **About** - Information about the InvenTree app
+- **Documentation** - Opens the InvenTree documentation in an external browser
+
+{% with id="settings_view", url="app/settings.jpg", maxheight="240px", description="Settings view" %}
+{% include 'img.html' %}
+{% endwith %}
+
+## App Settings
+
+The *App Settings* view provides configuration options for the InvenTree app:
+
+{% with id="app_settings", url="app/app_settings.jpg", maxheight="240px", description="App Settings" %}
+{% include 'img.html' %}
+{% endwith %}
+
+### Sounds
+
+Configure audible app notifications:
+
+- **Server Error** - Play an audible tone when a server error occurs
+- **Barcode Tones** - Play audible tones when scanning barcodes
+
+## About
+
+The *About* view provides details about the app itself:
+
+{% with id="about_app", url="app/about.jpg", maxheight="240px", description="About the InvenTree app" %}
+{% include 'img.html' %}
+{% endwith %}
+
+### Server Details
+
+- **Address** - URL of the currently connected server
+- **Version** - Version of InvenTree software running on the server
+- **Server Instance** - Instance name of the server
+
+### App Details
+
+- **Package Name** - Package identifier for the compiled app
+- **Version** - App software version
+- **Release Notes** - Select to view app release notes
+- **Credits** - Select to view additional app credits
diff --git a/docs/assets/images/api/api_roles.png b/docs/assets/images/api/api_roles.png
new file mode 100644
index 0000000..647ff0d
Binary files /dev/null and b/docs/assets/images/api/api_roles.png differ
diff --git a/docs/assets/images/api/api_roles_2.png b/docs/assets/images/api/api_roles_2.png
new file mode 100644
index 0000000..c13b646
Binary files /dev/null and b/docs/assets/images/api/api_roles_2.png differ
diff --git a/docs/assets/images/app/about.jpg b/docs/assets/images/app/about.jpg
new file mode 100644
index 0000000..82fdfac
Binary files /dev/null and b/docs/assets/images/app/about.jpg differ
diff --git a/docs/assets/images/app/add_server_profile.jpg b/docs/assets/images/app/add_server_profile.jpg
new file mode 100644
index 0000000..1fd7643
Binary files /dev/null and b/docs/assets/images/app/add_server_profile.jpg differ
diff --git a/docs/assets/images/app/app_settings.jpg b/docs/assets/images/app/app_settings.jpg
new file mode 100644
index 0000000..18acd57
Binary files /dev/null and b/docs/assets/images/app/app_settings.jpg differ
diff --git a/docs/assets/images/app/connected.jpg b/docs/assets/images/app/connected.jpg
new file mode 100644
index 0000000..52675ad
Binary files /dev/null and b/docs/assets/images/app/connected.jpg differ
diff --git a/docs/assets/images/app/details.jpg b/docs/assets/images/app/details.jpg
new file mode 100644
index 0000000..82fdfac
Binary files /dev/null and b/docs/assets/images/app/details.jpg differ
diff --git a/docs/assets/images/app/drawer.jpg b/docs/assets/images/app/drawer.jpg
new file mode 100644
index 0000000..2873e02
Binary files /dev/null and b/docs/assets/images/app/drawer.jpg differ
diff --git a/docs/assets/images/app/edit_server.jpg b/docs/assets/images/app/edit_server.jpg
new file mode 100644
index 0000000..925bdc6
Binary files /dev/null and b/docs/assets/images/app/edit_server.jpg differ
diff --git a/docs/assets/images/app/home.jpg b/docs/assets/images/app/home.jpg
new file mode 100644
index 0000000..51796e1
Binary files /dev/null and b/docs/assets/images/app/home.jpg differ
diff --git a/docs/assets/images/app/initial_home_screen.jpg b/docs/assets/images/app/initial_home_screen.jpg
new file mode 100644
index 0000000..ea1ae21
Binary files /dev/null and b/docs/assets/images/app/initial_home_screen.jpg differ
diff --git a/docs/assets/images/app/select_server.jpg b/docs/assets/images/app/select_server.jpg
new file mode 100644
index 0000000..ac69893
Binary files /dev/null and b/docs/assets/images/app/select_server.jpg differ
diff --git a/docs/assets/images/app/settings.jpg b/docs/assets/images/app/settings.jpg
new file mode 100644
index 0000000..c93fd9c
Binary files /dev/null and b/docs/assets/images/app/settings.jpg differ
diff --git a/docs/assets/images/app/unauthorized.jpg b/docs/assets/images/app/unauthorized.jpg
new file mode 100644
index 0000000..66eb999
Binary files /dev/null and b/docs/assets/images/app/unauthorized.jpg differ
diff --git a/docs/assets/images/part/part_ipn_editing.png b/docs/assets/images/part/part_ipn_editing.png
new file mode 100644
index 0000000..33e3815
Binary files /dev/null and b/docs/assets/images/part/part_ipn_editing.png differ
diff --git a/docs/companies/manufacturer.md b/docs/companies/manufacturer.md
index 86008b2..5dd4b75 100644
--- a/docs/companies/manufacturer.md
+++ b/docs/companies/manufacturer.md
@@ -15,7 +15,7 @@ To access the manufacturer page, click on the "Buy" navigation tab and click on
Once the manufacturer page is loaded, click on the " New Manufacturer" button: the "Create new Manufacturer" form opens. Fill-in the manufacturer informations (`Company name` and `Company description` are required) then click on the "Submit" button.
-!!! note "Manufacturer vs Supplier"
+!!! info "Manufacturer vs Supplier"
In the case the manufacturer sells directly to customers, you may want to enable the checkbox `is supplier` before submitting the form (you can also enable it later on). Purchase orders rely exclusively on [supplier parts](../supplier#supplier-parts), therefore the manufacturer will need to be set as a supplier too.
### Edit Manufacturer
diff --git a/docs/companies/supplier.md b/docs/companies/supplier.md
index b5d1565..f5208d1 100644
--- a/docs/companies/supplier.md
+++ b/docs/companies/supplier.md
@@ -15,7 +15,7 @@ To access the supplier page, click on the "Buy" navigation tab and click on "Sup
Once the supplier page is loaded, click on the " New Supplier" button: the "Create new Supplier" form opens. Fill-in the supplier informations (`Company name` and `Company description` are required) then click on the "Submit" button.
-!!! note "Supplier vs Manufacturer"
+!!! info "Supplier vs Manufacturer"
In the case the supplier is a manufacturer who sells directly to customers, you may want to enable the checkbox `is manufacturer` before submitting the form (you can also enable it later on).
### Edit Supplier
diff --git a/docs/extend/api.md b/docs/extend/api.md
index 07b62d8..6f439ee 100644
--- a/docs/extend/api.md
+++ b/docs/extend/api.md
@@ -75,4 +75,30 @@ headers = {
'AUTHORIZATION': f'Token {token}'
}
response = request.get('http://localhost:8080/api/part/', data=data, headers=headers)
-```
\ No newline at end of file
+```
+
+## Authorization
+
+### User Roles
+
+Users can only perform REST API actions which align with their assigned [role permissions](../../admin/permissions/#roles).
+Once a user has *authenticated* via the API, a list of the available roles can be retrieved from:
+
+`/api/user/roles/`
+
+For example, when accessing the API from a *superuser* account:
+
+{% with id="api_roles", url="api/api_roles.png", description="API superuser roles" %}
+{% include 'img.html' %}
+{% endwith %}
+
+Or, when accessing the API from an account which has read-only permissions:
+
+{% with id="api_roles_2", url="api/api_roles_2.png", description="API user roles" %}
+{% include 'img.html' %}
+{% endwith %}
+
+### Permission Denied
+
+If an API action outside of the user's role(s) is attempted, the server will respond with a 403 permission error message.
+
diff --git a/docs/extend/integrate.md b/docs/extend/integrate.md
index 7d5c771..eb6812b 100644
--- a/docs/extend/integrate.md
+++ b/docs/extend/integrate.md
@@ -13,7 +13,3 @@ A list of known third-party InvenTree extensions is provided below. If you have
### PK2InvenTree
[PK2InvenTree](https://github.com/rgilham/PK2InvenTree) is an open-source tool for migrating an existing [PartKeepr](https://github.com/partkeepr/PartKeepr) database to InvenTree.
-
-### inventree-docker
-
-[inventree-docker](https://github.com/Zeigren/inventree-docker) provides Docker support for InvenTree
\ No newline at end of file
diff --git a/docs/extend/python.md b/docs/extend/python.md
index 1eeea89..78cdf69 100644
--- a/docs/extend/python.md
+++ b/docs/extend/python.md
@@ -88,6 +88,8 @@ stock_item.uploadTestResult("Firmware", True, value="0x12345678", attachment="de
```python
from inventree.part import Part, PartCategory
from inventree.stock import StockItem
+from inventree.base import Parameter
+from inventree.base import ParameterTemplate
## Create a new PartCategory object,
## underneath the existing category with pk 7
@@ -108,12 +110,91 @@ couch = Part.create(api, {
## Note - You do not have to fill out *all* fields
})
-## Create a new StockItem
-item = StockItem.create(api, {
- 'part': couch.pk,
- 'quantity': 5,
- 'notes': 'A stack of couches',
- 'location': 10, ## PK of a StockLocation already in the database...
-})
+## Before we can add parameters to the couch, we neeed to create the parameter templates
+## These parameter templates need to be defined only once and can be used for all other parts.
+LengthTemplate = ParameterTemplate.create(api, { 'name' : 'Length', 'units' : 'Meters' })
+WeightTemplate = ParameterTemplate.create(api, { 'name' : 'Weight', 'units' : 'kg' })
+
+## Now we create the parameters
+ParameterLength = Parameter.create(api, { 'part': couch.pk, 'template': LengthTemplate.pk, 'data' : 2 })
+ParameterWeight = Parameter.create(api, { 'part': couch.pk, 'template': WeightTemplate.pk, 'data' : 60 })
+
+## Add a picture to the part
+couch.upload_image('my_nice_couch.jpg')
+```
+
+#### Adding a location to the sofa
+
+If we have several sofas on stock we need to know there we have stored them. So let’s add stock locations to the part. Stock locations can be organized in a hierarchical manner e.g. boxes in shelves in aisles in rooms. So each location can have a parent. Let’s assume we have 10 sofas in box 12 and 3 sofas in box 13 located in shelve 43 aisle 3. First we have to create the locations, afterwards we can put the sofas inside.
+
+```python
+
+from inventree.stock import StockLocation
+from inventree.stock import StockItem
+
+...
+
+## Create the stock locations. Leave the parent empty for top level hierarchy
+Aisle3 = StockLocation.create(api, {'name':'Aisle 3','description':'Aisle for sofas','parent':''})
+Shelve43 = StockLocation.create(api, {'name':'Shelve 43','description':'Shelve for sofas','parent':Aisle3.pk})
+Box12 = StockLocation.create(api, {'name':'Box 12','description':'green box','parent':Shelve43.pk})
+Box13 = StockLocation.create(api, {'name':'Box 13','description':'red box','parent':Shelve43.pk})
+
+## Now fill them with items
+Id1 = StockItem.create(api, { 'part': sofa.pk, 'quantity': 10, 'notes': 'new ones', 'location': Box12.pk, ‘status’:10 })
+Id2 = StockItem.create(api, { 'part': sofa.pk, 'quantity': 3, 'notes': 'old ones', 'location': Box13.pk, ‘status’:55 })
```
+Please recognize the different status flags. 10 means OK, 55 means damaged. We have the following choices:
+
+* 10: OK
+* 50: Attention needed
+* 55: Damaged
+* 60: Destroyed
+* 65: Rejected
+* 70: Lost
+* 85: Returned
+
+#### Adding manufacturers and supplier
+
+We can add manufacturers and suppliers to parts. If we add a manufacturer, a supplier is also mandatory. So we first need to create two companies, ACME (manufacturer) and X-Store (supplier).
+
+```python
+from inventree.company import Company
+
+...
+
+acme = Company.create(api, {
+ 'name' : 'ACME',
+ 'description':'A Company that makes everything',
+ 'website':'https://www.acme.bla',
+ 'is_customer':0,
+ 'is_manufacturer':1,
+ 'is_supplier':0
+})
+xstore = Company.create(api, {
+ 'name' : 'X-Store',
+ 'description':'A really cool online store',
+ 'website':'https://www.xst.bla',
+ 'is_customer':0,
+ 'is_manufacturer':0,
+ 'is_supplier':1
+})
+```
+
+Please recognize the different flag settings for is_supplier and is_manufacturer. Now lets add those to our couch:
+
+```python
+from inventree.company import SupplierPart
+
+...
+
+SupplierPart.create(api,{
+ 'part':couch.pk,
+ 'supplier':xstore.pk,
+ 'SKU':'some_code',
+ 'manufacturer':acme.pk
+})
+```
+
+Supplier and manufacturer are added with just one command. The SKU is the code under which the couch is listed in the store.
diff --git a/docs/faq.md b/docs/faq.md
new file mode 100644
index 0000000..afc6999
--- /dev/null
+++ b/docs/faq.md
@@ -0,0 +1,51 @@
+---
+title: FAQ
+---
+
+## Frequently Asked Questions
+
+### Feature *x* is not visible after update
+
+If a particular menu / item is not visible after updating InvenTree, it may be due to your internet browser caching old versions of CSS and JavaScript files.
+
+Before [raising an issue](https://github.com/inventree/inventree/issues), try hard-refreshing the browser cache:
+
+Ctrl + Shift + R
+
+or
+
+Ctrl + F5
+
+### Problems Installing on Windows
+
+InvenTree installation is not officially supported natively on Windows. Install using the WSL framework.
+
+### Command 'inv' / 'invoke' not found
+
+If the `inv` or `invoke` command does not work, it means that the [invoke](https://pypi.org/project/invoke/) python library has not been correctly installed.
+
+Update the installed python packages with PIP:
+
+```
+pip3 install -U -r requirements.txt
+```
+
+### ModuleNotFoundError: No module named 'django'
+
+Most likely you are trying to run the InvenTree server from outside the context of the virtual environment where the required python libraries are installed.
+
+Always activate the virtual environment before running server commands!
+
+### Background Worker "Not Running"
+
+The background worker process must be started separately to the web-server application.
+
+From the top-level source directory, run the following command from a separate terminal, while the server is already running:
+
+```
+invoke worker
+```
+
+!!! info "Supervisor"
+
+A better option is to manage the background worker process using a process manager such as supervisor. Refer to the [production server guide](../start/production).
diff --git a/docs/features.md b/docs/features.md
new file mode 100644
index 0000000..3628f9b
--- /dev/null
+++ b/docs/features.md
@@ -0,0 +1,45 @@
+---
+title: Features
+---
+
+## Organize Parts
+
+Parts are the fundamental element of any inventory. InvenTree groups parts into structured categories which allow you to arrange parts to meet your particular needs.
+
+[Read more...](./part/part)
+
+## Manage Suppliers
+
+InvenTree allows you to easily create, modify or delete suppliers and supplier items linked to any part in your inventory.
+
+[Read more...](./buy/supplier)
+
+## Instant Stock Knowledge
+
+Instantly view current stock for a certain part, in a particular location, or required for an individual build. Stock items are organized in cascading locations and sub-locations, allowing flexible inspection of stock under any location. Stock items can be serialized for tracking of individual items, and test results can be stored against a serialized stock item for the purpose of acceptance testing and commissioning.
+
+[Read more...](./stock/stock)
+
+## BOM Management
+
+Intelligent BOM (Bill of Material) management provides a clear understanding of the sub-parts required to make a new part.
+InvenTree allows you to upload simple BOM files in multiple formats, and download a detailed BOM with all the information stored in its database.
+
+[Read more...](./build/bom)
+
+## Build Parts
+
+Inventree features a build management system to help you track the progress of your builds.
+Builds consume stock items to make new parts, you can decide to automatically or manually allocate parts from your current inventory.
+
+[Read more...](./build/build)
+
+## Report
+
+Generate a wide range of reports using custom templates. [Read more...](./report/report)
+
+## Extend and Customize
+
+InvenTree is designed to be highly extensible. If the core InvenTree functionality does not meet your particular need, InvenTree provides a RESTful API, a native Python library, and a powerful plugin system.
+
+[Read more...](./extend/api)
diff --git a/docs/index.md b/docs/index.md
index 6d14c42..3b0db6b 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -2,7 +2,12 @@
title: InvenTree
---
-## InvenTree - Intuitive Inventory Management
+## Intuitive Inventory Management
+
+[](https://opensource.org/licenses/MIT)
+[](https://github.com/inventree/inventree)
+[](https://hub.docker.com/r/inventree/inventree)
+
InvenTree is an open-source inventory management system which provides intuitive parts management and stock control.
@@ -16,48 +21,12 @@ InvenTree is designed to allow for a flexible installation. You could run the In
## Features
-### Organize Parts
-
-Parts are the fundamental element of any inventory. InvenTree groups parts into structured categories which allow you to arrange parts to meet your particular needs.
-
-[Read more...](./part/part)
-
-### Manage Suppliers
-
-InvenTree allows you to easily create, modify or delete suppliers and supplier items linked to any part in your inventory.
-
-[Read more...](./buy/supplier)
-
-### Instant Stock Knowledge
-
-Instantly view current stock for a certain part, in a particular location, or required for an individual build. Stock items are organized in cascading locations and sub-locations, allowing flexible inspection of stock under any location. Stock items can be serialized for tracking of individual items, and test results can be stored against a serialized stock item for the purpose of acceptance testing and commissioning.
-
-[Read more...](./stock/stock)
-
-### BOM Management
-
-Intelligent BOM (Bill of Material) management provides a clear understanding of the sub-parts required to make a new part.
-InvenTree allows you to upload simple BOM files in multiple formats, and download a detailed BOM with all the information stored in its database.
-
-[Read more...](./build/bom)
-
-### Build Parts
-
-Inventree features a build management system to help you track the progress of your builds.
-Builds consume stock items to make new parts, you can decide to automatically or manually allocate parts from your current inventory.
-
-[Read more...](./build/build)
-
-### Report
-
-Generate a wide range of reports using custom templates. [Read more...](./report/report)
-
-### Extend and Customize
-
-InvenTree is designed to be highly extensible. If the core InvenTree functionality does not meet your particular need, InvenTree provides a RESTful API, a native Python library, and a powerful plugin system.
-
-[Read more...](./extend/api)
+Refer to the [features](./features) page for a rundown on the features that InvenTree provides out of the box.
## Getting Started
-Refer to the [installation guide](./start/install) for instructions on installing InvenTree. The server where InvenTree is to be installed will need to meet some basic package requirements, and a certain level of system administration understanding is assumed.
\ No newline at end of file
+Refer to the [installation guide](./start/intro) for instructions on installing InvenTree. The server where InvenTree is to be installed will need to meet some basic package requirements, and a certain level of system administration understanding is assumed.
+
+## Get the App
+
+InvenTree is supported by a [companion mobile app](./app/app) which is tightly integrated with the InvenTree database. Lightning fast stock control, in your pocket!
\ No newline at end of file
diff --git a/docs/part/parameter.md b/docs/part/parameter.md
index d8d1d2c..1af842b 100644
--- a/docs/part/parameter.md
+++ b/docs/part/parameter.md
@@ -42,5 +42,5 @@ Select the parameter `Template` you would like to use for this parameter, fill-o
### Parametric Tables
-!!! note "Future Feature Proposal"
+!!! info "Future Feature Proposal"
Allow parts to be filtered using parameters. Narrow down the list of parameters to the parts found in each category.
diff --git a/docs/releases/0.1.7.md b/docs/releases/0.1.7.md
index 022b5f2..77361ca 100644
--- a/docs/releases/0.1.7.md
+++ b/docs/releases/0.1.7.md
@@ -4,7 +4,7 @@ title: Release 0.1.7
## Release 0.1.7
-[Release 0.1.7](https://github.com/inventree/InvenTree/releases/tag/0.1.7) (WIP) provides a number of major new features and improvements, as well as some crucial bug fixes:
+[Release 0.1.7](https://github.com/inventree/InvenTree/releases/tag/0.1.7) provides a number of major new features and improvements, as well as some crucial bug fixes:
## New Features
@@ -17,7 +17,43 @@ Label printing functionality has been simplified and brought into line with the
!!! info "More Information"
Refer to the [label printing documentation](../../report/labels) for further details.
+### Display Sub Builds
+
+[#1344](https://github.com/inventree/InvenTree/pull/1344) adds display of sub-builds under the build detail
+
+### Recently Updated Stock
+
+[#1350](https://github.com/inventree/InvenTree/pull/1350) adds *Recently Updated Stock* view to the index page
+
+### Menubar Improvements
+
+[#1352](https://github.com/inventree/InvenTree/pull/1354) provides a *significant* visual improvement for displaying menubars on various pages. The previous *tab style* navigation has been removed, and replaced with a vertical menu which can be toggled between icon-and-text or icon-only.
+
+### API Permissions
+
+[#1363](https://github.com/inventree/InvenTree/pull/1363) enforces user role permissions onto the REST API endpoints. Authenticated users can now only perform REST actions which align with their allocated role(s). Refer to the [API documentation](../../extend/api/#authorization) for further information.
+
+### Query Pagination
+
+[#1373](https://github.com/inventree/InvenTree/pull/1373) *finally* introduces server-side pagination of large querysets, resulting in a significantly improved user experience. For larger data sets, retrieval time has been reduced from multiple seconds to ~100ms.
+
+### Search Results
+
+[#1385](https://github.com/inventree/InvenTree/pull/1385) adds some additional search results to the *Search* page. Users can now search:
+
+- Build Orders
+- Purchase Orders
+- Sales Orders
+
## Major Bug Fixes
+
| PR | Description |
| --- | --- |
| [#1341](https://github.com/inventree/InvenTree/pull/1341) | Fixes display issue with Part variant table |
+| [#1351](https://github.com/inventree/InvenTree/pull/1351) | Fixes bug which prevented filtering of reports and labels to work correctly |
+| [#1352](https://github.com/inventree/InvenTree/pull/1352) | Fixes bug updating part "trackable" status |
+| [#1353](https://github.com/inventree/InvenTree/pull/1353) | Fixes bug which caused error when "special" regex characters were used for part search |
+| [#1371](https://github.com/inventree/InvenTree/pull/1371) | Fixes a *very* long-running bug whereby API requests for invalid endpoints were redirected to the web-view index page |
+| [#1379](https://github.com/inventree/InvenTree/pull/1379) | Fixes an obtuse bug introduced by the new server-side pagination feature |
+| [#1381](https://github.com/inventree/InvenTree/pull/1381) | Fixes permissions error caused by incorrect table name lookup |
+
diff --git a/docs/releases/0.1.8.md b/docs/releases/0.1.8.md
new file mode 100644
index 0000000..688354c
--- /dev/null
+++ b/docs/releases/0.1.8.md
@@ -0,0 +1,43 @@
+---
+title: Release 0.1.8
+---
+
+## Release 0.1.8
+
+[Release 0.1.8](https://github.com/inventree/InvenTree/releases/tag/0.1.8) provides a number of major new features and improvements, as well as some crucial bug fixes:
+
+## New Features
+
+### Order Responsibility
+
+[#1395](https://github.com/inventree/InvenTree/pull/1395) adds the concept of *responsibility* for Purchase Orders and Sales Orders. Orders can be assigned to either an individual user, or an entire group.
+
+### Order Reports
+
+[#1397](https://github.com/inventree/InvenTree/pull/1397) adds the ability to generate PDF Reports against Purchase Orders and Sales Orders. This new feature provides a framework for generating reports such as invoices, sales orders, packing lists, etc. While it provides the framework for such reports, generic templates for these report types have not yet been created.
+
+### Global Setting for Part IPN Edit
+[#1400](https://github.com/inventree/InvenTree/pull/1400) adds the ability to disable IPN field when editing part information for **all** parts and **all** users. This global setting is located in the "Part" section of the InvenTree settings. Toggling it off means the IPN field cannot be edited manually anymore after a part is created (the field is greyed out). Only admin users retain the ability to edit this field.
+
+{% with id="disable_ipn_edit", url="part/part_ipn_editing.png", description="Disable Edit of Part IPN Field" %}
+{% include 'img.html' %}
+{% endwith %}
+
+### Image Download
+
+[#1410](https://github.com/inventree/InvenTree/pull/1410) introduces a new feature which allows thumbnail images (e.g. for *Part* and *Company* objects) to be downloaded from a remote URL (by the server). This feature is disabled by default, and must be enabled in the *Global Settings* menu.
+
+### Assign by Serial Number
+
+[#1426](https://github.com/inventree/InvenTree/pull/1426) introduces a new feature which allows stock items to be allocated to a sales order using serial number references. This provides a much more streamlined user experience. Refer to the [sales order documentation](../../companies/so/) for further information.
+
+## Major Bug Fixes
+
+| PR | Description |
+| --- | --- |
+| [#1407](https://github.com/inventree/InvenTree/pull/1407) | Fixes unncessary column requirement when importing BOM |
+| [#1430](https://github.com/inventree/InvenTree/pull/1430) | Fixes error thrown when migrating from very old data set |
+| [#1441](https://github.com/inventree/InvenTree/pull/1441) | Fixes template rendering error if git not available on system path |
+| [#1446](https://github.com/inventree/InvenTree/pull/1446) | Fixes bug exporting BOM to YAML format |
+| [#1449](https://github.com/inventree/InvenTree/pull/1449) | Fixes bug which prevented transfer of serialized stock items |
+
diff --git a/docs/releases/0.2.0.md b/docs/releases/0.2.0.md
new file mode 100644
index 0000000..123f347
--- /dev/null
+++ b/docs/releases/0.2.0.md
@@ -0,0 +1,34 @@
+---
+title: Release 0.2.0
+---
+
+## Release 0.2.0
+
+[Release 0.2.0](https://github.com/inventree/InvenTree/releases/tag/0.2.0) introduces some major new features!
+
+## Background Worker
+
+This release adds a "background worker" - a separately managed process which allows long-running or asynchronous tasks to be handled separately to web server requests.
+
+This feature is critical for the InvenTree development path, allowing (in future releases) for complex tasks to be handled, such as email support, automatic report generation, and integration with third party services.
+
+For more information on the background worker, refer to the [background tasks documentation](../../admin/tasks).
+
+!!! info "Installation"
+ Instructions for managing the background worker process are included in the [installation guide](../../start/install).
+
+!!! warning "Upgrading"
+ If you are upgrading your InvenTree installation from an older version, you will need to ensure that you are also now running the background worker process!
+
+## Docker
+
+The other major feature that `0.2.0` introduces is an officical docker installation guide.
+
+The addition of the *Background Worker* process significantly increases the complexity of an InvenTree installation. Further, a robust *production grade* server requires a lot of work.
+
+To simplify this, an official InvenTree docker image is available on [DockerHub](https://hub.docker.com/inventree/inventree).
+
+!!! success "Docker Is the Way"
+ Docker is now the recommended way to install InvenTree
+
+Refer to the [docker setup guide](../../start/docker) for further information!
diff --git a/docs/releases/0.2.1.md b/docs/releases/0.2.1.md
new file mode 100644
index 0000000..879123e
--- /dev/null
+++ b/docs/releases/0.2.1.md
@@ -0,0 +1,15 @@
+---
+title: Release 0.2.1
+---
+
+## Release 0.2.1
+
+[Release 0.2.1](https://github.com/inventree/InvenTree/releases/tag/0.2.1) provides a number of major new features and improvements, as well as some crucial bug fixes:
+
+## New Features
+
+## Major Bug Fixes
+
+| PR | Description |
+| --- | --- |
+| [#1453](https://github.com/inventree/InvenTree/pull/1453) | Adds *detail* API endpoint for the `PartParameter` model, which was previously missing. |
diff --git a/docs/releases/new.md b/docs/releases/new.md
index 8d26f8f..cfec771 100644
--- a/docs/releases/new.md
+++ b/docs/releases/new.md
@@ -8,7 +8,10 @@ For information on the latest and greatest InvenTree features, refer to the rele
| Release | Date |
| ------- | ---- |
-| [0.1.7](../0.1.7) | *In Development* |
+| [0.2.1](../0.2.1) | *In Development* |
+| [0.2.0](../0.2.0) | April 2021 |
+| [0.1.8](../0.1.8) | April 2021 |
+| [0.1.7](../0.1.7) | March 2021 |
| [0.1.6](../0.1.6) | February 2021 |
| [0.1.5](../0.1.5) | January 2021 |
| [0.1.4](../0.1.4) | November 2020 |
diff --git a/docs/report/labels.md b/docs/report/labels.md
index c9fd87e..1439530 100644
--- a/docs/report/labels.md
+++ b/docs/report/labels.md
@@ -27,8 +27,10 @@ Below is a reasonably simple example of a label template which demostrates much
{% raw %}
-
+{% load barcode %}