Merge remote-tracking branch 'origin/master' into email-docs
# Conflicts: # docs/start/config.md
@ -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.
|
||||
@ -80,6 +87,7 @@ email:
|
||||
ssl: False
|
||||
|
||||
# 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
|
||||
@ -88,6 +96,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
|
||||
|
||||
@ -109,13 +118,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']
|
||||
@ -128,7 +138,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:
|
||||
|
100
_includes/docker-compose.yml
Normal file
@ -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
|
@ -4,5 +4,88 @@ title: Importing Data
|
||||
|
||||
## Importing Data
|
||||
|
||||
!!! missing "TODO"
|
||||
This section requires further work
|
||||
External data can be imported via the admin interface, allowing for rapid integration of existing datasets, or bulk editing of table data.
|
||||
|
||||
!!! danger "Danger"
|
||||
Uploading bulk data directly is a non-reversible action.
|
||||
|
||||
!!! warning "Backup"
|
||||
Ensure you have made a backup of your database before performing bulk data import.
|
||||
|
||||
!!! warning "Supported Models"
|
||||
Not all models in the InvenTree database support bulk import actions.
|
||||
|
||||
When viewing a model (which supports bulk data import) in the admin interface, select the "Import" button in the top-right corner:
|
||||
|
||||
{% with id="import", url="admin/import.png", description="Data import" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
The next screen displays a list of column headings which are expected to be present in the uploaded data file.
|
||||
|
||||
{% with id="import_upload", url="admin/import_upload.png", description="Data upload" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
Select the data file to import, and the data format. Press the "Submit" button to upload the file.
|
||||
|
||||
### File Format
|
||||
|
||||
The uploaded data file must meet a number of formatting requirements for successful data upload. A simple way of ensuring that the file format is correct is to first [export data](../export) for the model in question, and delete all data rows (not the header row) from the exported data file.
|
||||
|
||||
Then, the same file can be used as a template for uploading more data to the server.
|
||||
|
||||
### ID Field
|
||||
|
||||
The uploaded data file requires a special field called `id`. This `id` field uniquely identifies each entry in the database table(s) - it is also known as a *primary key*.
|
||||
|
||||
The `id` column **must** be present in an uploaded data file, as it is required to know how to process the incoming data.
|
||||
|
||||
Depending on the value of the `id` field in each row, InvenTree will attempt to either insert a new record into the database, or update an existing one.
|
||||
|
||||
#### Empty ID
|
||||
|
||||
If the `id` field in a given data row is empty (blank), then InvenTree interprets that particular row as a *new* entry which will be inserted into the database.
|
||||
|
||||
If you wish for a new database entry to be created for a particular data row, the `id` field **must** be left blank for that row.
|
||||
|
||||
#### Non-Empty ID
|
||||
|
||||
If the `id` field in a given data row is *not* empty, then InvenTree inteprets that particular row as an *existing* row to override / update.
|
||||
|
||||
In this case, InvenTree will search the database for an entry with the matching `id`. If a matching entry is found, then the entry is updated with the provided data.
|
||||
|
||||
However, if an entry is *not* found with the matching `id`, InvenTree will return an error message, as it cannot find the matching database entry to update.
|
||||
|
||||
!!! warning "Check id Value"
|
||||
Exercise caution when uploading data with the `id` field specified!
|
||||
|
||||
### Import Preview
|
||||
|
||||
After the data file has been uploaded and validated, the user is presented with a *preview* screen, showing the records that will be inserted or updated in the database.
|
||||
|
||||
Here the user has a final chance to review the data upload.
|
||||
|
||||
Press the *Confirm Import* button to actually perform the import process and commit the data into the database.
|
||||
|
||||
{% with id="import_preview", url="admin/import_preview.png", description="Data upload preview" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
Note that *new* records are automatically assigned an `id` value.
|
||||
|
||||
## Import Errors
|
||||
|
||||
Manually importing data in a relational database is a complex process. You may be presented with an error message which describes why the data could not be imported.
|
||||
|
||||
The error message should contain enough information to manually edit the data file to fix the problem.
|
||||
|
||||
Any error messages are displayed per row, and you can hover the mouse over the particular error message to view specific error details:
|
||||
|
||||
{% with id="import_error", url="admin/import_error.png", description="Data upload error" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
!!! info "Report Issue"
|
||||
If the error message does not provide enough information, or the error seems like a bug caused by InvenTree itself, report an [issue on Github](https://github.com/inventree/inventree/issues).
|
@ -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
|
||||
|
29
docs/admin/tasks.md
Normal file
@ -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.
|
120
docs/app/app.md
@ -4,5 +4,121 @@ title: InvenTree Mobile App
|
||||
|
||||
## InvenTree Mobile App
|
||||
|
||||
!!! note "Work In Progress"
|
||||
InvenTree app documentation will be available soon.
|
||||
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. The app has been optimized for speed, providing instant access to stock knowledge and handy on-site functionality.
|
||||
|
||||
## Download
|
||||
|
||||
### Android
|
||||
|
||||
The InvenTree App can be downloaded for Android devices via the [Play Store](https://play.google.com/store/apps/details?id=inventree.inventree_app).
|
||||
|
||||
### iOS
|
||||
|
||||
!!! missing "Not Yet Available"
|
||||
The InvenTree app is not yet available for iOS devices
|
||||
|
||||
## Connect to InvenTree
|
||||
|
||||
Use of the InvenTree app assumes that you (the user) have access to an InvenTree server.
|
||||
|
||||
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.
|
||||
|
||||
{% with id="no_server", url="app/initial_home_screen.jpg", maxheight="240px", description="No server configured" %}
|
||||
{% include "img.html" %}
|
||||
{% endwith %}
|
||||
|
||||
Press on the mesage to navigate to the server selection view:
|
||||
|
||||
### Create Server
|
||||
|
||||
!!! success "Server Profiles"
|
||||
The app supports multiple server profiles, providing simple switching between different InvenTree servers and/or account profiles.
|
||||
|
||||
Press the <span class='fas fa-plus-circle blue'></span> button in the bottom-right corner of the screen to create a new server profile.
|
||||
|
||||
{% with id="add_profile", url="app/add_server_profile.jpg", maxheight="240px", description="Add server" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
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 <span class='fas fa-check-circle green'></span> 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 <span class='fas fa-times-circle red'></span> 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 <span class='fas fa-bars'></span> 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 %}
|
31
docs/app/barcode.md
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
title: App Barcode Support
|
||||
---
|
||||
|
||||
## Barcode Support
|
||||
|
||||
One of the key elements of functionality provided by the InvenTree app is the native support for context-sensitive barcode scanning.
|
||||
|
||||
Barcode integration allows extremely efficient stock control, for information lookup and also performing various actions.
|
||||
|
||||
### Supported Codes
|
||||
|
||||
The following code types are known to be supported
|
||||
|
||||
**1D Codes**
|
||||
|
||||
- Code-39
|
||||
- Code-93
|
||||
- Code-128
|
||||
- ITF
|
||||
|
||||
**2D Codes**
|
||||
|
||||
- QR Code
|
||||
- Data Matrix
|
||||
- Aztec
|
||||
|
||||
## Actions
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
13
docs/app/issues.md
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
title: App Suggestions / Issues
|
||||
---
|
||||
|
||||
## Suggestions / Issues
|
||||
|
||||
To suggest an improvement or new feature for the InvenTree app, or to report an issue, refer to the [InvenTree GitHub page](https://github.com/inventree/inventree/issues).
|
||||
|
||||
Suggestions or issues related to the InvenTree app will be tagged with the `app` label, and can be viewed here:
|
||||
|
||||
[https://github.com/inventree/InvenTree/issues?q=is:open+is:issue+label:app](https://github.com/inventree/InvenTree/issues?q=is%3Aopen+is%3Aissue+label%3Aapp)
|
||||
|
||||
General feedback on the app is also welcomed - if you have any ideas on how to make the app more functional or effective, please let us know!
|
38
docs/app/part.md
Normal file
@ -0,0 +1,38 @@
|
||||
---
|
||||
title: Part Views
|
||||
---
|
||||
|
||||
## InvenTree App Part Views
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
## Part
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
### Details
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
### Stock
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
## Part Category
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
### Details
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
### Parts
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
@ -33,4 +33,4 @@ The InvenTree app does not collect any information which could be used to person
|
||||
|
||||
## Third Party Access
|
||||
|
||||
Aside from error reporting using the sentry reporting service, the InvenTree app does not share any information with third parties.
|
||||
The InvenTree app does not share any information with third parties.
|
||||
|
54
docs/app/settings.md
Normal file
@ -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
|
22
docs/app/stock.md
Normal file
@ -0,0 +1,22 @@
|
||||
---
|
||||
title: Stock Views
|
||||
---
|
||||
|
||||
## InvenTree App Stock Views
|
||||
|
||||
!!! todo "TODO"
|
||||
This section requires further work
|
||||
|
||||
## Stock Item
|
||||
|
||||
### Details
|
||||
|
||||
### Actions
|
||||
|
||||
## Stock Location
|
||||
|
||||
### Details
|
||||
|
||||
### Actions
|
||||
|
||||
## Search
|
17
docs/app/translation.md
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
title: App Translations
|
||||
---
|
||||
|
||||
## Translation Support
|
||||
|
||||
The InvenTree app, much like the InvenTree web-based application, is designed to support multiple language translations.
|
||||
|
||||
As with the web application, translations are community contributed - if the app does not support your native language, contributions are very welcome!
|
||||
|
||||
## Contributing
|
||||
|
||||
Translation files for the InvenTree app are [available on GitHub](https://github.com/inventree/inventree-app-i18n/).
|
||||
|
||||
A Python helper script simplifies the translation process by presenting the user with words or phrases which require translation, one item at a time.
|
||||
|
||||
Full translation efforts, while appreciated, are not required. Please feel free to contribute as much as you can!
|
BIN
docs/assets/images/admin/import.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
docs/assets/images/admin/import_error.png
Normal file
After Width: | Height: | Size: 72 KiB |
BIN
docs/assets/images/admin/import_preview.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
docs/assets/images/admin/import_upload.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
docs/assets/images/api/api_roles.png
Normal file
After Width: | Height: | Size: 23 KiB |
BIN
docs/assets/images/api/api_roles_2.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
docs/assets/images/app/about.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
docs/assets/images/app/add_server_profile.jpg
Normal file
After Width: | Height: | Size: 168 KiB |
BIN
docs/assets/images/app/app_settings.jpg
Normal file
After Width: | Height: | Size: 128 KiB |
BIN
docs/assets/images/app/connected.jpg
Normal file
After Width: | Height: | Size: 113 KiB |
BIN
docs/assets/images/app/details.jpg
Normal file
After Width: | Height: | Size: 200 KiB |
BIN
docs/assets/images/app/drawer.jpg
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
docs/assets/images/app/edit_server.jpg
Normal file
After Width: | Height: | Size: 148 KiB |
BIN
docs/assets/images/app/home.jpg
Normal file
After Width: | Height: | Size: 123 KiB |
BIN
docs/assets/images/app/initial_home_screen.jpg
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
docs/assets/images/app/select_server.jpg
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
docs/assets/images/app/settings.jpg
Normal file
After Width: | Height: | Size: 137 KiB |
BIN
docs/assets/images/app/unauthorized.jpg
Normal file
After Width: | Height: | Size: 110 KiB |
1
docs/assets/images/build/inherited_bom.drawio
Normal file
@ -0,0 +1 @@
|
||||
<mxfile host="app.diagrams.net" modified="2021-02-17T12:17:54.934Z" agent="5.0 (Windows)" etag="87DjzT5RRqVJtgo26s6S" version="14.3.2" type="device"><diagram id="pZJ5gzIsBflhyFRZTal-" name="Page-1">7Vpbb5swFP41SNvDJrCB0MeGdFukVevUqVufJhc7gQ5w5Di3/vqZYK4mlFYk7BKpUvHx/fs++5zjVoNutP3I0MK/ppiEGtDxVoMTDQDDBEBLfnS8Sy0jy0wNcxZg2agw3AZPRBp1aV0FmCwrDTmlIQ8WVaNH45h4vGJDjNFNtdmMhtVZF2hOFMOth0LV+j3A3E+tjqUX9k8kmPvZzIYuayKUNZaGpY8w3ZRM8EqDLqOUp1/R1iVhAl6GS9rvw4HafGGMxLxLh/vHn77r2uPp56/R4+Qp8qZw/U6OskbhSm74G4kWIeJEWG8Q4+LXpVw/32WgMLqKMUnGNTQ43vgBJ7cL5CW1GyEDYfN5FMpqOQNhnGwPLt3IARFKIjQinO1EE9kBOhJDKaKsuCkYMTKY/RIbtrQhKYJ5PnKBk/iQUL0ANqDApgE7FLOOcbAWn/Pk8w6xAMUJguOsVkxWajA4rqCGK9CHBhYqwBYouoPjZf5xeJkteE0Gx6uuLwiGxstuOLg1kEiMLxPHIUpeiJbLwKviQrYB/yG+9ffAksX7UtUk2bueFXZZIRarT3tZWfG+XFd025eyfunqCFacVI0CsQO6Yh55/qrniM0Jf+5uUyktUWY1MJbZGBHOI1hXl9tEo5zhhgZ7sWYnTK8qxoQ1JaTblL3K3q4+kFWTnlMbKMVBGWivqnzbrxfaqE+hjf5JocGz0HoQmtOn0LrrrEe9gI56Mc966UEvF4pexl+uhWHKSZQE+wIZ/c009gkT0QF+2xJD6M/HELMgDF0aUrbvCzEiziwR35Iz+ouUamzPIQ+zfqIOC1QRbsoW7AalgGMFHVku254uVGnIWzywIl14YRLRgaAjwG0YHYO84+GtZrUNeOcaTxK0+hHoH+lBjkLORVsA3nRrHo+bJn915kY7kEyelhvVN/yn3Ni1Ow003Wkn5QZ0utMqfIwVV34Kj1LnyyIONpv4csADtO0jnSU4OF/gzNcL/JI1OF9tL49XLRAP85JmmkO/pAH16VFBacjEc6hEEcILsZvWDK9rqqgOldN+omQRWOeIoPnGajyAp72xmt6yzx7mEF+jwflqehJu58s1TsNQD3grEXNXB3U8vDtlmhW8J38P3oZZi6C6/k38FXiLYvFvCqlrKf7ZA179Bg==</diagram></mxfile>
|
BIN
docs/assets/images/build/inherited_bom.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
docs/assets/images/part/part_ipn_editing.png
Normal file
After Width: | Height: | Size: 87 KiB |
70
docs/build/bom.md
vendored
@ -6,6 +6,76 @@ title: Bill of Materials
|
||||
|
||||
A Bill of Materials (BOM) defines the list of component parts required to make an assembly, [create builds](../build) and allocate inventory.
|
||||
|
||||
A part which can be built from other sub components is called an *Assembly*.
|
||||
|
||||
## BOM Line Items
|
||||
|
||||
A BOM for a particular assembly is comprised of a number (zero or more) of BOM "Line Items", each of which has the following properties:
|
||||
|
||||
| Property | Description |
|
||||
| --- | --- |
|
||||
| Part | A reference to another *Part* object which is required to build this assembly |
|
||||
| Quantity | The quantity of *Part* required for the assembly |
|
||||
| Reference | Optional reference field to describe the BOM Line Item, e.g. part designator |
|
||||
| Overage | Estimated losses for a build. Can be expressed as absolute values (e.g. 1, 7, etc) or as a percentage (e.g. 2%) |
|
||||
| Inherited | A boolean field which indicates whether this BOM Line Item will be "inherited" by BOMs for parts which are a variant (or sub-variant) of the part for which this BOM is defined. |
|
||||
| Optional | A boolean field which indicates if this BOM Line Item is "optional" |
|
||||
| Note | Optional note field for additional information
|
||||
|
||||
!!! missing "Overage"
|
||||
While the overage field exists, it is currently non-functional and has no effect on BOM operation
|
||||
|
||||
!!! missing "Optional"
|
||||
The Optional field is currently for indication only - it does not serve a functional purpose (yet)
|
||||
|
||||
### Inherited BOM Line Items
|
||||
|
||||
When using the InvenTree [template / variant](../../part/template) feature, it may be useful to make use of the *inheritance* capability of BOM Line Items.
|
||||
|
||||
If a BOM Line Item is designed as *Inherited*, it will be automatically included in the BOM of any part which is a variant (or sub-variant) of the part for which the BOM Line Item is defined.
|
||||
|
||||
This is particulary useful if a template part is defined with the "common" BOM items which exist for all variants of that template.
|
||||
|
||||
Consider the example diagram below:
|
||||
|
||||
{% with id="inherited_bom", url="build/inherited_bom.png", description="Inherited BOM Line Items" %}
|
||||
{% include 'img.html' %}
|
||||
{% endwith %}
|
||||
|
||||
**Template Part A** has two BOM line items defined: *A1* and *A2*.
|
||||
|
||||
- *A1* is inherited by all variant parts underneath *Template Part A*
|
||||
- *A2* is not inherited, and is only included in the BOM for *Template Part A*
|
||||
|
||||
**Variant B** has two line items:
|
||||
|
||||
- *A1* is inherited from parent part *A*
|
||||
- *B1* is defined for part *B* (and is also defined as an inherited BOM Line Item)
|
||||
|
||||
**Variant C**
|
||||
|
||||
- *A1* inherited from *A*
|
||||
- *C1* defined for *C*
|
||||
|
||||
**Variant D**
|
||||
|
||||
- *A1* inherited from *A*
|
||||
- *B1* inherited from *B*
|
||||
- *D1* defined for *D*
|
||||
|
||||
**Variant E**
|
||||
|
||||
- Well, you get the idea.
|
||||
|
||||
Note that inherited BOM Line Items only flow "downwards" in the variant inheritance chain. Parts which are higher up the variant chain cannot inherit BOM items from child parts.
|
||||
|
||||
!!! info "Editing Inherited Items"
|
||||
When editing an inherited BOM Line Item for a template part, the changes are automatically reflected in the BOM of any variant parts.
|
||||
|
||||
## BOM Creation
|
||||
|
||||
BOMs can be created manually, by adjusting individual line items, or by upload an existing BOM file.
|
||||
|
||||
### Add BOM Item
|
||||
|
||||
To manually add a BOM item, navigate to the part/assembly detail page then click on the "BOM" tab. On top of the tab view, click on the <span class='fas fa-edit'></span> icon then, after the page reloads, click on the <span class='fas fa-plus-circle'></span> icon.
|
||||
|
@ -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 "<span class='fas fa-plus-circle'></span> 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
|
||||
|
@ -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 "<span class='fas fa-plus-circle'></span> 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
|
||||
|
@ -75,4 +75,30 @@ headers = {
|
||||
'AUTHORIZATION': f'Token {token}'
|
||||
}
|
||||
response = request.get('http://localhost:8080/api/part/', data=data, headers=headers)
|
||||
```
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
|
@ -1,39 +0,0 @@
|
||||
---
|
||||
title: Future Features
|
||||
---
|
||||
|
||||
## Future Features
|
||||
|
||||
An non-exhaustive list of feature proposals from InvenTree users.
|
||||
|
||||
!!! warning "Disclaimer"
|
||||
**There is no guarantee that any of those feature will be integrated into InvenTree.**
|
||||
If you would like to see them implemented, make your voice heard :)
|
||||
|
||||
### General
|
||||
|
||||
| Feature | Link(s) |
|
||||
| ----------- | ----------- |
|
||||
| Barcodes / QR Codes | [#853](https://github.com/inventree/InvenTree/issues/853) [#708](https://github.com/inventree/InvenTree/issues/708) [#677](https://github.com/inventree/InvenTree/issues/677) |
|
||||
| History tracking | [#547](https://github.com/inventree/InvenTree/issues/547) [#537](https://github.com/inventree/InvenTree/issues/537) [#377](https://github.com/inventree/InvenTree/issues/377) |
|
||||
| "Copy to clipboard" function | [#997](https://github.com/inventree/InvenTree/issues/997) [#725](https://github.com/inventree/InvenTree/issues/725) |
|
||||
| "Comments" support | [#868](https://github.com/inventree/InvenTree/issues/868) |
|
||||
|
||||
### Part
|
||||
|
||||
| Feature | Link(s) |
|
||||
| ----------- | ----------- |
|
||||
| Part Ownership and Lending | [#656](https://github.com/inventree/InvenTree/issues/656) |
|
||||
|
||||
### Build
|
||||
|
||||
| Feature | Link(s) |
|
||||
| ----------- | ----------- |
|
||||
| Add ability to modify a completed build | [#977](https://github.com/inventree/InvenTree/issues/977) |
|
||||
| Partial build completion | [#572](https://github.com/inventree/InvenTree/issues/572) |
|
||||
|
||||
### Orders
|
||||
|
||||
| Feature | Link(s) |
|
||||
| ----------- | ----------- |
|
||||
| Receiving order and allocating | [#551](https://github.com/inventree/InvenTree/issues/551) |
|
@ -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
|
@ -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.
|
||||
|
51
docs/faq.md
Normal file
@ -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:
|
||||
|
||||
<kbd>Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>R</kbd>
|
||||
|
||||
or
|
||||
|
||||
<kbd>Ctrl</kbd> + <kbd>F5</kbd>
|
||||
|
||||
### 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).
|
45
docs/features.md
Normal file
@ -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)
|
@ -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.
|
||||
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!
|
@ -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.
|
||||
|
@ -51,7 +51,7 @@ If a part is designated as a *Component* it can be used as a sub-component of an
|
||||
|
||||
Trackable parts can be assigned batch numbers or serial numbers which uniquely identify a particular stock item. Trackable parts also provide other features (and restrictions) in the InvenTree ecosystem.
|
||||
|
||||
[Read further information about trackable parts here](/../trackable).
|
||||
[Read further information about trackable parts here](../trackable).
|
||||
|
||||
### Purchaseable
|
||||
|
||||
@ -63,4 +63,4 @@ If a part is designated as *Salable* it can be sold to external customers. Setti
|
||||
|
||||
### Active
|
||||
|
||||
By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database.
|
||||
By default, all parts are *Active*. Marking a part as inactive means it is not available for many actions, but the part remains in the database. If a part becomes obsolete, it is recommended that it is marked as inactive, rather than deleting it from the database.
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: v0.1.4
|
||||
title: Release 0.1.4
|
||||
---
|
||||
|
||||
## Release 0.1.4
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: v0.1.5
|
||||
title: Release 0.1.5
|
||||
---
|
||||
|
||||
## Release 0.1.5
|
||||
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
title: v0.1.5
|
||||
title: Release 0.1.6
|
||||
---
|
||||
|
||||
## Release 0.1.6
|
||||
|
||||
[Release 0.1.5](https://github.com/inventree/InvenTree/releases/tag/0.1.5) (Febuary 2021) provides a number of major new features and improvements, as well as some crucial bug fixes:
|
||||
[Release 0.1.6](https://github.com/inventree/InvenTree/releases/tag/0.1.6) (Febuary 2021) provides a number of major new features and improvements, as well as some crucial bug fixes:
|
||||
|
||||
## New Features
|
||||
|
||||
@ -24,6 +24,22 @@ Refer to the [report documentation](../../report/report) for further information
|
||||
!!! warning "LaTeX Support"
|
||||
LaTeX report templates are no longer supported for a number of technical and ideological reasons
|
||||
|
||||
[#1292](https://github.com/inventree/InvenTree/pull/1292) adds support for build order / work order reports. Refer to the [build report documentation](../../report/build) for further information.
|
||||
|
||||
### Inherited BOM Items
|
||||
|
||||
[#1313](https://github.com/inventree/InvenTree/pull/1313) adds support for inherited BOM items, allowing greater flexibility for Bill of Materials management when combined with the Template / Variant part system.
|
||||
|
||||
Refer to the [BOM documentation](../../build/bom) for further information.
|
||||
|
||||
### Stock Item Packaging
|
||||
|
||||
[#1329](https://github.com/inventree/InvenTree/pull/1329) adds a *packaging* field to the StockItem model, so the particular packaging information (e.g. tape / reel / loose / etc) can be captured per stock item.
|
||||
|
||||
### Visual Improvements
|
||||
|
||||
[#1333](https://github.com/inventree/InvenTree/pull/1333) provides a significant overhaul of the visual style of the "index" and "search" pages.
|
||||
|
||||
## Major Bug Fixes
|
||||
| PR | Description |
|
||||
| --- | --- |
|
||||
@ -33,3 +49,4 @@ Refer to the [report documentation](../../report/report) for further information
|
||||
| [#1289](https://github.com/inventree/InvenTree/pull/1289) | Fixes display bug when a part "units" field is empty |
|
||||
| [#1290](https://github.com/inventree/InvenTree/pull/1290) | Fixes CSS issues with long error messages in modal forms |
|
||||
| [#1294](https://github.com/inventree/InvenTree/pull/1294) | Allows access to static files without being logged in |
|
||||
| [#1320](https://github.com/inventree/InvenTree/pull/1320) | Fixes "Used In" display for parts that are referenced in inerited BOMs |
|
||||
|
59
docs/releases/0.1.7.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
title: Release 0.1.7
|
||||
---
|
||||
|
||||
## Release 0.1.7
|
||||
|
||||
[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
|
||||
|
||||
### Label Printing
|
||||
|
||||
Label printing functionality has been simplified and brought into line with the PDF reporting functionality.
|
||||
|
||||
[#1342](https://github.com/inventree/InvenTree/pull/1342) represents a significant refactor of the label printing code.
|
||||
|
||||
!!! 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 |
|
||||
|
43
docs/releases/0.1.8.md
Normal file
@ -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 |
|
||||
|
34
docs/releases/0.2.0.md
Normal file
@ -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/r/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!
|
15
docs/releases/0.2.1.md
Normal file
@ -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. |
|
@ -8,6 +8,19 @@ For information on the latest and greatest InvenTree features, refer to the rele
|
||||
|
||||
| Release | Date |
|
||||
| ------- | ---- |
|
||||
| 0.1.6 | *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 |
|
||||
|
||||
## Upcoming Features
|
||||
|
||||
In-progress and upcoming features can be viewed on [GitHub](https://github.com/inventree/inventree/pulls), where the InvenTree source code is hosted.
|
||||
|
||||
## Suggest Something New
|
||||
|
||||
To suggest a new feature (or report a bug) raise an [issue on GitHub](https://github.com/inventree/inventree/issues).
|
||||
|
||||
|
64
docs/report/barcodes.md
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
title: Barcode Generation
|
||||
---
|
||||
|
||||
## Barcode Generation
|
||||
|
||||
Both [report](../report) and [label](../labels) templates can render custom barcode data to in-line images.
|
||||
|
||||
!!! info "img"
|
||||
Barcode data must be rendered inside an `<img>` tag.
|
||||
|
||||
Inside the template file (whether it be for printing a label or generating a custom report), the following code will need to be included at the top of the template file:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
<!-- Load the barcode helper functions -->
|
||||
{% load barcode %}
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### 1D Barcode
|
||||
|
||||
!!! info "python-barcode"
|
||||
One dimensional barcodes (e.g. Code128) are generated using the [python-barcode](https://pypi.org/project/python-barcode/) library.
|
||||
|
||||
To render a 1D barcode, use the `barcode` template tag, as shown in the example below:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
|
||||
<!-- Don't forget to load the barcode helper! -->
|
||||
{% load barcode %}
|
||||
|
||||
<img class='custom_class' src='{% barcode "12345678" %}'>
|
||||
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
The default barcode renderer will generate a barcode using [Code128](https://en.wikipedia.org/wiki/Code_128) rendering. However [other barcode formats](https://python-barcode.readthedocs.io/en/stable/codes.html) are also supported:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
|
||||
{% load barcode %}
|
||||
|
||||
<img class='custom_class' src='{% barcode "12345678" barcode_class="Code39" %}>
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### QR-Code
|
||||
|
||||
!!! info "qrcode"
|
||||
Two dimensional QR codes are generated using the [qrcode](https://pypi.org/project/qrcode/) library.
|
||||
|
||||
To render a QR code, use the `qrcode` template tag:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
|
||||
{% load barcode %}
|
||||
|
||||
<img class='custom_qr_class' src='{% qrcode "Hello world!" %}'>
|
||||
{% endraw %}
|
||||
```
|
24
docs/report/build.md
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Build Order Report
|
||||
---
|
||||
|
||||
## Build Order Report
|
||||
|
||||
Custom build order reports may be generated against any given Build Order. For example, build order reports can be used to generate work orders.
|
||||
|
||||
### Build Filters
|
||||
|
||||
!!! missing "TODO"
|
||||
This section rquires further work
|
||||
|
||||
### Context Variables
|
||||
|
||||
In addition to the default report context variables, the following context variables are made available to the build order report template for rendering:
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| build | The build object the report is being generated against |
|
||||
| part | The part object that the build references |
|
||||
| reference | The build order reference string |
|
||||
| quantity | Build order quantity |
|
||||
|
@ -4,18 +4,16 @@ title: Custom Labels
|
||||
|
||||
## Custom Labels
|
||||
|
||||
InvenTree supports printing of custom template-based labels, using the [blabel](https://github.com/Edinburgh-Genome-Foundry/blabel) Python library.
|
||||
InvenTree supports printing of custom template-based labels, using the [WeasyPrint](https://weasyprint.org/) PDF generation engine.
|
||||
|
||||
Custom labels can be generated using simple HTML templates, with support for QR-codes, and conditional formatting using the Jinja template engine.
|
||||
|
||||
!!! info "Documentation"
|
||||
Refer to the [blabel documentation](https://edinburgh-genome-foundry.github.io/blabel/) for further information, and examples of the available features
|
||||
|
||||
Simple (generic) label templates are supplied 'out of the box' with InvenTree - however support is provided for generation of extremely specific custom labels, to meet any particular requirement.
|
||||
|
||||
## Label Templates
|
||||
|
||||
Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). The blabel library is based on [weasyprint](https://weasyprint.org/), which supports a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Jinja templating engine, allowing conditional formatting of the label data.
|
||||
Label templates are written using a mixture of [HTML](https://www.w3schools.com/html/) and [CSS](https://www.w3schools.com/css). [Weasyprint](https://weasyprint.org/) templates support a *subset* of HTML and CSS features. In addition to supporting HTML and CSS formatting, the label templates support the Jinja templating engine, allowing conditional formatting of the label data.
|
||||
|
||||
A label template is a single `.html` file which is uploaded to the InvenTree server by the user.
|
||||
|
||||
@ -32,6 +30,7 @@ Below is a reasonably simple example of a label template which demostrates much
|
||||
width: 75mm;
|
||||
height: 24mm;
|
||||
padding: 1mm;
|
||||
margin: 0px 0px 0px 0px;
|
||||
}
|
||||
|
||||
.location {
|
||||
@ -58,8 +57,8 @@ Below is a reasonably simple example of a label template which demostrates much
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<img class='qr' src="{{ label_tools.qr_code(location.barcode) }}"/>
|
||||
{% load barcode %}
|
||||
<img class='qr' src="{% qrcode location.format_barcode %}"/>
|
||||
|
||||
<div class='location'>
|
||||
{{ location.name }}
|
||||
@ -99,11 +98,9 @@ Location Name: {{ location.name }}
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### QR Codes
|
||||
### Barcodes
|
||||
|
||||
`blabel` supports barcodes and QR codes 'out of the box'. Passing data to render as a barcode or QR code is handled in the template file itself.
|
||||
|
||||
Refer to the [blabel docs](https://edinburgh-genome-foundry.github.io/blabel/) for further information.
|
||||
Refer to the [barcode documentation](../barcodes).
|
||||
|
||||
### Conditional Formatting
|
||||
|
||||
@ -127,10 +124,67 @@ As an example, consider a label template for a StockItem. A user may wish to def
|
||||
|
||||
To restrict the label accordingly, we could set the *filters* value to `part__IPN=IPN123`.
|
||||
|
||||
### Built-In Templates
|
||||
## Built-In Templates
|
||||
|
||||
The InvenTree installation provides a number of simple *default* templates which can be used as a starting point for creating custom labels. These built-in templates can be disabled if they are not required.
|
||||
|
||||
Built-in templates can also be used to quickly scaffold custom labels, using template inheritance.
|
||||
|
||||
### Base Template
|
||||
|
||||
For example, InvenTree provides a *base* template from which all of the default label templates are derived. This *base* template provides the essentials for generating a label:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
<head>
|
||||
<style>
|
||||
@page {
|
||||
size: {{ width }}mm {{ height }}mm;
|
||||
{% block margin %}
|
||||
margin: 0mm;
|
||||
{% endblock %}
|
||||
}
|
||||
|
||||
img {
|
||||
display: inline-block;
|
||||
image-rendering: pixelated;
|
||||
}
|
||||
|
||||
{% block style %}
|
||||
{% endblock %}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{% block content %}
|
||||
<!-- Label data rendered here! -->
|
||||
{% endblock %}
|
||||
</body>
|
||||
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
### Extend Base Template
|
||||
|
||||
To extend this template in a custom uploaded label, simply extend as follows:
|
||||
|
||||
```html
|
||||
{% raw %}
|
||||
{% extends "label/label_base.html" %}
|
||||
|
||||
{% block style %}
|
||||
<!-- You can write custom CSS here -->
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<!-- HTML content goes here! -->
|
||||
{% endblock %}
|
||||
|
||||
{% endraw %}
|
||||
```
|
||||
|
||||
|
||||
## Stock Item Labels
|
||||
|
||||
Stock Item label templates are used to generate labels for individual Stock Items.
|
||||
|
@ -48,6 +48,24 @@ For example, rendering the name of a part (which is available in the particular
|
||||
!!! info "Variables"
|
||||
Templates will have different variables available to them depending on the report type. Read the detail information on each report type for further information.
|
||||
|
||||
### Context Data
|
||||
|
||||
Each report has access to a number of context variables by default. The following context variables are provided to every report template:
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| date | Current date, represented as a Python datetime.date object |
|
||||
| datetime | Current datetime, represented as a Python datetime object |
|
||||
| default_page_size | InvenTree default page size variable |
|
||||
| report_name | Name of the report template |
|
||||
| report_description | Description of the report template |
|
||||
| report_revision | Revision of the report template |
|
||||
| request | Django request object |
|
||||
| user | User who made the request to render the template |
|
||||
|
||||
!!! info "Specific Report Context"
|
||||
Specific report types may have additional context variables
|
||||
|
||||
### Conditional Rendering
|
||||
|
||||
The django template system allows for conditional rendering, providing conditional flow statements such as `{% raw %}{% if <condition> %}{% endraw %}`, `{% raw %}{% for <item> in <list> %}{% endraw %}`, etc.
|
||||
@ -182,7 +200,7 @@ InvenTree supports the following reporting functionality:
|
||||
|
||||
### Build Report
|
||||
|
||||
Build Report: TODO
|
||||
[Build Order](../build): Format a build order report
|
||||
|
||||
### Purchase Order
|
||||
[Purchase Order report](../order): Order line items
|
||||
|
@ -27,12 +27,14 @@ In the example below, a test report template is uploaded and assigned to the par
|
||||
|
||||
### Context Variables
|
||||
|
||||
The following context variables are made available to the TestReport template for rendering:
|
||||
In addition to the default report context variables, the following context variables are made available to the TestReport template for rendering:
|
||||
|
||||
- **stock_item**: The individual stock item for which this test report is being generated
|
||||
- **part**: The Part of which the stock_item is an instance
|
||||
- **results**: A dict of test result objects, where the 'key' for each test result is a shortened version of the test name (see below)
|
||||
- **result_list**: A list of each test result object
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| stock_item | The individual stock item for which this test report is being generated |
|
||||
| part | The Part of which the stock_item is an instance |
|
||||
| results | A dict of test result objects, where the 'key' for each test result is a shortened version of the test name (see below) |
|
||||
| result_list | A list of each test result object |
|
||||
|
||||
#### Results
|
||||
|
||||
|
@ -6,16 +6,20 @@ title: Database Configuration
|
||||
|
||||
Admin users will need to adjust the InvenTree installation to meet the particular needs of their setup. For example, pointing to the correct database backend, or specifying a list of allowed hosts.
|
||||
|
||||
The Django configuration parameters are found in the normal place (*settings.py*). However the settings presented in this file should not be adjusted as they will alter the core behaviour of the InvenTree application.
|
||||
InvenTree system settings can be specified in a configuration file, or via environment variables.
|
||||
|
||||
!!! info "Environment Variables"
|
||||
Settings specified using environment variables take priority
|
||||
|
||||
### Configuration File
|
||||
|
||||
To support install specific settings, a simple configuration file ``config.yaml`` is provided. This configuration file is loaded by the InvenTree server at runtime. Settings specific to a given install should be adjusted in ``config.yaml``.
|
||||
|
||||
!!! info "Config file location"
|
||||
The InvenTree config file is located at `./InvenTree/config.yaml`
|
||||
The default InvenTree config file is located at `./InvenTree/config.yaml`
|
||||
|
||||
The default configuration file launches a *DEBUG* configuration with a simple SQLITE database backend. This default configuration file is shown below:
|
||||
However, the config file can be placed elsewhere, and specified with the `INVENTREE_CONFIG_FILE` environment variable.
|
||||
|
||||
The default configuration file file is shown below:
|
||||
|
||||
``` yaml
|
||||
{% include 'config.yaml' %}
|
||||
@ -34,7 +38,7 @@ In addition to specifying InvenTree options via the `config.yaml` file, these op
|
||||
!!! warning Available Variables
|
||||
Some configuration options cannot be set via environment variables. Refer to the documentation below.
|
||||
|
||||
### Basic Options
|
||||
## Basic Options
|
||||
|
||||
The following basic options are available:
|
||||
|
||||
@ -43,7 +47,7 @@ The following basic options are available:
|
||||
| INVENTREE_DEBUG | debug | Enable debug mode |
|
||||
| INVENTREE_LOG_LEVEL | log_level | Set level of logging to terminal |
|
||||
|
||||
### Secret Key
|
||||
## Secret Key
|
||||
|
||||
InvenTree requires a secret key for providing cryptographic signing - this should be a secret (and unpredictable) value.
|
||||
|
||||
@ -61,7 +65,7 @@ A file containing the secret key can be passed via the environment variable `INV
|
||||
|
||||
If not specified via environment variables, the fallback secret_key file (automatically generated as part of InvenTree installation) will be used.
|
||||
|
||||
### Database Options
|
||||
## Database Options
|
||||
|
||||
InvenTree provides support for multiple database backends - any backend supported natively by Django can be used.
|
||||
|
||||
@ -69,7 +73,7 @@ Database options are specified under the *database* heading in the configuration
|
||||
|
||||
The following database options can be configured:
|
||||
|
||||
| Environment Variable | COnfig File | Description |
|
||||
| Environment Variable | Settings File | Description |
|
||||
| --- | --- | --- |
|
||||
| INVENTREE_DB_ENGINE | database.ENGINE | Database backend |
|
||||
| INVENTREE_DB_NAME | database.NAME | Database name |
|
||||
@ -78,68 +82,8 @@ The following database options can be configured:
|
||||
| INVENTREE_DB_HOST | database.HOST | Database host address (if required) |
|
||||
| INVENTREE_DB_PORT | database.PORT | Database host port (if required) |
|
||||
|
||||
Instructions for particular database backends are provided below:
|
||||
|
||||
#### SQLite
|
||||
By default, InvenTree uses an sqlite database file : `inventree_db.sqlite3`. This provides a simple, portable database file that is easy to use for debug and testing purposes.
|
||||
|
||||
#### MySQL
|
||||
MySQL database backend is supported with the native Django implemetation. To run InvenTree with the MySQL backend, a number of extra packages need to be installed:
|
||||
|
||||
* mysql-server - *MySQL backend server*
|
||||
* libmysqlclient-dev - *Required for connecting to the MySQL database in Python*
|
||||
* (pip) mysqlclient - *Python package for communication with MySQL database*
|
||||
|
||||
To install these required packages, run the following command:
|
||||
|
||||
```
|
||||
inv mysql
|
||||
```
|
||||
|
||||
It is then up to the database adminstrator to create a new MySQL database to store inventree data, in addition to a username/password to access the data.
|
||||
|
||||
!!! info "MySQL Collation"
|
||||
When creating the MySQL database, the adminstrator must ensure that the collation option is set to **utf8_unicode_520_ci** to ensure that InvenTree features function correctly.
|
||||
|
||||
The database options (in the `config.yaml` file) then need to be adjusted to communicate the MySQL backend. Refer to the [Django docs](https://docs.djangoproject.com/en/dev/ref/databases/) for further information.
|
||||
|
||||
#### PostgreSQL
|
||||
PostgreSQL database backend is supported with the native Django implementation. Note that to use this backend, the following system packages must be installed:
|
||||
|
||||
* postgresql
|
||||
* postgresql-contrib
|
||||
* libpq-dev
|
||||
* (pip3) psycopg2
|
||||
|
||||
To install these required packages, run the following commands:
|
||||
|
||||
```
|
||||
inv postgresql
|
||||
```
|
||||
|
||||
It is then up to the database adminstrator to create a new PostgreSQL database to store inventree data, in addition to a username/password to access the data.
|
||||
|
||||
The database options (in the `config.yaml` file) then need to be adjusted to communicate the PostgreSQL backend. Refer to the [Django docs](https://docs.djangoproject.com/en/dev/ref/databases/) for further information.
|
||||
|
||||
### Email Backend
|
||||
|
||||
InvenTree email settings must be correctly configured to allow sending emails.
|
||||
|
||||
Email options are specified under the *email* heading in the configuration file. Alternatively email settings can be set via environment variables.
|
||||
|
||||
The following email options can be configured:
|
||||
|
||||
| Environment Variable | Config File | Description |
|
||||
| --- | --- | --- |
|
||||
| INVENTREE_EMAIL_HOST | email.host | Email service host address |
|
||||
| INVENTREE_EMAIL_PORT | email.port | Email service host port |
|
||||
| INVENTREE_EMAIL_USERNAME | email.username | Account username |
|
||||
| INVENTREE_EMAIL_PASSWORD | email.password | Account password |
|
||||
| INVENTREE_EMAIL_PREFIX | email.prefix | Email subject prefix - default is "[InvenTree] " |
|
||||
| INVENTREE_EMAIL_TLS | email.tls | Enable TLS support |
|
||||
| INVENTREE_EMAIL_SSL | email.ssl | Enable SSL support |
|
||||
|
||||
### Allowed Hosts / CORS
|
||||
## Allowed Hosts / CORS
|
||||
|
||||
By default, all hosts are allowed, and CORS requests are enabled from any origin. **This is not secure and should be adjusted for your installation**. These options can be changed in the configuration file.
|
||||
|
||||
@ -148,24 +92,28 @@ For further information, refer to the following documentation:
|
||||
* [Django ALLOWED_HOSTS](https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts)
|
||||
* [Django CORS headers](https://github.com/OttoYiu/django-cors-headers)
|
||||
|
||||
## File Storage Locations
|
||||
|
||||
### Static File Storage
|
||||
|
||||
By default, static files are stored in the local directory `./inventree_media`. This directory should be changed by specifying the `static_root` option in the config file based on the particular installation requirements.
|
||||
By default, static files are stored in the local directory `/home/inventree/static`. This directory should be changed by specifying the `static_root` option in the config file based on the particular installation requirements.
|
||||
|
||||
Alternatively this location can be specified with the `INVENTREE_STATIC_ROOT` environment variable.
|
||||
|
||||
### Uploaded File Storage
|
||||
|
||||
By default, uploaded media files are stored in the local directory `./inventree_media`. This directory should be changed by specifying the `media_root` option in the config file based on the particular installation requirements.
|
||||
By default, uploaded media files are stored in the local directory `/home/inventree/media`. This directory should be changed by specifying the `media_root` option in the config file based on the particular installation requirements.
|
||||
|
||||
Alternatively this location can be specified with the `INVENTREE_MEDIA_ROOT` environment variable.
|
||||
|
||||
### Backup Location
|
||||
|
||||
The default behaviour of the database backup is to generate backup files for database tables and media files to the user's temporary directory. The target directory can be overridden by setting the `backup_dir` parameter in the config file.
|
||||
The default behaviour of the database backup is to generate backup files for database tables and media files to `/home/inventree/backup`. The target directory can be overridden by setting the `backup_dir` parameter in the config file.
|
||||
|
||||
Alternatively this location can be specified with the `INVENTREE_BACKUP_DIR` environment variable.
|
||||
|
||||
## Other Options
|
||||
|
||||
### Authentication Backends
|
||||
|
||||
Custom authentication backends can be used by specifying them here
|
||||
|
@ -1,82 +0,0 @@
|
||||
---
|
||||
title: Deploy InvenTree
|
||||
---
|
||||
|
||||
## Deploying InvenTree
|
||||
|
||||
The development server provided by the Django ecosystem may be fine for a testing environment or small contained setups. However special consideration must be given when deploying InvenTree in a real-world environment.
|
||||
|
||||
Django apps provide multiple deployment methods - see the [Django documentation](https://docs.djangoproject.com/en/2.2/howto/deployment/).
|
||||
|
||||
There are also numerous online tutorials describing how to deploy a Django application either locally or on an online platform.
|
||||
|
||||
### Development Server
|
||||
|
||||
The InvenTree development server is useful for testing and configuration - and it may be wholly sufficient for a small-scale installation.
|
||||
|
||||
#### Running on a Local Machine
|
||||
|
||||
To run the development server on a local machine, run the command:
|
||||
|
||||
```
|
||||
inv server -a 127.0.0.1:8000
|
||||
```
|
||||
|
||||
Serving on the address `127.0.0.1` means that InvenTree will only be available *on that computer*. The server will be accessible from a web browser on the same computer, but not from any other computers on the local network.
|
||||
|
||||
#### Running on a Local Network
|
||||
|
||||
To enable access to the InvenTree server from other computers on a local network, you need to know the IP of the computer running the server. For example, if the server IP address is `192.168.120.1`:
|
||||
|
||||
```
|
||||
inv server -a 192.168.120.1:8000
|
||||
```
|
||||
|
||||
!!! warning "Not For Production"
|
||||
It should be noted that the *development server* provided with django / InvenTree is probably not suitable for your production environment. Instead, use a proper web-server (such as Gunicorn, below).
|
||||
|
||||
## Gunicorn
|
||||
|
||||
Following is a simple tutorial on serving InvenTree using [Gunicorn](https://gunicorn.org/). Gunicorn is a Python WSGI server which provides a multi-worker server which is well suited to handling multiple simultaneous requests. Gunicorn is a solid choice for a production server which is easy to configure and performs well in a multi-user environment.
|
||||
|
||||
### Install Gunicorn
|
||||
|
||||
Gunicorn can be installed using PIP:
|
||||
|
||||
```
|
||||
pip3 install gunicorn
|
||||
```
|
||||
|
||||
!!! warning "Python Environment"
|
||||
Ensure that gunicorn is installed within the same python environment context as the InvenTree install - otherwise gunicorn will not be able to import the correct python modules.
|
||||
|
||||
### Configure Static Directories
|
||||
|
||||
Directories for storing *media* files and *static* files should be specified in the ``config.yaml`` configuration file. These directories are the ``MEDIA_ROOT`` and ``STATIC_ROOT`` paths required by the Django app. Ensure that both of these directories are correctly configured for your setup.
|
||||
|
||||
### Collect Static Files
|
||||
|
||||
The required static files must be collected into the specified ``STATIC_ROOT`` directory:
|
||||
|
||||
```
|
||||
inv static
|
||||
```
|
||||
|
||||
This command collects all of the required static files (including script and css files) into the specified directory ready to be served.
|
||||
|
||||
### Configure Gunicorn
|
||||
|
||||
The Gunicorn server can be configured with a simple configuration file (e.g. python script). An example configuration file is provided in ``InvenTree/gunicorn.conf.py``
|
||||
|
||||
``` python
|
||||
{% include 'gunicorn.conf.py' %}
|
||||
```
|
||||
|
||||
This file can be used to configure the Gunicorn server to match particular requirements.
|
||||
|
||||
### Run Gunicorn
|
||||
|
||||
```
|
||||
cd InvenTree
|
||||
gunicorn -c gunicorn.conf.py InvenTree.wsgi
|
||||
```
|
58
docs/start/development.md
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
title: Development Server
|
||||
---
|
||||
|
||||
## Development Server
|
||||
|
||||
!!! warning "Installation"
|
||||
Before continuing, ensure that the [installation steps](../install) have been completed.
|
||||
|
||||
InvenTree includes a simple server application, suitable for use in a development environment.
|
||||
|
||||
!!! warning "Deployment"
|
||||
Refer to the [production server instructions](../production) to implement a much more robust server setup.
|
||||
|
||||
### Running on a Local Machine
|
||||
|
||||
To run the development server on a local machine, run the command:
|
||||
|
||||
```
|
||||
(env) inv server
|
||||
```
|
||||
|
||||
This will launch the InvenTree web interface at `http://127.0.0.1:8000`.
|
||||
|
||||
A different port can be specified using the `-a` flag:
|
||||
|
||||
```
|
||||
(env) inv server -a 127.0.0.1:8123
|
||||
```
|
||||
|
||||
Serving on the address `127.0.0.1` means that InvenTree will only be available *on that computer*. The server will be accessible from a web browser on the same computer, but not from any other computers on the local network.
|
||||
|
||||
### Running on a Local Network
|
||||
|
||||
To enable access to the InvenTree server from other computers on a local network, you need to know the IP of the computer running the server. For example, if the server IP address is `192.168.120.1`:
|
||||
|
||||
```
|
||||
(env) inv server -a 192.168.120.1:8000
|
||||
```
|
||||
|
||||
## Background Worker
|
||||
|
||||
The backgroun task manager must also be started. The InvenTree server is already running in the foreground, so open a *new shell window* to start the server.
|
||||
|
||||
### Activate Virtual Environment
|
||||
|
||||
```
|
||||
cd /home/inventree
|
||||
source ./env/bin/activate
|
||||
```
|
||||
|
||||
### Start Background Worker
|
||||
|
||||
```
|
||||
(env) invoke worker
|
||||
```
|
||||
|
||||
This will start the background process manager in the current shell.
|
161
docs/start/docker.md
Normal file
@ -0,0 +1,161 @@
|
||||
---
|
||||
title: Docker Setup
|
||||
---
|
||||
|
||||
## Docker Image
|
||||
|
||||
The most convenient method of installing and running InvenTree is to use the official [docker image](https://hub.docker.com/inventree/inventree).
|
||||
|
||||
The InvenTree docker image contains all the required system packages, python modules, and configuration files for running InvenTree.
|
||||
|
||||
## Docker Compose
|
||||
|
||||
An example docker compose script is provided below, which provides a robust "out of the box" setup for running InvenTree.
|
||||
|
||||
### Containers
|
||||
|
||||
The following containers are created:
|
||||
|
||||
#### PostgreSQL Database
|
||||
|
||||
A postgresql database container which creates a postgres user:password combination (which can be changed)
|
||||
|
||||
#### Web Server
|
||||
|
||||
InvenTree web server running on a Gunicorn backend
|
||||
|
||||
#### Background Worker
|
||||
|
||||
InvenTree background worker process manager
|
||||
|
||||
#### Nginx
|
||||
|
||||
Nginx working as a reverse proxy, separating requests for static files and directing everything else to Gunicorn
|
||||
|
||||
### Volumes
|
||||
|
||||
There are two container volumes created:
|
||||
|
||||
#### Data
|
||||
|
||||
InvenTree stores data which is meant to be persistent (e.g. uploaded media files, database data, etc) in a volume which is mapped to a local system directory.
|
||||
|
||||
!!! info "Data Directory"
|
||||
Make sure you change the path to the local directory where you want persistent data to be stored.
|
||||
|
||||
#### Static
|
||||
|
||||
Static files are shared between multiple containers (but not exposed to the local file system).
|
||||
|
||||
### Docker Compose File
|
||||
|
||||
Use the following docker-compose file as a starting point:
|
||||
|
||||
``` yaml
|
||||
{% include 'docker-compose.yml' %}
|
||||
```
|
||||
|
||||
## Initial Setup Process
|
||||
|
||||
Follow the instructions below to initialize a complete docker deployment for InvenTree.
|
||||
|
||||
!!! info "Directory"
|
||||
It is assumed that all commands will be run from the directory where `docker-compose.yml` is located.
|
||||
|
||||
### Configure Compose File
|
||||
|
||||
Save and edit the `docker-compose.yml` file as required.
|
||||
|
||||
The only **required** change is to ensure that the `/path/to/data` entry (at the end of the file) points to the correct directory on your local file system, where you want InvenTree data to be stored.
|
||||
|
||||
### Launch Database Server
|
||||
|
||||
Before we can create the database, we need to launch the database server container:
|
||||
|
||||
```
|
||||
docker-compose up -d db
|
||||
```
|
||||
|
||||
This starts the database container.
|
||||
|
||||
### Create Database
|
||||
|
||||
Run the following command to open a shell session for the database:
|
||||
|
||||
```
|
||||
docker-compose run inventree pgcli -h db -p 5432 -u pguser
|
||||
```
|
||||
|
||||
!!! info "User"
|
||||
If you have changed the `POSTGRES_USER` variable in the compose file, replace `pguser` with the different user.
|
||||
|
||||
You will be prompted to enter the database user password (default="pgpassword", unless altered in the compose file).
|
||||
|
||||
Next, run the following command in the database shell:
|
||||
|
||||
```
|
||||
create database inventree;
|
||||
```
|
||||
|
||||
Then exit the shell with <kbd>Ctrl</kbd>+<kbd>d</kbd>
|
||||
|
||||
### Perform Database Migrations
|
||||
|
||||
The database has been created, but it is empty! We need to perform the initial database migrations.
|
||||
|
||||
```
|
||||
docker-compose run inventree invoke migrate
|
||||
```
|
||||
|
||||
This will perform the required schema updates to create the required database tables.
|
||||
|
||||
### Collect Static Files
|
||||
|
||||
On first run, the required static files must be collected into the `static` volume:
|
||||
|
||||
```
|
||||
docker-compose run inventree invoke static
|
||||
```
|
||||
|
||||
### Create Admin Account
|
||||
|
||||
You need to create an admin (superuser) account for the database. Run the command below, and follow the prompts:
|
||||
|
||||
```
|
||||
docker-compose run inventree invoke superuser
|
||||
```
|
||||
|
||||
### Configure InvenTree Options
|
||||
|
||||
By default, all required InvenTree settings are specified in the docker compose file, with the `INVENTREE_DB_` prefix.
|
||||
|
||||
You are free to skip this step, if these InvenTree settings meet your requirements.
|
||||
|
||||
If you wish to tweak the InvenTree configuration options, you can either:
|
||||
|
||||
#### Environment Variables
|
||||
|
||||
Alter (or add) environment variables into the docker-compose `environment` section
|
||||
|
||||
#### Configuration File
|
||||
|
||||
A configuration file `config.yaml` has been created in the data volume (at the location specified on your local disk).
|
||||
|
||||
Edit this file (as per the [configuration guidelines](../config)).
|
||||
|
||||
### Run Web Server
|
||||
|
||||
Now that the database has been created, migrations applied, and you have created an admin account, we are ready to launch the web server:
|
||||
|
||||
```
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
This command launches the remaining container processes:
|
||||
|
||||
- `inventree` - InvenTree web server
|
||||
- `worker` - Background worker
|
||||
- `nginx` - Nginx reverse proxy
|
||||
|
||||
!!! success "Up and Running!"
|
||||
You should now be able to view the InvenTree login screen at [http://localhost:1337](http://localhost:1337)
|
@ -2,212 +2,256 @@
|
||||
title: Install InvenTree
|
||||
---
|
||||
|
||||
## Introduction
|
||||
## Initial Setup
|
||||
|
||||
The InvenTree server application communicates with a backend database, and serves data to the user(s) via a web framework and an API. Before users can interact with the InvenTree system, the server must be installed and properly configured, and then the server process must be started (at a network location which is accessible to the users).
|
||||
Follow the instructions below to install the requried system packages, python modules, and InvenTree source code.
|
||||
|
||||
### Supported Databases
|
||||
### Install System Packages
|
||||
|
||||
InvenTree can be used by any database backend which is supported by the [Django framework](https://docs.djangoproject.com/en/3.0/ref/databases/):
|
||||
Install required system packages (as superuser):
|
||||
|
||||
* SQLite
|
||||
* PostgreSQL
|
||||
* MariaDB
|
||||
* MySQL
|
||||
* Oracle
|
||||
|
||||
Database selection should be determined by your particular installation requirements. By default, InvenTree uses SQLite which provides a simple file-based database that allows a quick setup for development and testing.
|
||||
|
||||
### Serving Data
|
||||
|
||||
Once a database is setup, you need a way of accessing the data. InvenTree provides a "server" application out of the box, but this may not scale particularly well with multiple users. Instead, InvenTree can be served using a webserver such as [Gunicorn](https://gunicorn.org/). For more information see the [deployment documentation](./deploy).
|
||||
|
||||
## OS Requirements
|
||||
|
||||
To install a complete *development* environment for InvenTree, follow the steps presented below. A production environment will require further work as per the particular application requirements.
|
||||
|
||||
Installing and running InvenTree should be possible on most operating systems, as it requires only cross-platform Python libraries.
|
||||
|
||||
On some systems, the dependencies for the `weasyprint` package might not be installed. Consider running through the [weasyprint installation steps](https://weasyprint.readthedocs.io/en/stable/install.html) before moving forward.
|
||||
|
||||
### Linux
|
||||
|
||||
The InvenTree documentation assumes that the operating system is a Linux variant. To install the required python packages to get started on a Linux system, run the following commands:
|
||||
!!! warning "OS Specific Requirements"
|
||||
The following packages are required on a debian system. A different distribution may require a slightly different set of packages
|
||||
|
||||
```
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3 python3-dev
|
||||
sudo apt-get install python3-pip python3-invoke
|
||||
sudo apt-get install python3-pip python3-invoke python3-venv
|
||||
```
|
||||
|
||||
!!! warning "Sudo"
|
||||
`apt-get` commands will (most likely) be required to run under sudo. Take care not to run the installation scripts under sudo, as this may alter the system python path and cause the InvenTree installation to not work correctly
|
||||
!!! warning "Weasyprint"
|
||||
On some systems, the dependencies for the `weasyprint` package might not be installed. Consider running through the [weasyprint installation steps](https://weasyprint.readthedocs.io/en/stable/install.html) before moving forward.
|
||||
|
||||
### Windows
|
||||
|
||||
InvenTree can be installed and run from the Windows command line, assuming the following binaries are available in the system PATH:
|
||||
### Create InvenTree User
|
||||
|
||||
- python3
|
||||
- pip3
|
||||
- invoke
|
||||
|
||||
!!! info "WSL"
|
||||
|
||||
Alternatively, if you are running under the Windows operating system you can install and run InvenTree using the [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/install-win10) framework. Running under WSL provides a Linux compatible layer which simplifies InvenTree installation.
|
||||
|
||||
### FreeBSD
|
||||
|
||||
If you are running the FreeBSD operating system, run the following commands to install the required Python packages:
|
||||
!!! warning "Running as Root"
|
||||
It is highly recommended that the InvenTree server is not run under root. The deployment instructions assume that InvenTree is installed and run from a different user account.
|
||||
|
||||
Create a user account from which we will run the server:
|
||||
|
||||
```
|
||||
pkg install python
|
||||
pkg install py37-pip
|
||||
pkg install py37-wheel
|
||||
pkg install py37-invoke
|
||||
sudo useradd -m -d /home/inventree -s /bin/bash inventree
|
||||
```
|
||||
|
||||
## Python Setup
|
||||
InvenTree source code, log files, etc will be located under the `/home/inventree/` directory.
|
||||
|
||||
To install InvenTree you will need python3 (>3.6) installed, as well as PIP (the Python package manager), and the Invoke tool.
|
||||
|
||||
!!! warning "Python Version"
|
||||
InvenTree requrires Python 3.6 (or newer). If your system has an older version of Python installed, you will need to follow the update instructions for your OS.
|
||||
|
||||
### Python Virtual Environment
|
||||
|
||||
Installing the required Python packages inside a virtual environment allows a local install separate to the system-wide Python installation. While not strictly necessary, using a virtual environment is highly recommended as it prevents conflicts between the different Python installations.
|
||||
|
||||
You can read more about Python virtual environments [here](https://docs.python.org/3/tutorial/venv.html).
|
||||
|
||||
To configure Inventree inside a virtual environment, ``cd`` into the inventree base directory and run the following commands:
|
||||
Switch to the `inventree` user so commands are performed in the correct context:
|
||||
|
||||
```
|
||||
sudo apt-get install python3-venv
|
||||
python3 -m venv inventree-env
|
||||
source inventree-env/bin/activate
|
||||
sudo su inventree
|
||||
```
|
||||
|
||||
!!! note "Virtual Environment on Windows"
|
||||
To create and activate a virtual environment in Windows, run the following commands:
|
||||
```
|
||||
py -m venv inventree-env
|
||||
.\inventree-env\Scripts\activate
|
||||
```
|
||||
|
||||
Refer to the [official Python documentation](https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/) to setup a virtual environment on Windows.
|
||||
|
||||
This will place the current shell session inside a virtual environment - the terminal should display the ``(inventree-env)`` prefix.
|
||||
|
||||
!!! warning "Activate virtual environment"
|
||||
Remember to activate the virtual environment when starting each shell session, before running Inventree commands. This will ensure that the correct environment is being used.
|
||||
|
||||
### Invoke
|
||||
|
||||
InvenTree setup is performed using the [invoke](https://www.pyinvoke.org/) Python build tool. Various useful scripts are defined in the `tasks.py` file.
|
||||
|
||||
Install invoke as follows:
|
||||
### Create Required Directories
|
||||
|
||||
```
|
||||
pip3 install invoke
|
||||
cd /home/inventree
|
||||
mkdir log static data
|
||||
```
|
||||
|
||||
!!! warning "Invoke Version"
|
||||
InvenTree requires invoke version 1.4.0 or newer. Some platforms may be shipped with older versions of invoke!
|
||||
This step creates directories required by InvenTree:
|
||||
|
||||
To display a list of the available configuration scripts, run the following command:
|
||||
* `/home/inventree/log` - Store InvenTree log files
|
||||
* `/home/inventree/static` - Location of static files for the web server
|
||||
* `/home/inventre/data` - Location of stored media and backup files
|
||||
|
||||
### Download Source Code
|
||||
|
||||
Download InvenTree source code, into the `./src` directory:
|
||||
|
||||
```
|
||||
inv --list
|
||||
git clone https://github.com/inventree/inventree src
|
||||
```
|
||||
|
||||
## Download Source Code
|
||||
### Create Virtual Environment
|
||||
|
||||
Download the InvenTree source code to a local directory. It is recommended to perform this step using git, as this allows the InvenTree installation to be easily updated to the latest version.
|
||||
Create a python virtual environment for installing required Python packages and binaries:
|
||||
|
||||
```
|
||||
git clone https://github.com/inventree/inventree/
|
||||
python3 -m venv env
|
||||
source ./env/bin/activate
|
||||
```
|
||||
|
||||
Alternatively, the source can be downloaded as a [.zip archive](https://github.com/inventree/InvenTree/archive/master.zip).
|
||||
!!! 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
|
||||
|
||||
Once the source is downloaded, cd into the source directory:
|
||||
### Install InvenTree Packages
|
||||
|
||||
The Python packages required by the InvenTree server must be installed into the virtual environment.
|
||||
|
||||
```
|
||||
cd /path/to/inventree/
|
||||
```
|
||||
|
||||
*(substitute /path/to/inventree/ with the directory where you have downloaded the source code)*.
|
||||
|
||||
## Installation
|
||||
|
||||
Now that the source code is downloaded (and optionally you have configured a Python virtual environment), the Python packages required to run InvenTree can be installed. InvenTree is a Python/Django application and relies on the pip package manager. All packages required to develop and test InvenTree are installed via pip. Package requirements can be found in ``requirements.txt``.
|
||||
|
||||
|
||||
To setup the InvenTree environment, run the following commands (from the InvenTree source directory):
|
||||
|
||||
```
|
||||
inv install
|
||||
pip install -U -r src/requirements.txt
|
||||
```
|
||||
|
||||
This installs all required Python packages using pip package manager. It also creates a (default) database configuration file which needs to be edited to meet user needs before proceeding (see next step below).
|
||||
|
||||
Additionally, this step creates a *SECRET_KEY* file which is used for the django authentication framework.
|
||||
## Create Database
|
||||
|
||||
!!! warning "Keep it secret, keep it safe"
|
||||
The SECRET_KEY file should never be shared or made public.
|
||||
As part of the initial setup, an empty database needs to be created. Follow the instructions below particular to your database engine of choice:
|
||||
|
||||
### Database Configuration
|
||||
### SQLite
|
||||
|
||||
Once the required packages are installed, the database configuration must be adjusted to suit your particular needs. InvenTree provides a simple default setup which should work *out of the box* for testing and debug purposes.
|
||||
SQLite uses a simple portable database file which is easy to use for debug and testing purposes.
|
||||
|
||||
As part of the previous *install* step, a configuration file (**config.yaml**) is created. The configuration file provides administrators control over various setup options without digging into the Django *settings.py* script. The default setup uses a local sqlite database with *DEBUG* mode enabled.
|
||||
Install required packages as follows:
|
||||
|
||||
For further information on installation configuration, refer to the [Configuration](../config) section.
|
||||
!!! info "Sudo Actions"
|
||||
Perform sudo actions from a separate shell, as 'inventree' user does not have sudo access
|
||||
|
||||
```
|
||||
sudo apt-get install sqlite3
|
||||
```
|
||||
|
||||
A `.sqlite3` database file will be automatically created, at the location specified in the configuration options. No further steps necessary.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
#### Install PostgreSQL
|
||||
|
||||
Install required system packages:
|
||||
|
||||
!!! info "Sudo Actions"
|
||||
Perform sudo actions from a separate shell, as 'inventree' user does not have sudo access
|
||||
|
||||
```
|
||||
sudo apt-get install postgresql postgresql-contrib libpq-dev
|
||||
```
|
||||
|
||||
And start the postgresql service:
|
||||
|
||||
```
|
||||
sudo service postgresql start
|
||||
```
|
||||
|
||||
#### Create Database and User
|
||||
|
||||
We need to create new database, and a postgres user to allow database access.
|
||||
|
||||
```
|
||||
sudo -u postgres psql
|
||||
```
|
||||
|
||||
You should now be in an interactive database shell:
|
||||
|
||||
```
|
||||
create database inventree;
|
||||
create user myuser with encrypted password 'mypass';
|
||||
grant all privileges on database inventree to myuser;
|
||||
```
|
||||
|
||||
!!! info "Username / Password"
|
||||
You should change the username and password from the values specified above. This username and password will also be for the InvenTree database connection configuration.
|
||||
|
||||
#### Install Python Bindings
|
||||
|
||||
The PostgreSQL python binding must also be installed (into your virtual environment):
|
||||
|
||||
```
|
||||
pip3 install psycopg2 pgcli
|
||||
```
|
||||
|
||||
### MySQL / MariaDB
|
||||
|
||||
#### Install Backend
|
||||
|
||||
To run InvenTree with the MySQL or MariaDB backends, a number of extra packages need to be installed:
|
||||
|
||||
!!! info "Sudo Actions"
|
||||
Perform sudo actions from a separate shell, as 'inventree' user does not have sudo access
|
||||
|
||||
```
|
||||
sudo apt-get install mysql-server libmysqlclient-dev
|
||||
```
|
||||
|
||||
#### Install Python Bindings
|
||||
|
||||
Install the python bindings for MySQL (into the python virtual environment).
|
||||
|
||||
```
|
||||
pip3 install mysqlclient mariadb
|
||||
```
|
||||
|
||||
#### Create Database
|
||||
|
||||
Assuming the MySQL server is installed and running, login to the MySQL server as follows:
|
||||
|
||||
```
|
||||
sudo mysql -u root
|
||||
```
|
||||
|
||||
Create a new database as follows:
|
||||
|
||||
```
|
||||
mysql> CREATE DATABASE inventree;
|
||||
```
|
||||
|
||||
Create a new user with complete access to the database:
|
||||
|
||||
```
|
||||
mysql> CREATE USER 'myuser'@'%' IDENTIFIED WITH mysql_native_password BY 'mypass';
|
||||
mysql> GRANT ALL ON blog_data.* TO 'djangouser'@'%';
|
||||
mysql> FLUSH PRIVILEGES;
|
||||
```
|
||||
|
||||
Exit the mysql shell:
|
||||
|
||||
```
|
||||
mysql> EXIT;
|
||||
```
|
||||
|
||||
!!! info "Username / Password"
|
||||
You should change the username and password from the values specified above. This username and password will also be for the InvenTree database connection configuration.
|
||||
|
||||
## Configure InvenTree Options
|
||||
|
||||
Once the required software packages are installed and the database has been created, the InvenTree server options must be configured.
|
||||
|
||||
InvenTree configuration can be performed using environment variables, or the `config.yaml` file (or a combination of both).
|
||||
|
||||
Edit the configuration file at `/home/inventree/src/InvenTree/config.yaml`.
|
||||
|
||||
!!! info "Config Guidelines"
|
||||
Refer to the [configuration guidelines](../config) for full details.
|
||||
|
||||
!!! warning "Configure Database"
|
||||
Ensure database settings are correctly configured in `config.yaml` before proceeding to the next step!
|
||||
Ensure database settings are correctly configured before proceeding to the next step! In particular, check that the database connection settings match the database you have created in the previous step.
|
||||
|
||||
### Initialize Database
|
||||
## Initialize Database
|
||||
|
||||
Once install settings are correctly configured (in *config.yaml*) run the initial setup script:
|
||||
The database has been configured above, but is currently empty.
|
||||
|
||||
### Schema Migrations
|
||||
|
||||
Run the following command to initialize the database with the required tables.
|
||||
|
||||
```
|
||||
inv migrate
|
||||
cd /home/inventree/src
|
||||
invoke update
|
||||
```
|
||||
|
||||
This performs the initial database migrations, creating the required tables, etc.
|
||||
|
||||
The database should now be installed!
|
||||
|
||||
### Create Admin Account
|
||||
|
||||
Create an initial superuser (administrator) account for the InvenTree instance:
|
||||
Create a superuser (admin) account for the InvenTree installation:
|
||||
|
||||
```
|
||||
inv superuser
|
||||
invoke superuser
|
||||
```
|
||||
|
||||
!!! warning "Solving Cairo Errors"
|
||||
In the case the above command returns errors with the `Cairo` package, it implies that dependencies for the `weasyprint` package are not installed on the system. To solve them, run through the [weasyprint installation steps](https://weasyprint.readthedocs.io/en/stable/install.html) then re-run `inv install` and `inv superuser`.
|
||||
!!! success "Ready to Serve"
|
||||
The InvenTree database is now fully configured, and ready to go.
|
||||
|
||||
### Run Development Server
|
||||
## Start Server
|
||||
|
||||
### Development Server
|
||||
|
||||
The InvenTree database is now setup and ready to run. A simple development server can be launched from the command line.
|
||||
|
||||
To launch the development server, run the following commands:
|
||||
The InvenTree development server is useful for testing and configuration - and it may be wholly sufficient for a small-scale installation.
|
||||
|
||||
```
|
||||
inv server
|
||||
```
|
||||
Refer to the [development server instructions](../development) for further information.
|
||||
|
||||
For more server options, run:
|
||||
### Production Server
|
||||
|
||||
```
|
||||
inv server -h
|
||||
```
|
||||
In a production environment, a more robust server setup is required.
|
||||
|
||||
This will launch the InvenTree web interface at `http://127.0.0.1:8000`. For other options refer to the [django docs](https://docs.djangoproject.com/en/2.2/ref/django-admin/)
|
||||
|
||||
### Run Production Server
|
||||
|
||||
For a production install, refer to [deployment instructions](../deploy).
|
||||
Refer to the [production server instructions](../production) for further information.
|
||||
|
130
docs/start/intro.md
Normal file
@ -0,0 +1,130 @@
|
||||
---
|
||||
title: Setup Introduction
|
||||
---
|
||||
|
||||
## Introduction
|
||||
|
||||
InvenTree can be self-hosted with minimal system requirements. Multiple database back-ends are supported, allowing for flexibility where required.
|
||||
|
||||
The InvenTree server ecosystem consists of the following components:
|
||||
|
||||
### Database
|
||||
|
||||
A persistent database is required to store stock information. The database backend must be installed and configured separately to the InvenTree application.
|
||||
|
||||
InvenTree can be used with any of the following database backends:
|
||||
|
||||
* SQLite
|
||||
* PostgreSQL
|
||||
* MariaDB
|
||||
* MySQL
|
||||
|
||||
Database selection should be determined by your particular installation requirements.
|
||||
|
||||
### Media Files
|
||||
|
||||
Uploaded media files (images, attachments, reports, etc) are stored to a persistent storage volume.
|
||||
|
||||
### Web Server
|
||||
|
||||
The bulk of the InvenTree code base supports the custom web server application. The web server application services user requests and facilitates database access.
|
||||
|
||||
The webserver code also provides a first-party API for performing database query actions.
|
||||
|
||||
Once a database is setup, you need a way of accessing the data. InvenTree provides a "server" application out of the box, but this may not scale particularly well with multiple users. Instead, InvenTree can be served using a webserver such as [Gunicorn](https://gunicorn.org/). For more information see the [deployment documentation](../deploy).
|
||||
|
||||
### Background Tasks
|
||||
|
||||
A separate application handles management of [background tasks](../../admin/tasks), separate to user-facing web requests.
|
||||
|
||||
## OS Requirements
|
||||
|
||||
The InvenTree documentation assumes that the operating system is a debian based Linux OS. Some installation steps may differ for different systems.
|
||||
|
||||
!!! warning "Installing on Windows"
|
||||
Installation on Windows is *not guaranteed* to work (at all). To install on a Windows system, it is highly recommended that you [install WSL](https://docs.microsoft.com/en-us/windows/wsl/install-win10#manual-installation-steps), and then follow installation procedure from within the WSL environment.
|
||||
|
||||
## Python Requirements
|
||||
|
||||
InvenTree runs on [Python](https://python.org).
|
||||
|
||||
!!! warning "Python Version"
|
||||
InvenTree requrires Python 3.7 (or newer). If your system has an older version of Python installed, you will need to follow the update instructions for your OS.
|
||||
|
||||
### Invoke
|
||||
|
||||
InvenTree makes use of the [invoke](https://www.pyinvoke.org/) python toolkit for performing various administrative actions.
|
||||
|
||||
!!! warning "Invoke Version"
|
||||
InvenTree requires invoke version 1.4.0 or newer. Some platforms may be shipped with older versions of invoke!
|
||||
|
||||
To display a list of the available InvenTree administration actions, run the following commands from the top level source directory:
|
||||
|
||||
```
|
||||
inv --list
|
||||
```
|
||||
|
||||
### Virtual Environment
|
||||
|
||||
Installing the required Python packages inside a virtual environment allows a local install separate to the system-wide Python installation. While not strictly necessary, using a virtual environment is **highly recommended** as it prevents conflicts between the different Python installations.
|
||||
|
||||
You can read more about Python virtual environments [here](https://docs.python.org/3/tutorial/venv.html).
|
||||
|
||||
!!! info "Virtual Environment"
|
||||
The installation intstruction assume that a virtual environment is configured
|
||||
|
||||
`cd` into the InvenTree directory, and create a virtual environment with the following command:
|
||||
|
||||
```
|
||||
python3 -m venv env
|
||||
```
|
||||
|
||||
### Activating a Virtual Environment
|
||||
|
||||
The virtual environment needs to be activated to ensure the correct python binaries and libraries are used. The InvenTree instructions assume that the virtual environment is always correctly activated.
|
||||
|
||||
To configure Inventree inside a virtual environment, ``cd`` into the inventree base directory and run the following command:
|
||||
|
||||
```
|
||||
source env/bin/activate
|
||||
```
|
||||
|
||||
!!! info "Activate Virtual Environment"
|
||||
if
|
||||
```
|
||||
source env/bin/activate
|
||||
```
|
||||
is not working try
|
||||
```
|
||||
. env/bin/activate
|
||||
```
|
||||
|
||||
This will place the current shell session inside a virtual environment - the terminal should display the ``(env)`` prefix.
|
||||
|
||||
|
||||
## Downloading Source Code
|
||||
|
||||
InvenTree source code is distributed on [GitHub](https://github.com/inventree/inventree/), and the latest version can be downloaded (using Git) with the following command:
|
||||
|
||||
```
|
||||
git clone https://github.com/inventree/inventree/
|
||||
```
|
||||
|
||||
Alternatively, the source can be downloaded as a [.zip archive](https://github.com/inventree/InvenTree/archive/master.zip).
|
||||
|
||||
!!! info "Updating via Git"
|
||||
Downloading the source code using Git is recommended, as it allows for simple updates when a new version of InvenTree is released.
|
||||
|
||||
## Installation Guides
|
||||
|
||||
There are multiple ways to get an InvenTree server up and running, of various complexity (and robustness)!
|
||||
|
||||
### Docker
|
||||
|
||||
The recommended method of installing InvenTree is to use [docker](https://www.docker.com). InvenTree provides out-of-the-box support for docker and docker-compose, which provides a simple, reliable and repeatable pipeline for integration into your production environment.
|
||||
|
||||
Refer to the [docker setup instructions](../docker) for further information.
|
||||
|
||||
### Bare Metal
|
||||
|
||||
If you do not wish to use the docker container, you will need to manually install the required packages and follow through the installation guide. Refer to the [InvenTree installation instructions](../install) for more details.
|
94
docs/start/production.md
Normal file
@ -0,0 +1,94 @@
|
||||
---
|
||||
title: Production Server
|
||||
---
|
||||
|
||||
## Production Server
|
||||
|
||||
!!! warning "Installation"
|
||||
Before continuing, ensure that the [installation steps](../install) have been completed.
|
||||
|
||||
The following instructions provide a reasonably performant server, using [gunicorn](https://gunicorn.org/) as a webserver, and [supervisor](http://supervisord.org/) as a process manager.
|
||||
|
||||
For alternative deployment methods, django apps provide multiple deployment methods - see the [Django documentation](https://docs.djangoproject.com/en/2.2/howto/deployment/).
|
||||
|
||||
There are also numerous online tutorials describing how to deploy a Django application either locally or on an online platform.
|
||||
|
||||
### Gunicorn
|
||||
|
||||
The InvenTree web server is hosted using [Gunicorn](https://gunicorn.org/). Gunicorn is a Python WSGI server which provides a multi-worker server which is well suited to handling multiple simultaneous requests. Gunicorn is a solid choice for a production server which is easy to configure and performs well in a multi-user environment.
|
||||
|
||||
### Supervisor
|
||||
|
||||
[Supervisor](http://supervisord.org/) is a process control system which monitors and controls multiple background processes. It is used in the InvenTree production setup to ensure that the server and background worker processes are always running.
|
||||
|
||||
## Gunicorn
|
||||
|
||||
Gunicorn should have already been installed (within the python virtual environment) as part of the installation procedure.
|
||||
|
||||
A simple gunicorn configuration file is also provided. This configuration file can be edited if different server settings are required
|
||||
|
||||
### Test Gunicorn Server
|
||||
|
||||
First, let's confirm that the gunicorn server is operational.
|
||||
|
||||
!!! info "Virtual Environment"
|
||||
Don't forget to activate the python virtual environment
|
||||
|
||||
```
|
||||
cd /home/InvenTree
|
||||
source ./env/bin/activate
|
||||
|
||||
cd src/InvenTree
|
||||
/home/inventree/env/bin/gunicorn -c gunicorn.conf.py InvenTree.wsgi -b 127.0.0.1:8000
|
||||
```
|
||||
|
||||
This should start the gunicorn server as a foreground process.
|
||||
|
||||
Check that you can access the InvenTree web server [in your browser](http://127.0.0.1:8000):
|
||||
|
||||
### Stop Gunicorn Server
|
||||
|
||||
Once the gunicorn server is operational, kill the server with <kbd>Ctrl</kbd>+<kbd>c</kbd>
|
||||
|
||||
## Supervisor
|
||||
|
||||
We will use [supervisor](http://supervisord.org/) as a process monitor, to ensure the web server and background worker processes are automatically started, and restarted if something goes wrong.
|
||||
|
||||
### Install Supervisor
|
||||
|
||||
!!! info "Sudo Actions"
|
||||
Perform sudo actions from a separate shell, as 'inventree' user does not have sudo access
|
||||
|
||||
```
|
||||
sudo apt-get install supervisor
|
||||
```
|
||||
|
||||
### Configure Supervisor
|
||||
|
||||
!!! warning "Configuration Override"
|
||||
If you already have supervisor installed on your system, you will not want to override your existing configuration file.
|
||||
In this case, edit the existing configuration file at `/etc/supervisord.conf` to integrate the InvenTree processes
|
||||
|
||||
Copy the supervisor configuration file:
|
||||
|
||||
```
|
||||
sudo cp /home/inventree/src/deploy/supervisord.conf /etc/supervisord.conf
|
||||
```
|
||||
|
||||
### Start Supervisor Daemon
|
||||
|
||||
```
|
||||
sudo supervisord
|
||||
```
|
||||
|
||||
### Check Server
|
||||
|
||||
Check that the InvenTree [web server is running](http://localhost:8000).
|
||||
|
||||
### View Process Status
|
||||
|
||||
The process status can be viewed [in your web browser](http://localhost:9001).
|
||||
|
||||
## Production Ready
|
||||
|
||||
The InvenTree server (and background task manager) should now be running!
|
@ -13,6 +13,9 @@ Administrators wishing to update InvenTree to the latest version should follow t
|
||||
|
||||
Ensure the InvenTree server is stopped. This will depend on the particulars of your database installation.
|
||||
|
||||
!!! info "Stop Server"
|
||||
The method by which the InvenTree server is stopped depends on your particular installation!
|
||||
|
||||
### Update Source Code
|
||||
|
||||
Update the InvenTree source code to the latest version (or a particular commit if required).
|
||||
|
@ -46,7 +46,7 @@ Setting the owner of stock location will automatically:
|
||||
* Set the owner of all children locations to the same owner.
|
||||
* Set the owner of all stock items at this location to the same owner.
|
||||
|
||||
!!! note
|
||||
!!! info
|
||||
If the owner of a children location or a stock item is a subset of the specified owner (eg. a user linked to the specified group), the owner won't be updated.
|
||||
|
||||
### Set Stock Item Owner
|
||||
|
@ -67,4 +67,16 @@ p {
|
||||
/* Remove top margin for first h2 header */
|
||||
.md-typeset h2:first-of-type {
|
||||
margin-top: 0em;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #C55;
|
||||
}
|
||||
|
||||
.green {
|
||||
color: #5C5;
|
||||
}
|
||||
|
||||
.blue {
|
||||
color: #55C;
|
||||
}
|
25
mkdocs.yml
@ -38,12 +38,17 @@ extra_javascript:
|
||||
nav:
|
||||
- InvenTree:
|
||||
- About InvenTree: index.md
|
||||
- Features: features.md
|
||||
- What's New: releases/new.md
|
||||
- FAQ: faq.md
|
||||
- Contribute: contribute.md
|
||||
- Getting Started:
|
||||
- Installation: start/install.md
|
||||
- Installation:
|
||||
- Introduction: start/intro.md
|
||||
- Configuration: start/config.md
|
||||
- Deploying: start/deploy.md
|
||||
- Docker Installation: start/docker.md
|
||||
- Manual Installation: start/install.md
|
||||
- Development Server: start/development.md
|
||||
- Production Server: start/production.md
|
||||
- Updating: start/update.md
|
||||
- Migrating: start/migrate.md
|
||||
- Parts:
|
||||
@ -71,11 +76,13 @@ nav:
|
||||
- Sales Orders: companies/so.md
|
||||
- Report:
|
||||
- Templates: report/report.md
|
||||
- Labels: report/labels.md
|
||||
- Reports:
|
||||
- Test Reports: report/test.md
|
||||
- Packing List: report/pack.md
|
||||
- Build Order: report/build.md
|
||||
- Order: report/order.md
|
||||
- Labels: report/labels.md
|
||||
- Barcodes: report/barcodes.md
|
||||
- Admin:
|
||||
- Admin Interface: admin/admin.md
|
||||
- User Permissions: admin/permissions.md
|
||||
@ -83,16 +90,22 @@ nav:
|
||||
- Import Data: admin/import.md
|
||||
- Python Shell: admin/shell.md
|
||||
- Error Logs: admin/logs.md
|
||||
- Background Tasks: admin/tasks.md
|
||||
- Extend:
|
||||
- API: extend/api.md
|
||||
- Python Interface: extend/python.md
|
||||
- Plugins: extend/plugins.md
|
||||
- Themes: extend/themes.md
|
||||
- Third-Party: extend/integrate.md
|
||||
- Future Features: extend/future.md
|
||||
- App:
|
||||
- App: app/app.md
|
||||
- InvenTree App: app/app.md
|
||||
- Barcodes: app/barcode.md
|
||||
- Parts: app/part.md
|
||||
- Stock: app/stock.md
|
||||
- Settings: app/settings.md
|
||||
- Privacy: app/privacy.md
|
||||
- Translation: app/translation.md
|
||||
- Suggestions: app/issues.md
|
||||
|
||||
# Plugins
|
||||
plugins:
|
||||
|