2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-28 05:36:46 +00:00

Merge remote-tracking branch 'inventree/master'

This commit is contained in:
Oliver Walters 2020-11-15 17:02:52 +11:00
commit 4214fd50d3
13 changed files with 368 additions and 39 deletions

View File

@ -1,29 +1,73 @@
# Database backend selection - Configure backend database settings # Database backend selection - Configure backend database settings
# Ref: https://docs.djangoproject.com/en/2.2/ref/settings/#std:setting-DATABASES # Ref: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-DATABASES
# Specify database parameters below as they appear in the Django docs # Specify database parameters below as they appear in the Django docs
# Note: Database configuration options can also be specified from environmental variables,
# with the prefix INVENTREE_DB_
# e.g INVENTREE_DB_NAME / INVENTREE_DB_USER / INVENTREE_DB_PASSWORD
database: database:
# Example configuration - sqlite (default) # Default configuration - sqlite filesystem database
ENGINE: django.db.backends.sqlite3 ENGINE: sqlite3
NAME: '../inventree_default_db.sqlite3' NAME: '../inventree_default_db.sqlite3'
# For more complex database installations, further parameters are required # For more complex database installations, further parameters are required
# Refer to the django documentation for full list of options # Refer to the django documentation for full list of options
# Example Configuration - MySQL # --- Available options: ---
# ENGINE: Database engine. Selection from:
# - sqlite3
# - mysql
# - postgresql
# NAME: Database name
# USER: Database username (if required)
# PASSWORD: Database password (if required)
# HOST: Database host address (if required)
# PORT: Database host port (if required)
# --- Example Configuration - sqlite3 ---
# ENGINE: sqlite3
# NAME: '/path/to/database.sqlite3'
# --- Example Configuration - MySQL ---
#ENGINE: django.db.backends.mysql #ENGINE: django.db.backends.mysql
#NAME: inventree #NAME: inventree
#USER: inventree_username #USER: inventree_username
#PASSWORD: inventree_password #PASSWORD: inventree_password
#HOST: '' #HOST: '127.0.0.1'
#PORT: '' #PORT: '5432'
# Select default system language (default is 'en-us') # Select default system language (default is 'en-us')
language: en-us 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
timezone: UTC
# List of currencies supported by default.
# Add other currencies here to allow use in InvenTree
currencies:
- AUD
- CAD
- EUR
- GBP
- JPY
- NZD
- USD
# Set debug to False to run in production mode # Set debug to False to run in production mode
debug: True debug: True
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
# Note: This will only be displayed if DEBUG mode is enabled,
# and only if InvenTree is accessed from a local IP (127.0.0.1)
debug_toolbar: False
# Configure the system logging level
# Options: DEBUG / INFO / WARNING / ERROR / CRITICAL
log_level: WARNING
# Allowed hosts (see ALLOWED_HOSTS in Django settings documentation) # Allowed hosts (see ALLOWED_HOSTS in Django settings documentation)
# A list of strings representing the host/domain names that this Django site can serve. # A list of strings representing the host/domain names that this Django site can serve.
# Default behaviour is to allow all hosts (THIS IS NOT SECURE!) # Default behaviour is to allow all hosts (THIS IS NOT SECURE!)
@ -58,11 +102,6 @@ static_root: '../inventree_static'
# - git # - git
# - ssh # - ssh
# Set debug_toolbar to True to enable a debugging toolbar for InvenTree
# Note: This will only be displayed if DEBUG mode is enabled,
# and only if InvenTree is accessed from a local IP (127.0.0.1)
debug_toolbar: False
# Backup options # Backup options
# Set the backup_dir parameter to store backup files in a specific location # Set the backup_dir parameter to store backup files in a specific location
# If unspecified, the local user's temp directory will be used # If unspecified, the local user's temp directory will be used

View File

