diff --git a/_includes/config.yaml b/_includes/config.yaml index a5e3f34..3472a37 100644 --- a/_includes/config.yaml +++ b/_includes/config.yaml @@ -68,6 +68,19 @@ currencies: # Email backend configuration # Ref: https://docs.djangoproject.com/en/dev/topics/email/ +# Available options: +# host: Email server host address +# port: Email port +# username: Account username +# password: Account password +# prefix: Email subject prefix +# tls: Enable TLS support +# ssl: Enable SSL support + +# Alternatively, these options can all be set using environment variables, +# with the INVENTREE_EMAIL_ prefix: +# e.g. INVENTREE_EMAIL_HOST / INVENTREE_EMAIL_PORT / INVENTREE_EMAIL_USERNAME +# Refer to the InvenTree documentation for more information email: # backend: 'django.core.mail.backends.smtp.EmailBackend' @@ -83,11 +96,33 @@ email: # Use the environment variable INVENTREE_DEBUG 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 # Use environment variable INVENTREE_LOG_LEVEL # Options: DEBUG / INFO / WARNING / ERROR / CRITICAL log_level: WARNING +# Allowed hosts (see ALLOWED_HOSTS in Django settings documentation) +# 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!) +allowed_hosts: + - '*' + +# Cross Origin Resource Sharing (CORS) settings (see https://github.com/ottoyiu/django-cors-headers) +# Following parameters are +cors: + # CORS_ORIGIN_ALLOW_ALL - If True, the whitelist will not be used and all origins will be accepted. + allow_all: True + + # CORS_ORIGIN_WHITELIST - A list of origins that are authorized to make cross-site HTTP requests. Defaults to [] + # whitelist: + # - https://example.com + # - https://sub.example.com + # MEDIA_ROOT is the local filesystem location for storing uploaded files # By default, it is stored under /home/inventree/data/media # Use environment variable INVENTREE_MEDIA_ROOT @@ -97,3 +132,47 @@ media_root: '/home/inventree/data/media' # By default, it is stored under /home/inventree/data/static # Use environment variable INVENTREE_STATIC_ROOT static_root: '/home/inventree/data/static' + +# Optional URL schemes to allow in URL fields +# By default, only the following schemes are allowed: ['http', 'https', 'ftp', 'ftps'] +# Uncomment the lines below to allow extra schemes +#extra_url_schemes: +# - mailto +# - git +# - ssh + +# Login configuration +# How long do confirmation mail last? +# Use environment variable INVENTREE_LOGIN_CONFIRM_DAYS +#login_confirm_days: 3 +# How many wrong login attempts are permitted? +# Use environment variable INVENTREE_LOGIN_ATTEMPTS +#login_attempts: 5 + +# Permit custom authentication backends +#authentication_backends: +# - 'django.contrib.auth.backends.ModelBackend' + +# Custom middleware, sometimes needed alongside an authentication backend change. +#middleware: +# - 'django.middleware.security.SecurityMiddleware' +# - 'django.contrib.sessions.middleware.SessionMiddleware' +# - 'django.middleware.locale.LocaleMiddleware' +# - 'django.middleware.common.CommonMiddleware' +# - 'django.middleware.csrf.CsrfViewMiddleware' +# - 'corsheaders.middleware.CorsMiddleware' +# - 'django.contrib.auth.middleware.AuthenticationMiddleware' +# - 'django.contrib.messages.middleware.MessageMiddleware' +# - 'django.middleware.clickjacking.XFrameOptionsMiddleware' +# - 'InvenTree.middleware.AuthRequiredMiddleware' + +# Add SSO login-backends +# social_backends: +# - 'allauth.socialaccount.providers.keycloak' + +# Add specific settings +# social_providers: +# keycloak: +# KEYCLOAK_URL: 'https://keycloak.custom/auth' +# KEYCLOAK_REALM: 'master' + diff --git a/docs/assets/images/build/bom_add_item.png b/docs/assets/images/build/bom_add_item.png index c51310e..f912d37 100644 Binary files a/docs/assets/images/build/bom_add_item.png and b/docs/assets/images/build/bom_add_item.png differ diff --git a/docs/assets/images/build/bom_invalid.png b/docs/assets/images/build/bom_invalid.png index 0a74416..831fba9 100644 Binary files a/docs/assets/images/build/bom_invalid.png and b/docs/assets/images/build/bom_invalid.png differ diff --git a/docs/assets/images/build/bom_upload_file.png b/docs/assets/images/build/bom_upload_file.png index c01dcf1..916e6e1 100644 Binary files a/docs/assets/images/build/bom_upload_file.png and b/docs/assets/images/build/bom_upload_file.png differ diff --git a/docs/assets/images/build/bom_valid.png b/docs/assets/images/build/bom_valid.png index 304a429..c53532b 100644 Binary files a/docs/assets/images/build/bom_valid.png and b/docs/assets/images/build/bom_valid.png differ diff --git a/docs/assets/images/build/build_allocate.png b/docs/assets/images/build/build_allocate.png index 8a9f90c..ee37946 100644 Binary files a/docs/assets/images/build/build_allocate.png and b/docs/assets/images/build/build_allocate.png differ diff --git a/docs/assets/images/build/build_allocate_detail.png b/docs/assets/images/build/build_allocate_detail.png index 2b851dc..35d2785 100644 Binary files a/docs/assets/images/build/build_allocate_detail.png and b/docs/assets/images/build/build_allocate_detail.png differ diff --git a/docs/assets/images/build/build_allocation_expand.png b/docs/assets/images/build/build_allocation_expand.png index 3c4df1b..45dafdc 100644 Binary files a/docs/assets/images/build/build_allocation_expand.png and b/docs/assets/images/build/build_allocation_expand.png differ diff --git a/docs/assets/images/build/build_attachments.png b/docs/assets/images/build/build_attachments.png index 7cff50b..a7a70ea 100644 Binary files a/docs/assets/images/build/build_attachments.png and b/docs/assets/images/build/build_attachments.png differ diff --git a/docs/assets/images/build/build_auto_allocate.png b/docs/assets/images/build/build_auto_allocate.png index 7a14b47..1e4d048 100644 Binary files a/docs/assets/images/build/build_auto_allocate.png and b/docs/assets/images/build/build_auto_allocate.png differ diff --git a/docs/assets/images/build/build_childs.png b/docs/assets/images/build/build_childs.png index b22e10e..479011a 100644 Binary files a/docs/assets/images/build/build_childs.png and b/docs/assets/images/build/build_childs.png differ diff --git a/docs/assets/images/build/build_create_from_part.png b/docs/assets/images/build/build_create_from_part.png index cbd9243..fce8f05 100644 Binary files a/docs/assets/images/build/build_create_from_part.png and b/docs/assets/images/build/build_create_from_part.png differ diff --git a/docs/assets/images/build/build_details.png b/docs/assets/images/build/build_details.png index ca5d638..b0afd9a 100644 Binary files a/docs/assets/images/build/build_details.png and b/docs/assets/images/build/build_details.png differ diff --git a/docs/assets/images/build/build_notes.png b/docs/assets/images/build/build_notes.png index 3cac55a..b3c5304 100644 Binary files a/docs/assets/images/build/build_notes.png and b/docs/assets/images/build/build_notes.png differ diff --git a/docs/assets/images/build/build_output_complete.png b/docs/assets/images/build/build_output_complete.png index f2c7294..c729493 100644 Binary files a/docs/assets/images/build/build_output_complete.png and b/docs/assets/images/build/build_output_complete.png differ diff --git a/docs/assets/images/build/build_outputs.png b/docs/assets/images/build/build_outputs.png index 1131e4c..3e0be75 100644 Binary files a/docs/assets/images/build/build_outputs.png and b/docs/assets/images/build/build_outputs.png differ diff --git a/docs/assets/images/build/complete_build.png b/docs/assets/images/build/complete_build.png index 97863c9..230acca 100644 Binary files a/docs/assets/images/build/complete_build.png and b/docs/assets/images/build/complete_build.png differ diff --git a/docs/assets/images/indexgallery/bom_add_item.png b/docs/assets/images/indexgallery/bom_add_item.png index a535629..05c8377 100644 Binary files a/docs/assets/images/indexgallery/bom_add_item.png and b/docs/assets/images/indexgallery/bom_add_item.png differ diff --git a/docs/assets/images/indexgallery/build_details.png b/docs/assets/images/indexgallery/build_details.png index ca5d638..625e6ba 100644 Binary files a/docs/assets/images/indexgallery/build_details.png and b/docs/assets/images/indexgallery/build_details.png differ diff --git a/docs/assets/images/indexgallery/build_outputs.png b/docs/assets/images/indexgallery/build_outputs.png index 1131e4c..fa77dd3 100644 Binary files a/docs/assets/images/indexgallery/build_outputs.png and b/docs/assets/images/indexgallery/build_outputs.png differ diff --git a/docs/assets/images/indexgallery/category_params.png b/docs/assets/images/indexgallery/category_params.png index d8af8ab..9e91b8f 100644 Binary files a/docs/assets/images/indexgallery/category_params.png and b/docs/assets/images/indexgallery/category_params.png differ diff --git a/docs/assets/images/indexgallery/category_subcats.png b/docs/assets/images/indexgallery/category_subcats.png index a64d984..948b7cf 100644 Binary files a/docs/assets/images/indexgallery/category_subcats.png and b/docs/assets/images/indexgallery/category_subcats.png differ diff --git a/docs/assets/images/indexgallery/manufacturers.png b/docs/assets/images/indexgallery/manufacturers.png new file mode 100644 index 0000000..fbe153d Binary files /dev/null and b/docs/assets/images/indexgallery/manufacturers.png differ diff --git a/docs/assets/images/indexgallery/part_category.png b/docs/assets/images/indexgallery/part_category.png index 283db8b..f9d9de0 100644 Binary files a/docs/assets/images/indexgallery/part_category.png and b/docs/assets/images/indexgallery/part_category.png differ diff --git a/docs/assets/images/indexgallery/part_stock.png b/docs/assets/images/indexgallery/part_stock.png index d056a02..5d48a42 100644 Binary files a/docs/assets/images/indexgallery/part_stock.png and b/docs/assets/images/indexgallery/part_stock.png differ diff --git a/docs/assets/images/indexgallery/part_suppliers.png b/docs/assets/images/indexgallery/part_suppliers.png index 799156a..ca09aec 100644 Binary files a/docs/assets/images/indexgallery/part_suppliers.png and b/docs/assets/images/indexgallery/part_suppliers.png differ diff --git a/docs/assets/images/indexgallery/stock_item.png b/docs/assets/images/indexgallery/stock_item.png index a0a1376..b316b92 100644 Binary files a/docs/assets/images/indexgallery/stock_item.png and b/docs/assets/images/indexgallery/stock_item.png differ diff --git a/docs/assets/images/indexgallery/stock_item_2.png b/docs/assets/images/indexgallery/stock_item_2.png new file mode 100644 index 0000000..7ad6386 Binary files /dev/null and b/docs/assets/images/indexgallery/stock_item_2.png differ diff --git a/docs/assets/images/indexgallery/stock_location.png b/docs/assets/images/indexgallery/stock_location.png index 7d1f37a..9d117e3 100644 Binary files a/docs/assets/images/indexgallery/stock_location.png and b/docs/assets/images/indexgallery/stock_location.png differ diff --git a/docs/assets/images/indexgallery/stock_location_2.png b/docs/assets/images/indexgallery/stock_location_2.png index 04b4388..a8e44aa 100644 Binary files a/docs/assets/images/indexgallery/stock_location_2.png and b/docs/assets/images/indexgallery/stock_location_2.png differ diff --git a/docs/assets/images/indexgallery/suppliers.png b/docs/assets/images/indexgallery/suppliers.png index e36f8ab..e90ef98 100644 Binary files a/docs/assets/images/indexgallery/suppliers.png and b/docs/assets/images/indexgallery/suppliers.png differ diff --git a/docs/assets/images/part/create_part_parameter.png b/docs/assets/images/part/create_part_parameter.png index f1ce0df..0021b65 100644 Binary files a/docs/assets/images/part/create_part_parameter.png and b/docs/assets/images/part/create_part_parameter.png differ diff --git a/docs/assets/images/part/create_part_variant.png b/docs/assets/images/part/create_part_variant.png index 174b0ae..b885b35 100644 Binary files a/docs/assets/images/part/create_part_variant.png and b/docs/assets/images/part/create_part_variant.png differ diff --git a/docs/assets/images/part/new_part.png b/docs/assets/images/part/new_part.png index acaca47..7408659 100644 Binary files a/docs/assets/images/part/new_part.png and b/docs/assets/images/part/new_part.png differ diff --git a/docs/assets/images/part/parametric_table_example.png b/docs/assets/images/part/parametric_table_example.png index 4ded7e2..78720de 100644 Binary files a/docs/assets/images/part/parametric_table_example.png and b/docs/assets/images/part/parametric_table_example.png differ diff --git a/docs/assets/images/part/parametric_table_tab.png b/docs/assets/images/part/parametric_table_tab.png index d097e75..b23115f 100644 Binary files a/docs/assets/images/part/parametric_table_tab.png and b/docs/assets/images/part/parametric_table_tab.png differ diff --git a/docs/assets/images/part/part_category.png b/docs/assets/images/part/part_category.png index feecc71..5c3a8a7 100644 Binary files a/docs/assets/images/part/part_category.png and b/docs/assets/images/part/part_category.png differ diff --git a/docs/assets/images/part/part_create_form.png b/docs/assets/images/part/part_create_form.png index 7a23a25..de5e133 100644 Binary files a/docs/assets/images/part/part_create_form.png and b/docs/assets/images/part/part_create_form.png differ diff --git a/docs/assets/images/part/part_manufacturers_suppliers.png b/docs/assets/images/part/part_manufacturers_suppliers.png index 734e958..c402536 100644 Binary files a/docs/assets/images/part/part_manufacturers_suppliers.png and b/docs/assets/images/part/part_manufacturers_suppliers.png differ diff --git a/docs/assets/images/part/part_new_suppliers.png b/docs/assets/images/part/part_new_suppliers.png index 72479ad..edc6866 100644 Binary files a/docs/assets/images/part/part_new_suppliers.png and b/docs/assets/images/part/part_new_suppliers.png differ diff --git a/docs/assets/images/part/part_overview.png b/docs/assets/images/part/part_overview.png index 90ef62a..4f3fba3 100644 Binary files a/docs/assets/images/part/part_overview.png and b/docs/assets/images/part/part_overview.png differ diff --git a/docs/assets/images/part/part_parameters_example.png b/docs/assets/images/part/part_parameters_example.png index c8a1f85..933278b 100644 Binary files a/docs/assets/images/part/part_parameters_example.png and b/docs/assets/images/part/part_parameters_example.png differ diff --git a/docs/assets/images/part/part_related.png b/docs/assets/images/part/part_related.png index 3b65685..27fc93d 100644 Binary files a/docs/assets/images/part/part_related.png and b/docs/assets/images/part/part_related.png differ diff --git a/docs/assets/images/part/part_stock.png b/docs/assets/images/part/part_stock.png index 40951c0..1ef8670 100644 Binary files a/docs/assets/images/part/part_stock.png and b/docs/assets/images/part/part_stock.png differ diff --git a/docs/assets/images/part/part_tabs.png b/docs/assets/images/part/part_tabs.png index d25e605..ea3ec73 100644 Binary files a/docs/assets/images/part/part_tabs.png and b/docs/assets/images/part/part_tabs.png differ diff --git a/docs/assets/images/part/part_view_intro.png b/docs/assets/images/part/part_view_intro.png index f28e1a9..4a7145d 100644 Binary files a/docs/assets/images/part/part_view_intro.png and b/docs/assets/images/part/part_view_intro.png differ diff --git a/docs/assets/images/settings/theme_dark.png b/docs/assets/images/settings/theme_dark.png index 930ab9e..09d9abb 100644 Binary files a/docs/assets/images/settings/theme_dark.png and b/docs/assets/images/settings/theme_dark.png differ diff --git a/docs/assets/images/settings/theme_default.png b/docs/assets/images/settings/theme_default.png index b11573f..71eda32 100644 Binary files a/docs/assets/images/settings/theme_default.png and b/docs/assets/images/settings/theme_default.png differ diff --git a/docs/assets/images/stock/enable_stock_expiry.png b/docs/assets/images/stock/enable_stock_expiry.png index b806b25..98f4d57 100644 Binary files a/docs/assets/images/stock/enable_stock_expiry.png and b/docs/assets/images/stock/enable_stock_expiry.png differ diff --git a/docs/assets/images/stock/enable_stock_owner.png b/docs/assets/images/stock/enable_stock_owner.png index f450995..9afd7d5 100644 Binary files a/docs/assets/images/stock/enable_stock_owner.png and b/docs/assets/images/stock/enable_stock_owner.png differ diff --git a/docs/assets/images/stock/expiry_date_create.png b/docs/assets/images/stock/expiry_date_create.png index 2376302..143a260 100644 Binary files a/docs/assets/images/stock/expiry_date_create.png and b/docs/assets/images/stock/expiry_date_create.png differ diff --git a/docs/assets/images/stock/expiry_date_edit.png b/docs/assets/images/stock/expiry_date_edit.png index 0251c3f..b090d8f 100644 Binary files a/docs/assets/images/stock/expiry_date_edit.png and b/docs/assets/images/stock/expiry_date_edit.png differ diff --git a/docs/assets/images/stock/item_expired.png b/docs/assets/images/stock/item_expired.png index 09391b4..404844b 100644 Binary files a/docs/assets/images/stock/item_expired.png and b/docs/assets/images/stock/item_expired.png differ diff --git a/docs/assets/images/stock/part_expiry.png b/docs/assets/images/stock/part_expiry.png index 1b6e144..002309b 100644 Binary files a/docs/assets/images/stock/part_expiry.png and b/docs/assets/images/stock/part_expiry.png differ diff --git a/docs/assets/images/stock/sell_build_expired_stock.png b/docs/assets/images/stock/sell_build_expired_stock.png index d2a1507..095e038 100644 Binary files a/docs/assets/images/stock/sell_build_expired_stock.png and b/docs/assets/images/stock/sell_build_expired_stock.png differ diff --git a/docs/assets/images/stock/stock_add.png b/docs/assets/images/stock/stock_add.png index 209e904..83353ba 100644 Binary files a/docs/assets/images/stock/stock_add.png and b/docs/assets/images/stock/stock_add.png differ diff --git a/docs/assets/images/stock/stock_count.png b/docs/assets/images/stock/stock_count.png index 64ef897..1de7f1d 100644 Binary files a/docs/assets/images/stock/stock_count.png and b/docs/assets/images/stock/stock_count.png differ diff --git a/docs/assets/images/stock/stock_item_owner.png b/docs/assets/images/stock/stock_item_owner.png index 21c4450..250d6af 100644 Binary files a/docs/assets/images/stock/stock_item_owner.png and b/docs/assets/images/stock/stock_item_owner.png differ diff --git a/docs/assets/images/stock/stock_location_owner.png b/docs/assets/images/stock/stock_location_owner.png index 7700046..fc87415 100644 Binary files a/docs/assets/images/stock/stock_location_owner.png and b/docs/assets/images/stock/stock_location_owner.png differ diff --git a/docs/assets/images/stock/stock_move.png b/docs/assets/images/stock/stock_move.png index 312a117..a6b62ed 100644 Binary files a/docs/assets/images/stock/stock_move.png and b/docs/assets/images/stock/stock_move.png differ diff --git a/docs/assets/images/stock/stock_options.png b/docs/assets/images/stock/stock_options.png index c8b7d01..0250327 100644 Binary files a/docs/assets/images/stock/stock_options.png and b/docs/assets/images/stock/stock_options.png differ diff --git a/docs/assets/images/stock/stock_remove.png b/docs/assets/images/stock/stock_remove.png index a8b8635..5fc27b5 100644 Binary files a/docs/assets/images/stock/stock_remove.png and b/docs/assets/images/stock/stock_remove.png differ diff --git a/docs/assets/images/stock/stock_status_change.png b/docs/assets/images/stock/stock_status_change.png deleted file mode 100644 index 4f26d4c..0000000 Binary files a/docs/assets/images/stock/stock_status_change.png and /dev/null differ diff --git a/docs/demo.md b/docs/demo.md index cdf9902..8b4ce09 100644 --- a/docs/demo.md +++ b/docs/demo.md @@ -14,7 +14,7 @@ Multiple default accounts are provided, as detailed below. Each account is affor | Username | Password | Description | | --- | --- | --- | -| allacess | nolimits | View / create / edit all pages and items | +| allaccess | nolimits | View / create / edit all pages and items | | reader | readonly | Can view all pages but cannot create, edit or delete database records | | engineer | partsonly | Can manage parts, view stock, but no access to purchase orders or sales orders | | admin | inventree | Superuser account, access all areas plus administrator actions | diff --git a/docs/extend/themes.md b/docs/extend/themes.md index d1081b8..5f89252 100644 --- a/docs/extend/themes.md +++ b/docs/extend/themes.md @@ -8,7 +8,8 @@ You can customize the look of InvenTree via the color themes feature. ### Select Color Theme -Navigate to the "Settings" page and click on the "Theme" tab, you should see the following: +Navigate to the "Settings" page and click on the "Display" tab, you should see the following: + {% with id="theme_default", url="settings/theme_default.png", description="Default InvenTree color theme" %} {% include 'img.html' %} {% endwith %} @@ -19,6 +20,7 @@ The drop-down list let's you select any other color theme found in your static f Color themes are "user specific" which means that changing the color theme in your own settings won't affect other users. Here is an example what the "Dark Reader" theme looks like: + {% with id="theme_dark", url="settings/theme_dark.png", description="Dark Reader InvenTree color theme" %} {% include 'img.html' %} {% endwith %} diff --git a/docs/faq.md b/docs/faq.md index 7cec9df..ba68ccf 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -47,5 +47,4 @@ 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.md). + 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.md). diff --git a/docs/features.md b/docs/features.md index 395ab7f..78d76e4 100644 --- a/docs/features.md +++ b/docs/features.md @@ -7,8 +7,7 @@ title: Features InvenTree is an open-source inventory management system which provides intuitive parts management and stock control. -It is designed to be lightweight and easy to use for SME or hobbyist applications, where many existing stock management solutions are bloated and cumbersome to use. However, powerful business logic works in the background to ensure that stock tracking history is maintained, and users have ready access to stock level information. InvenTree is designed to allow for a flexible installation. You could run the InvenTree server on Raspberry Pi SBC and have a simple single-user setup with a lightweight SQLite database. Or it can be run on the "cloud" using MySQL or PostgreSQL and support multiple simultaneous users. - +It is designed to be lightweight and easy to use for SME or hobbyist applications, where many existing stock management solutions are bloated and cumbersome to use. However, powerful business logic works in the background to ensure that stock tracking history is maintained, and users have ready access to stock level information. InvenTree is designed to allow for a flexible installation. InvenTree is a [Python](https://www.python.org/) and [Django](https://www.djangoproject.com/) application which stores data in a relational database, and serves this data to the user(s) via a web browser, and (optionally) can be integrated into custom applications via an API. diff --git a/docs/part/trackable.md b/docs/part/trackable.md index b661d65..4544435 100644 --- a/docs/part/trackable.md +++ b/docs/part/trackable.md @@ -22,12 +22,15 @@ For faster input there are several ways to define the wanted serial numbers(SN): | | `1` | `[1]` | single SN | | , | `1,3,5` | `[1, 3, 5]` | list of SNs | | - | `1-5` | `[1, 2, 3, 4, 5]` | strech of SN | -| \+ | `4+` (with 3 numbers needed) | `[4, 5, 6]` | all needed SNs from \ | -| \+\ | `2+2` | `[2, 3, 4]` | \ SNs add. to \ | +| ~ | `~` (next SN is 8) | `[8]` | represents the next SN | +| ``+ | `4+` (with 3 numbers needed) | `[4, 5, 6]` | all needed SNs from `` | +| ``+`` | `2+2` | `[2, 3, 4]` | `` SNs added to `` | These rules can be mix-and-matched with whitespaces or commas separating them. For example: -`1 3-5 9+2` or `1,3-5,9+2` result in `[1, 3, 4, 5, 9, 10, 11]` +`1 3-5 9+2` or `1,3-5,9+2` result in `[1, 3, 4, 5, 9, 10, 11]` +`~+2`(with next SN beeing 14) results in `[14, 15, 16]` +`~+`(with next SN beeing 14 and 2 numbers needed) results in `[14, 15]` ## Build Orders diff --git a/docs/releases/0.6.0.md b/docs/releases/0.6.0.md index b14e03d..2d0b792 100644 --- a/docs/releases/0.6.0.md +++ b/docs/releases/0.6.0.md @@ -54,11 +54,29 @@ PR [#2205](https://github.com/inventree/InvenTree/pull/2205) represents a major PR [#2208](https://github.com/inventree/InvenTree/pull/2208) provides notification emails when the stock level for a particular part falls below the configured "minimum stock" threshold for that part. An email is automatically sent to any users who are subscribed to notifications for that part. +### MFA Support + +PR [#2221](https://github.com/inventree/InvenTree/pull/2221) adds support for MFA (multi factor authentication). This enables admins to require all users to enable MFA as a second auth step. Refer to the [documentation](../settings/mfa) for further information. ### Stock Item Forms PR [#2198](https://github.com/inventree/InvenTree/pull/2198) provides a major refactor of stock item forms, for creating and editing stock items. These forms have been migrated to the REST API, providing a much more responsive user experience. -## Major Bug Fixes +### Session Management -| Pull Request | Description | -| --- | --- | +PR [#2371](https://github.com/inventree/InvenTree/pull/2371) adds management of user settings via the settings page + +### Sales Order Shipments + +PR [#2199](https://github.com/inventree/InvenTree/pull/2199) adds the ability to perform multiple shipments against a given Sales Order. This allows split-shipments and partial fulfillment of Sales Orders + +### Plugin Ecosystem + +PR [#2074](https://github.com/inventree/InvenTree/pull/2074) adds a plugin ecosystem, allowing future development of first-party and third-party plugins to extend upon core InvenTree functionality. Watch this space! + +### Assign Stock Items to Customer + +PR [#2436](https://github.com/inventree/InvenTree/pull/2436) refactors the process by which stock items can be manually assigned to a customer, separate to the Sales Order process. + +### Merging Stock Items + +PR [#2468](https://github.com/inventree/InvenTree/pull/2468) adds the ability to merge multiple stock items together. diff --git a/docs/settings/MFA.md b/docs/settings/MFA.md new file mode 100644 index 0000000..a315329 --- /dev/null +++ b/docs/settings/MFA.md @@ -0,0 +1,19 @@ +--- +title: InvenTree Multi Factor Authentication +--- + +## Multi Factor Authentication + + InvenTree gives the option to use TOTP or statically generated backup tokens as an additional factor to password or SSO authentication. This is a widely adopted security feature on enterprise web services. We highly encourage to enable it if you expose your instance to the public internet. + +As TOTP is an [open standard](https://datatracker.ietf.org/doc/html/rfc6238) there are a lot of different ways to hold your key and generate the time based tokens needed for authentication. That ranges from physical devices to password managers and mobile apps. We do not advertise any method but recommend to keep password and token generator seperate from each other. + +### Configuration + +To make MFA mandatory for all users: + +1. Enable it in the [global settings](../settings/global.md). + +### Security Consideration + +A user can lock themself out if they lose access to both the device with their TOTP app and their backup tokens. An admin can delete their tokens from the admin pages (they exsist under the 'TOTP devices' / 'static devices' models) . This should be a last resort and only done by people knowledgeable about the [admin pages](../settings/admin.md) as changes there might circumvent InvneTrees buisness and security logic. diff --git a/docs/settings/global.md b/docs/settings/global.md index 2fc95da..6070375 100644 --- a/docs/settings/global.md +++ b/docs/settings/global.md @@ -17,7 +17,15 @@ Global settings are arranged in the following categories: ### Server Settings -Configuration of basic server settings +Configuration of basic server settings. + +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| InvenTree Instance Name | String | String descriptor for the InvenTree server instance | InvenTree Server | +| Use Instance Name | Boolean | Use instance name in title bars | False | +| Base URL | String | Base URL for server instance | *blank* | +| Company Name | String | Company name | My compant name | +| Download from URL | Boolean | Allow downloading of images from remote URLs | False | ### Login Settings @@ -29,6 +37,7 @@ Change how logins, password-forgot, signups are handled. | Enable SSO | Boolean | Enable SSO on the login-pages | False | | Enable password forgot | Boolean | Enable password forgot function on the login-pages.

This will let users reset their passwords on their own. For this feature to work you need to configure E-mail | True | | E-Mail required | Boolean | Require user to supply e-mail on signup.

Without a way (e-mail) to contact the user notifications and security features might not work! | False | +| Enforce MFA | Boolean | Users must use multifactor security.

This forces each user to setup MFA and use it on each autentication | False | | Mail twice | Boolean | On signup ask users twice for their mail | False | | Password twice | Boolean | On signup ask users twice for their password | True | | Auto-fill SSO users | Boolean | Automatically fill out user-details from SSO account-data.

If this feature is enabled the user is only asked for their username, first- and surname if those values can not be gathered from their SSO profile. This might lead to unwanted usernames bleading over. | True | @@ -37,14 +46,29 @@ Change how logins, password-forgot, signups are handled. Configuration of barcode functionality +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Barcode Support | Boolean | Enable barcode functionality in web interface | True | + ### Currencies Configuration of currency support +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Default Currency | Currency | Default currency | USD | + ### Reporting Configuration of report generation +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Enable Reports | Boolean | Enable report generation | False | +| Page Size | String | Default page size | A4 | +| Debug Mode | Boolean | Generate reports in debug mode (HTML output) | False | +| Test Reports | Boolean | Enable generation of test reports | False | + ### Parts Configuration of Part options @@ -57,18 +81,39 @@ Configuration of Part Category options Configuration of Stock Item options +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Stock Expiry | Boolean | Enable stock expiry functionality | False | +| Stock Stale Time | Days | Number of days stock items are considered stale before expiring | 90 | +| Sell Expired Stock | Boolean | Allow sale of expired stock | False | +| Build Expired Stock | Boolean | Allow building with expired stock | False | +| Stock Ownership Control | Boolean | Enable ownership control functionality | False | + ### Build Orders Options for build orders +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Reference Prefix | String | Prefix for build order reference | BO | +| Reference Regex | String | Regular expression pattern for build order reference | *blank* | + ### Purchase Orders Options for purchase orders +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Reference Prefix | String | Prefix for purchase order reference | PO | + ### Sales orders Options for sales orders +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Reference Prefix | String | Prefix for sales order reference | SO | + ### Plugin Settings Change into what parts plugins can integrate into. @@ -78,4 +123,4 @@ Change into what parts plugins can integrate into. | Enable URL integration | Boolean | Enable plugins to add URL routes | False | | Enable navigation integration | Boolean | Enable plugins to integrate into navigation | False | | Enable setting integration | Boolean | Enable plugins to integrate into inventree settings | False | -| Enable app integration | Boolean | Enable plugins to add apps | False | \ No newline at end of file +| Enable app integration | Boolean | Enable plugins to add apps | False | diff --git a/docs/settings/user.md b/docs/settings/user.md index 415a1f6..7106ae8 100644 --- a/docs/settings/user.md +++ b/docs/settings/user.md @@ -10,24 +10,41 @@ User settings are arranged in the following categories: ### Account -User account configuration +User account configuration, including: + +- Account management +- Session management +- Authentication options +- Theme selection +- Language selection ### Home Page Customize display of items on the InvenTree home page + ### Search Customize settings for search results +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Search Preview Results | Integer | Number of results to show in search preview window | 10 | +| Search Show Stock | Boolean | Display stock levels in part search results | True | +| Hide Inactive Parts | Boolean | Hide inactive parts in search preview | False | + ### Labels Settings for label printing +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Inline Label Display | Boolean | Display PDF labels in the browser | True | + ### Reports Settings for report generation -### Forms - -Customize behavior of modal forms +| Setting | Type | Description | Default | +| --- | --- | --- | --- | +| Inline Report Display | Boolean | Display PDF reports in the browser | False | diff --git a/docs/start/docker.md b/docs/start/docker.md index db7756c..afa7441 100644 --- a/docs/start/docker.md +++ b/docs/start/docker.md @@ -16,13 +16,12 @@ Docker images are available with the following tags: | --- | --- | | **inventree:stable** | The most recent *stable* release version of InvenTree | | **inventree:latest** | The most up-to-date *development* version of InvenTree. | -| **inventree:tag** | Specific tagged images are built for each tagged release of InvenTree | +| **inventree:_tag_** | Specific tagged images are built for each tagged release of InvenTree | ### Docker Compose InvenTree provides sample docker-compose files to get you up and running. -| Compose File | Target | Description | - A *production* compose file is intended to be used in a production environment, running the web server behind a nginx proxy. - A *development* compose file provides a simple way to spin up a development environment diff --git a/docs/start/docker_dev.md b/docs/start/docker_dev.md index 12236ea..cfe97f6 100644 --- a/docs/start/docker_dev.md +++ b/docs/start/docker_dev.md @@ -13,6 +13,9 @@ There are some key differences compared to the [docker production setup](./docke - The django webserver is used, instead of running behind Gunicorn - The server will automatically reload when code changes are detected +!!! info "Static and Media Files" + The development server runs in DEBUG mode, and serves static and media files natively. + The [InvenTree docker image](https://github.com/inventree/InvenTree/blob/master/docker/Dockerfile) uses a [multi-stage build](https://docs.docker.com/develop/develop-images/multistage-build/) process to allow both production and development setups from the same image. The key difference is that the production image is pre-built using InvenTree source code from GitHub, while the development image uses the source code from your local machine (allowing live code updates). ### Docker Compose @@ -23,12 +26,27 @@ This script specifies the following containers: | Container | Description | | --- | --- | +| inventree-dev-db | Database image (PostgreSQL) | | inventree-dev-server | Web server using the django development server | | inventree-dev-worker | Background task manager | !!! success "Works out of the box" You should not need to make any changes to the `docker-compose.dev.yml` file to run the development docker container +#### PostgreSQL Database + +A PostgreSQL database container requires a username:password combination (which can be changed). This uses the official [PostgreSQL image](https://hub.docker.com/_/postgres). + +*__Note__: An empty database must be manually created as part of the setup (below)*. + +#### Web Server + +Runs an InvenTree web server instance, powered by Django's built-in webserver. + +#### Background Worker + +Runs the InvenTree background worker process. + ### Environment Variables Environment variables for the docker containers can be found in the file `dev-config.env` in the `docker` directory. @@ -57,20 +75,45 @@ docker-compose -f docker-compose.dev.yml build ### Create Database -!!! info "First Run Only" +If this is the first time you are interacting with the docker containers, the InvenTree database has not yet been created. + +!!! success "First Run Only" This command only needs to be executed on the first run, if the development database has not already been initialized +Run the following command to open a shell session for the database + +``` +docker-compose -f docker-compose.dev.yml run inventree-dev-server pgcli -h inventree-dev-db -p 5432 -u pguser +``` + +!!! info "User" + If you have changed the `POSTGRES_USER` variable in the compose file, replace `pguser` with the different username. + +You will be prompted to enter the database user password (default="pgpassword", unless altered in the compose file). + +Once logged in, run the following command in the database shell: + +``` +create database inventree; +``` + +Then exit the shell with Ctrl+d + +### Database Setup + +The database has now been created, but it is empty! Perform the initial database setup by running the following command: + ``` docker-compose -f docker-compose.dev.yml run inventree-dev-server invoke update ``` -This command performs the following tasks: +This command performs the following steps: -- Install required python packages into a local python virtual environment -- Create an SQLite database and perform schema migrations -- Collect static files +- Ensure required python packages are installed +- Perform the required schema updates to create the required database tables +- Update translation files -### Create Superuser +### Create Admin Account !!! info "First Run Only" This command only needs to be executed on the first run, if you have not already created a superuser account for the database @@ -101,7 +144,7 @@ Once initial setup is complete, stopping and restarting the services is much sim To stop the InvenTree development server, simply run the following command: ``` -docker-compose -f docker-compose-dev.yml down +docker-compose -f docker-compose.dev.yml down ``` ### Start InvenTree Services diff --git a/docs/start/docker_prod.md b/docs/start/docker_prod.md index ed78bb8..0a59b2d 100644 --- a/docs/start/docker_prod.md +++ b/docs/start/docker_prod.md @@ -33,7 +33,7 @@ The example docker-compose file launches the following containers: #### PostgreSQL Database -A postgresql database container which creates a postgres user:password combination (which can be changed). This uses the official [PostgreSQL image](https://hub.docker.com/_/postgres). +A PostgreSQL database container which requires a username:password combination (which can be changed). This uses the official [PostgreSQL image](https://hub.docker.com/_/postgres). *__Note__: An empty database must be manually created as part of the setup (below)*. @@ -116,7 +116,7 @@ This starts the database container (in this example, a PostgreSQL server). ### Create Database -If this is the first time we are interacting with the docker containers, the InvenTree database has not yet been created. +If this is the first time you are interacting with the docker containers, the InvenTree database has not yet been created. !!! success "First Run Only" If you have already created the InvenTree database you can progress to the next step @@ -128,7 +128,7 @@ docker-compose run inventree-server pgcli -h inventree-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. + If you have changed the `POSTGRES_USER` variable in the compose file, replace `pguser` with the different username. You will be prompted to enter the database user password (default="pgpassword", unless altered in the compose file). diff --git a/docs/start/install.md b/docs/start/install.md index c713587..1909f9c 100644 --- a/docs/start/install.md +++ b/docs/start/install.md @@ -190,24 +190,6 @@ 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. -### SQLite - -SQLite uses a simple portable database file which is easy to use for debug and testing purposes. - -Install required packages as follows: - -!!! 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. - -!!! warning "SQLite Case Sensitivity" - SQLite has a known [string matching limitation](https://docs.djangoproject.com/en/dev/ref/databases/#substring-matching-and-case-sensitivity) for non ASCII characters. If you are using non ASCII characters (e.g. Cyrillic text), it is recommended that you do not use SQLite, as search functionality will not work correctly. - ## Configure InvenTree Options Once the required software packages are installed and the database has been created, the InvenTree server options must be configured. diff --git a/docs/start/migrate.md b/docs/start/migrate.md index 1005395..1662f18 100644 --- a/docs/start/migrate.md +++ b/docs/start/migrate.md @@ -6,7 +6,6 @@ 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. -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" Ensure that the original database is securely backed up first! diff --git a/docs/stock/status.md b/docs/stock/status.md index 79ba921..3d53659 100644 --- a/docs/stock/status.md +++ b/docs/stock/status.md @@ -28,22 +28,6 @@ The stock status is displayed as a label in the header of each stock item detail ## Update Status -### Single Item - -To change the status of an individual stock item, click on the status label displayed in the stock item view, then select the new status: - -{% with id="stock_status_change", url="stock/stock_status_change.png", description="Stock Status Change" %} -{% include 'img.html' %} -{% endwith %} - -Submit the form then the label will be updated: - -{% with id="stock_status_label_updated", url="stock/stock_status_label_updated.png", description="Stock Status Label Updated" %} -{% include 'img.html' %} -{% endwith %} - -### Multiple Items - In the "Stock" tab of the part view, select all stock items which stock status needs to be updated: {% with id="stock_status_change_multiple", url="stock/stock_status_change_multiple.png", description="Stock Status Status Multiple" %} diff --git a/main.py b/main.py index 4da2d6a..9f913bd 100644 --- a/main.py +++ b/main.py @@ -1,8 +1,24 @@ import os from posixpath import dirname +from urllib import request + + def define_env(env): + # Ensure that the config template is always up to date + CFG_URL = "https://raw.githubusercontent.com/inventree/InvenTree/master/InvenTree/config_template.yaml" + + response = request.urlopen(CFG_URL) + print(f"Reading config template from GitHub: Response {response.status}") + + if response.status == 200: + data = response.read() + + if len(data) > 0: + with open("_includes/config.yaml", "w") as f: + f.write(str(data.decode())) + @env.macro def listimages(subdir): """ diff --git a/mkdocs.yml b/mkdocs.yml index 3efed27..cac2ac4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -95,12 +95,13 @@ nav: - Order: report/order.md - Barcodes: report/barcodes.md - Context Variables: report/context_variables.md - - Settings: + - Admin: - Global Settings: settings/global.md - User Settings: settings/user.md - Admin Interface: settings/admin.md - User Permissions: settings/permissions.md - Single Sign on: settings/SSO.md + - Multi Factor Authentication: settings/MFA.md - Export Data: settings/export.md - Import Data: settings/import.md - Python Shell: settings/shell.md