@ -4,27 +4,33 @@
{% set assets = '/assets' %} {% set assets = '/assets' %}
{% endif %} {% endif %}
{% if 'http' in url %}
{% set doc_url = url %}
{% else %}
{% set doc_url = '{{ assets }}/images/{{ url }}' %}
{% endif %}
<figure class='image'> <figure class='image'>
{% if id %} {% if id %}
<!-- The link that, when clicked, will display the image in full screen --> <!-- The link that, when clicked, will display the image in full screen -->
<a href="#{{ id }}"> <a href="#{{ id }}">
{% elif url %} {% elif doc_url %}
<a href="{{ assets }}/images/{{ url }}"> <a href="{{ doc_url }}">
{% endif %} {% endif %}
<img class='img-inline' src='{{ assets }}/images/{{ url }}' alt='{{ description }}' title='{{ description }}' <img class='img-inline' src='{{ doc_url }}' alt='{{ description }}' title='{{ description }}'
{% if maxwidth or maxheight %}style=' {% if maxwidth or maxheight %}style='
{% if maxwidth %} max-width:{{ maxwidth }};{% endif %} {% if maxwidth %} max-width:{{ maxwidth }};{% endif %}
{% if maxheight %} max-height: {{ maxheight }};{% endif %} {% if maxheight %} max-height: {{ maxheight }};{% endif %}
'{% endif %} '{% endif %}
> >
{% if id or url %} {% if id or doc_url %}
</a> </a>
{% endif %} {% endif %}
{% if id %} {% if id %}
<!-- The full screen image, hidden by default --> <!-- The full screen image, hidden by default -->
<a href="#_" class="overlay" id="{{ id }}"> <a href="#_" class="overlay" id="{{ id }}">
<img src="{{ assets }}/images/{{ url }}" alt="{{ description }}" /> <img src="{{ doc_url }}" alt="{{ description }}" />
</a> </a>
{% endif %} {% endif %}
</figure> </figure>

View File

@ -32,7 +32,7 @@ InvenTree functionality is split into a number of distinct roles. A group will h
- **Purchase** - The *purchase* role is related to accessing Purchase Order data - **Purchase** - The *purchase* role is related to accessing Purchase Order data
- **Sales** - The *sales* role is related to accessing Sales Order data - **Sales** - The *sales* role is related to accessing Sales Order data
{% with id="roles", url="admin/roles.png", description="Roles" %} {% with id="Roles Admin View", url="admin/roles.png", description="Roles" %}
{% include 'img.html' %} {% include 'img.html' %}
{% endwith %} {% endwith %}

View File

@ -1,15 +0,0 @@
---
title: Suppliers
---
## Suppliers
A supplier is an external vendor of parts and raw materials.
!!! missing "TODO"
This section requires further work
## Supplier Parts
!!! missing "TODO"
This section requires further work

View File

@ -0,0 +1,28 @@
---
title: Customers
---
## Customers
A customer is an external client to whom parts are sold.
To access the customer page, click on the "Sell" navigation tab and click on "Customers" option in the dropdown list.
!!! warning
**Viewing**, **adding**, **editing** and **deleting** customers require the corresponding [Sales Orders user permissions](../../admin/permissions)
### Add Customer
Once the customer page is loaded, click on the "<span class='fas fa-plus-circle'></span> New Customer" button: the "Create new Customer" form opens. Fill-in the manufacturer informations (`Company name` and `Company description` are required) then click on the "Submit" button.
### Edit Customer
To edit a customer, click on its name in the list of customers.
After the customer details are loaded, click on the <span class='fas fa-edit'></span> icon under the customer name. Edit the customer information then click on the "Submit" button.
### Delete Customer
To delete a customer, click on its name in the list of customers.
After the customer details are loaded, click on the <span class='fas fa-trash-alt'></span> icon under the customer name. Confirm the deletion using the checkbox then click on the "Submit" button.

View File

@ -0,0 +1,53 @@
---
title: Manufacturers
---
## Manufacturers
A manufacturer is an external **producer** of parts and raw materials.
To access the manufacturer page, click on the "Buy" navigation tab and click on "Manufacturers" option in the dropdown list.
!!! warning
**Viewing**, **adding**, **editing** and **deleting** manufacturers require the corresponding [Purchase Orders user permissions](../../admin/permissions)
### Add Manufacturer
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"
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
To edit a manufacturer, click on its name in the list of manufacturers.
After the manufacturer details are loaded, click on the <span class='fas fa-edit'></span> icon under the manufacturer name. Edit the manufacturer information then click on the "Submit" button.
### Delete Manufacturer
!!! warning
All manufacturer parts for this manufacturer will also be deleted!
To delete a manufacturer, click on its name in the list of manufacturers.
After the manufacturer details are loaded, click on the <span class='fas fa-trash-alt'></span> icon under the manufacturer name. Review the list of manufacturer parts to be deleted in consequence of deleting this manufacturer. Confirm the deletion using the checkbox then click on the "Submit" button.
## Manufacturer Parts
Manufacturer parts are connected to the manufacturer they belong to. Most importantly, they are **linked** to a supplier part. In other words, manufacturer parts do **not** exist without a corresponding supplier part and they are the actual "items" sold by a supplier.
!!! warning
**Viewing**, **adding**, **editing** and **deleting** manufacturer parts require the corresponding [Purchase Orders user permissions](../../admin/permissions)
### Add Manufacturer Part
Adding a manufacturer part is the same process as [adding a supplier part](../supplier#add-supplier-part).
### Edit Manufacturer Part
Editing a manufacturer part is the same process as [editing a supplier part](../supplier#edit-supplier-part).
### Delete Manufacturer Part
Deleting a manufacturer part is the same process as [deleting a supplier part](../supplier#delete-supplier-part).

View File

@ -4,6 +4,8 @@ title: Purchase Order
## Purchase Orders ## Purchase Orders
To access the purchase order page, click on the "Buy" navigation tab and click on "Purchase Orders" option in the dropdown list.
!!! missing "TODO" !!! missing "TODO"
This section requires further work This section requires further work

15
docs/companies/so.md Normal file
View File

@ -0,0 +1,15 @@
---
title: Sales Order
---
## Sales Orders
To access the sales order page, click on the "Sell" navigation tab and click on "Sales Orders" option in the dropdown list.
!!! missing "TODO"
This section requires further work
## Line Items
!!! missing "TODO"
This section requires further work

View File

@ -0,0 +1,64 @@
---
title: Suppliers
---
## Suppliers
A supplier is an external **vendor** of parts and raw materials.
To access the supplier page, click on the "Buy" navigation tab and click on "Suppliers" option in the dropdown list.
!!! warning
**Viewing**, **adding**, **editing** and **deleting** suppliers require the corresponding [Purchase Orders user permissions](../../admin/permissions)
### Add Supplier
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"
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
To edit a supplier, click on its name in the list of suppliers.
After the supplier details are loaded, click on the <span class='fas fa-edit'></span> icon under the supplier name. Edit the supplier information then click on the "Submit" button.
### Delete Supplier
!!! warning
All supplier parts for this supplier will also be deleted!
To delete a supplier, click on its name in the list of suppliers.
After the supplier details are loaded, click on the <span class='fas fa-trash-alt'></span> icon under the supplier name. Review the list of supplier parts to be deleted in consequence of deleting this supplier. Confirm the deletion using the checkbox then click on the "Submit" button.
## Supplier Parts
Supplier parts are linked to a supplier and defined as purchasable items.
!!! warning
**Viewing**, **adding**, **editing** and **deleting** supplier parts require the corresponding [Purchase Orders user permissions](../../admin/permissions)
### Add Supplier Part
To create a supplier part, you have the following options:
* either navigate to a Part detail page then click on the "Suppliers" tab
* or navigate to a Supplier detail page then click on the "Parts" tab.
Whichever you pick, click on the "<span class='fas fa-plus-circle'></span> New Supplier Part" button to load the "Create new Supplier Part" form. Fill out the form with the supplier part information then click on the "Submit" button.
### Edit Supplier Part
To edit a supplier part, first access the supplier part detail page with one of the following options:
* either navigate to a Part detail page, click on the "Suppliers" tab then click on the corresponding "Supplier Part" row value
* or navigate to a Supplier detail page, click on the "Parts" tab then click on the corresponding "Supplier Part" row value.
After the supplier part details are loaded, click on the <span class='fas fa-edit'></span> icon next to the supplier part image. Edit the supplier part information then click on the "Submit" button.
### Delete Supplier Part
To delete a supplier part, first access the supplier part detail page like in the [Edit Supplier Part](#edit-supplier-part) section.
After the supplier part details are loaded, click on the <span class='fas fa-trash-alt'></span> icon next to the supplier part image. Review the the information for the supplier part to be deleted, confirm the deletion using the checkbox then click on the "Submit" button.

112
docs/new.md Normal file
View File

@ -0,0 +1,112 @@
---
title: What's New
---
## What's New
### Release 0.1.4
[Release 0.1.4](https://github.com/inventree/InvenTree/releases/tag/0.1.4) (November 2020) provides a number of major new features and improvements, as well as some crucial bug fixes:
#### Build Management System
The build management system has received a major upgrade, bringing the following improvements:
##### Partial Build Completion
Previously, build orders had to be completed *atomically* (i.e. if the build order was to create 20x units, then all 20x units had to be created at once).
The new build system allows the user to specify build *outputs* (of varying quantities) against a given build order. The build order cannot be completed until all build outputs are fulfilled.
A *Build Output* is simply a StockItem object which is marked as *in production*. This stock item can be assigned a (unique) serial number which is useful for pre-allocation purposes. It also allows stock to be filtered by production status and determine how many units are being built.
##### Stock Item Tracking
Parts which are marked as *trackable* are now treated differently for the purpose of a build order. Stock items must be assigned against each build output (as was the case previously). When a build output is marked as complete, any *trackable* stock items which are assigned to that build output are installed *into* the build output (which is simply a StockItem). In this manner, if a *trackable* stock item is used to build another stock item, it remains tracked via the stock item it is installed into.
Stock items which are not *trackable* are simply removed from stock when the build output is completed.
##### Stock Allocation Improvements
A number of UX improvements have been made to simplify the process of allocating stock items against a build output (and thus a build order).
#### Related Parts
Related Part denotes a relationship between two parts, when users want to show their usage is "related" to another part or simply emphasize a link between two parts.
##### Implementation
- New PartRelated model/table to store relationships between parts (requires migration)
- New Related tab shown in Part detail page
- Ability to add relationships between parts through both main and admin interfaces
- Can only manage relationship if user has "change" permission on Part ruleset
##### Example View
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/96306587-8f2d0b80-0fc5-11eb-8fdb-20cb2dabfcc6.png", description="Related Parts Example View" %}
{% include 'img.html' %}
{% endwith %}
#### InvenTree "Global" Settings
Global settings control the default value of fields across the entire web interface, for all-users.
!!! TODO
More information to come soon
Also, dedicated settings sections were added for:
- Category
- Build
- Purchase Order
- Sales Order
For Category section, read [Category Parameter Templates](#category-parameter-templates)
Other section allows to set the prefix of build, puchase and sales orders.
#### Category Parameter Templates
Added support for configuring parameter templates defined by categories.
##### Features
* User can now setup a list of parameter templates for each (or all) part category(ies) in InvenTree settings
* During part creation, part parameters are automatically created using the list of parameter templates from the parent category it belongs to (if option is enabled)
##### Screenshots
* Select category
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/98037571-c2ef9a00-1de9-11eb-96a1-542b18cdda7e.png", description="Select Category" %}
{% include 'img.html' %}
{% endwith %}
* Add parameter template
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/98145792-1cfb6880-1e99-11eb-82eb-c96d1ba9541a.png", description="Add Parameter Template" %}
{% include 'img.html' %}
{% endwith %}
* Control global behavior within part settings
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/98130420-39db7000-1e88-11eb-9ca0-78370e19ccdd.png", description="Global Settings For Category Templates" %}
{% include 'img.html' %}
{% endwith %}
* Control instance behavior during part creation
{% with id="related_parts_example", url="https://user-images.githubusercontent.com/4020546/98130496-4f509a00-1e88-11eb-9239-4dc215cbc620.png", description="Instance Settings For Category Templates" %}
{% include 'img.html' %}
{% endwith %}
#### Currency Support
A more comprehensive implementation of Currency support has been implemented.
Using the [django-money](https://github.com/django-money/django-money) library enables native support for all currency types, and the (future) possibility of offering real-time currency conversion.
This update is "simply" an architectural change which will allow more comprehensive currency management in a future release.
As part of the new currency library implementation, InvenTree can now track purchase price of stock items (in whichever currency the user chooses).

View File

@ -32,6 +32,9 @@ To enable access to the InvenTree server from other computers on a local network
invoke server -a 192.168.120.1:8000 invoke 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 ## 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. 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.
@ -44,6 +47,9 @@ Gunicorn can be installed using PIP:
pip3 install gunicorn 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 ### 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. 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.

View File

@ -6,16 +6,26 @@ title: Migrating Data
In the case that data needs to be migrated from one database installation to another, the following procedure can be used to export data, initialize the new database, and re-import the data. In the case that data needs to be migrated from one database installation to another, the following procedure can be used to export data, initialize the new database, and re-import the data.
For example, if you wish to migrate from an SQLite database backend to a MySQL database backend, you will need to export the data into a standardized format, and then read it back in to the new database.
!!! warning "Backup Database" !!! warning "Backup Database"
Ensure that the original database is securely backed up first! Ensure that the original database is securely backed up first!
!!! info "Up to Date"
Ensure that the original database is up to date, by running `invoke migrate`
### Export Data ### Export Data
Export the database contents to a JSON file using the following command:
``` ```
python3 InvenTree/manage.py dumpdata --exclude contenttypes --exclude auth.permission --indent 2 > data.json invoke export-records -f data.json
``` ```
This will export all data (including user information) to a json data file. This will create JSON file at the specified location which contains all database records.
!!! info "Specifying filename"
The filename of the exported file can be specified using the `-f` option
### Initialize New Database ### Initialize New Database
@ -27,13 +37,18 @@ Then, ensure that the database schema are correctly initialized in the new datab
invoke migrate invoke migrate
``` ```
This ensures that the required database tables exist, which must be the case before data can be imported.
### Import Data ### Import Data
The new database should now be correctly initialized with the correct table structures requried to import the data. Run the following command to load the databased dump file into the new database. The new database should now be correctly initialized with the correct table structures requried to import the data. Run the following command to load the databased dump file into the new database.
``` ```
python3 InvenTree/manage.py loaddata data.json invoke import-records -f data.json
``` ```
!!! info "Character Encoding" !!! info "Import Filename"
A different filename can be specified using the `-f` option
!!! warning "Character Encoding"
If the character encoding of the data file does not exactly match the target database, the import operation may not succeed. In this case, some manual editing of the database JSON file may be required. If the character encoding of the data file does not exactly match the target database, the import operation may not succeed. In this case, some manual editing of the database JSON file may be required.

View File

@ -38,6 +38,7 @@ extra_javascript:
nav: nav:
- InvenTree: - InvenTree:
- About InvenTree: index.md - About InvenTree: index.md
- What's New: new.md
- Contribute: contribute.md - Contribute: contribute.md
- Getting Started: - Getting Started:
- Installation: start/install.md - Installation: start/install.md
@ -60,9 +61,12 @@ nav:
- Build: - Build:
- Build Parts: build/build.md - Build Parts: build/build.md
- Bill of Materials (BOM): build/bom.md - Bill of Materials (BOM): build/bom.md
- Buy: - Companies:
- Suppliers: buy/supplier.md - Suppliers: companies/supplier.md
- Purchase Orders: buy/po.md - Manufacturers: companies/manufacturer.md
- Customers: companies/customer.md
- Purchase Orders: companies/po.md
- Sales Orders: companies/so.md
- Report: - Report:
- Labels: report/labels.md - Labels: report/labels.md
- Templates: report/report.md - Templates: report/report.md