2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-16 03:55:41 +00:00

Documentation integration (#4653)

* Add documentation under docs/ directory

* Add CI workflow for mkdocs configuration checking

* Add documentation issue template

* update pip-tools?

* Update .gitignore files

* Fix .gitignore rules

* Improve release notes page

* remove references to old repo
This commit is contained in:
Oliver
2023-04-22 22:40:29 +10:00
committed by GitHub
parent 20f01e8741
commit 2ffd2354eb
487 changed files with 44875 additions and 12 deletions

69
docs/docs/part/create.md Normal file
View File

@ -0,0 +1,69 @@
---
title: Creating a Part
---
## Part Creation Form
New parts can be created from the *Part Category* view, by pressing the *New Part* button:
!!! info "Permissions"
If the user does not have "create" permission for the *Part* permission group, the *New Part* button will not be available.
{% with id="new", url="part/new_part.png", descript="New Part" %}
{% include "img.html" %}
{% endwith %}
A part creation form is opened as shown below:
{% with id="newform", url="part/part_create_form.png", descript="New Part Form" %}
{% include "img.html" %}
{% endwith %}
Fill out the required part parameters and then press *Submit* to create the new part. If there are any form errors, you must fix these before the form can be successfully submitted.
Once the form is completed, the browser window is redirected to the new part detail page.
### Initial Stock
If the *Create Initial Stock* setting is enabled, then an extra section is available in the part creation form to create an initial quantity of stock for the newly created part:
{% with id="setting", url="part/create_initial_stock_option.png", description="Create stock option" %}
{% include "img.html" %}
{% endwith %}
If this setting is enabled, the following elements are available in the form:
{% with id="initial_stock", url="part/part_initial_stock.png", descript="Inital stock" %}
{% include "img.html" %}
{% endwith %}
Checking the *Create Initial Stock* form input then allows the creation of an initial quantity of stock for the new part.
### Supplier Options
If the part is marked as *Purchaseable*, the form provides some extra options to initialize the new part with manufacturer and / or supplier information:
{% with id="supplierinfo", url="part/part_create_supplier.png", descript="Add supplier information" %}
{% include "img.html" %}
{% endwith %}
If the *Add Supplier Data* option is checked, then supplier part and manufacturer part information can be added to the newly created part:
{% with id="suppliers", url="part/part_new_suppliers.png", descript="Part supplier information" %}
{% include "img.html" %}
{% endwith %}
## Other Part Creation Methods
The following alternative methods for creating parts are supported:
- [Via the REST API](../../api/api)
- [Using the Python library](../../api/python)
- [Within the Admin interface](../../settings/admin)

View File

@ -0,0 +1,95 @@
---
title: Part Notifications
---
## General Notification Details
Users can select to receive notifications when certain events occur.
!!! warning "Email Configuration Required"
External notifications require correct [email configuration](../../start/config/#email-settings). They also need to be enabled in the settings under notifications`.
!!! warning "Valid Email Address"
Each user must have a valid email address associated with their account to receive email notifications
Notifications are also shown in the user interface. New notifications are announced in the header.
{% with id="notification_header", url="part/notification_header.png", description="One new notification in the header" %}
{% include 'img.html' %}
{% endwith %}
They can be viewed in a flyout.
{% with id="notification_flyout", url="part/notification_flyout.png", description="One new notification in the flyout" %}
{% include 'img.html' %}
{% endwith %}
All current notifications are listed in the inbox.
{% with id="notification_inbox", url="part/notification_inbox.png", description="One new notification in the notification inbox" %}
{% include 'img.html' %}
{% endwith %}
All past notification are listed in the history. They can be deleted one-by-one or all at once from there.
{% with id="notification_history", url="part/notification_history.png", description="One old notification in the notification history" %}
{% include 'img.html' %}
{% endwith %}
## Subscription List
Users can view the parts and categories they are subscribed to on the InvenTree home page:
{% with id="cat_subs", url="part/cat_subs.png", description="Category subscription list" %}
{% include 'img.html' %}
{% endwith %}
## Part Notification Events
### Low Stock Notification
If the *minimum stock* threshold is set for a *Part*, then a "low stock" notification can be generated when the stock level for that part falls below the configured level.
Any users who are subscribed to notifications for the part in question will receive a low stock notification via email.
### Build Order Notification
When a new [Build Order](../../build/build/) is created, the InvenTree software checks to see if any of the parts required to complete the order are low on stock.
If there are any parts with low stock, a notification is generated for any users subscribed to notifications for the part being built.
## Subscribing to Notifications
Users can "subscribe" to either a *Part* or *Part Category*, to receive notifications.
### Part
When subscribed to a *Part*, a user will receive notifications when events occur which pertain to:
- That particular part
- Any parts which are variants of that part
If a user is subscribed to a particular part, it will be indicated as shown below:
{% with id="part_sub_on", url="part/part_subscribe_on.png", description="Subscribe" %}
{% include 'img.html' %}
{% endwith %}
If the user is not subscibed, the subscription icon is greyed out, as shown here:
{% with id="part_sub_off", url="part/part_subscribe_off.png", description="Subscribe" %}
{% include 'img.html' %}
{% endwith %}
Clicking on this icon will toggle the subscription status for this part.
### Part Category
When subscribed to a *Part Category*, a user will receive notifications when particular events occur which pertain to:
- That particular category
- Any sub-categories at lower levels
- Any parts contained in the category
- Any parts contained in the lower level categories
Subscribing to a part category operates in the same manner as for a part - simply click on the notification icon:
{% with id="cat_sub", url="part/category_notification.png", description="Subscribe to part category" %}
{% include 'img.html' %}
{% endwith %}

View File

@ -0,0 +1,54 @@
---
title: Part Parameters
---
## Part Parameters
Part parameters are located in the "Parameters" tab, on each part detail page.
There is no limit for the number of part parameters and they are fully customizable through the use of parameters templates.
Here is an example of parameters for a capacitor:
{% with id="part_parameters_example", url="part/part_parameters_example.png", description="Part Parameters Example List" %}
{% include 'img.html' %}
{% endwith %}
### Create Template
A *Parameter Template* is required for each part parameter.
To create a template:
- navigate to the "Settings" page
- click on the "Parts" tab
- scroll down to the "Part Parameter Templates" section
- click on the "New Parameter" button
- fill out the `Create Part Parameter Template` form: `Name` (required) and `Units` (optional) fields
- finally click on the "Submit" button.
### Create Parameter
After [creating a template](#create-template) or using the existing templates, you can add parameters to any part.
To add a parameter, navigate to a specific part detail page, click on the "Parameters" tab then click on the "New Parameters" button, the `Create Part Parameter` form will be displayed:
{% with id="create_part_parameter", url="part/create_part_parameter.png", description="Create Part Parameter Form" %}
{% include 'img.html' %}
{% endwith %}
Select the parameter `Template` you would like to use for this parameter, fill-out the `Data` field (value of this specific parameter) and click the "Submit" button.
### Parametric Tables
Parametric tables gather all parameters from all parts inside a category to be sorted and filtered.
To access a category's parametric table, click on the "Parameters" tab within the category view:
{% with id="parametric_table_tab", url="part/parametric_table_tab.png", description="Parametric Table Tab" %}
{% include 'img.html' %}
{% endwith %}
Below is an example of capacitor parametric table filtered with `Package Type = 0402`:
{% with id="parametric_table_example", url="part/parametric_table_example.png", description="Parametric Table Example" %}
{% include 'img.html' %}
{% endwith %}

106
docs/docs/part/part.md Normal file
View File

@ -0,0 +1,106 @@
---
title: Parts
---
## Part
The *Part* is the core element of the InvenTree ecosystem. A Part object is the archetype of any stock item in your inventory. Parts are arranged in heirarchical categories which are used to organise and filter parts by function.
## Part Category
Part categories are very flexible and can be easily arranged to match a particular user requirement. Each part category displays a list of all parts *under* that given category. This means that any part belonging to a particular category, or belonging to a sub-category, will be displayed.
Each part category also shows a list of sub-categories which exist underneath it.
{% with id="part_category", url="part/part_category.png", description="Parts are arranged in categories" %}
{% include 'img.html' %}
{% endwith %}
The category part list provides an overview of each part:
* Part name and description
* Part image thumbnail
* Part category
* Part stock level
The list of parts underneath a given category can be filtered by multiple user-configurable filters, which is especially useful when a large number of parts exist under a certain category.
Clicking on the part name links to the [*Part Detail*](./views.md) view.
## Part Attributes
Each *Part* defined in the database provides a number of different attributes which determine how that part can be used. Configuring these attributes for a given part will impact the available functions that can be perform on (or using) that part).
### Virtual
A *Virtual* part is one which does not physically exist but should still be tracked in the system. This could be a process step, machine time, software license, etc.
### Template
A *Template* part is one which can have *variants* which exist underneath it. [Read further information about template parts here](./template.md).
### Assembly
If a part is designated as an *Assembly* it can be created (or built) from other component parts. As an example, a circuit board assembly is made using multiple electronic components, which are tracked in the system. An *Assembly* Part has a Bill of Materials (BOM) which lists all the required sub-components. [Read further information about BOM management here](../build/bom.md).
### Component
If a part is designated as a *Component* it can be used as a sub-component of an *Assembly*. [Read further information about BOM management here](../build/bom.md)
### Trackable
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.md).
### Purchaseable
If a part is designated as *Purchaseable* it can be purchased from external suppliers. Setting this flag allows parts to be added to [purchase orders](../buy/po.md).
### Salable
If a part is designated as *Salable* it can be sold to external customers. Setting this flag allows parts to be added to sales orders.
### 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.
## Part Images
Each part can have an associated image, which is used for display purposes throughout the InvenTree interface. A prominent example is on the part detail page itself:
{% with id="part_image", url="part/part_image_example.png", description="Part image example" %}
{% include 'img.html' %}
{% endwith %}
### Image Thumbnails
Thumbnail images are also used throughout the interface, particularly in table views, to reduce data load on the server. These thumbnail images are generated automatically when a new part image is uploaded.
### Uploading Part Image
#### Web Interface
In the web interface, part images can be uploaded directly from the [part view](./views.md). Hover the mouse cursor over the Part image to reveal multiple options:
{% with id="part_image_uplaod", url="part/part_image_upload.png", description="Upload part image" %}
{% include 'img.html' %}
{% endwith %}
| Action | Description |
| --- | --- |
| Upload new image | Select an image file from your local computer to associate with the selected part |
| Select from existing images | Select an image from a list of part images which already exist in the database |
| Delete image | Remove the associated image from the selected part |
#### API
Image upload is supported via the [InvenTree API](../api/api.md), allowing images to be associated with parts programatically. Further, this means that the [Python interface](../api/python/python.md) also supports image upload.
#### Mobile App
The [InvenTree mobile app](../app/part.md#part-image-view) allows part images to be directly uploaded, either from stored files or integrated camera.
## Part Import
*Parts* can be imported by staff-members on the part-list-view (this feature must be enabled in the part-settings), in the part-settings or on the [admin-page for parts](../settings/import.md) (only accessible if you are also an admin). The first two options provide a multi-stage wizard that enables mapping fields from various spreadsheet or table-data formats while the latter requires a well-formatted file but is much more performant.

167
docs/docs/part/pricing.md Normal file
View File

@ -0,0 +1,167 @@
---
title: Pricing
---
## Pricing
Pricing is an inherently complex topic, often subject to the particular requirements of the user. InvenTree attempts to provide a comprehensive pricing architecture which is useful without being proscriptive.
!!! warning "Raw Data Only"
InvenTree stores raw pricing data, as provided by the user. Any calculations or decisions based on this data must take into consideration the context in which the data are entered.
### Terminology
Throughout this documentation (and within InvenTree) the concepts of *cost* and *price* are separated as follows:
| Term | Description |
| --- | --- |
| Price | The theoretical amount of money required to pay for something. |
| Cost | The actual amount of money paid. |
### Pricing Sources
Pricing information can be determined from multiple sources:
| Pricing Source | Description | Linked to |
| --- | --- | ---|
| Internal Price | How much a part costs to make | [Part](../part/part.md) |
| Supplier Price | The price to theoretically purchase a part from a given supplier (with price-breaks) | [Supplier](../buy/supplier.md) |
| Purchase Cost | Historical cost information for parts purchased | [Purchase Order](../buy/po.md) |
| BOM Price | Total price for an assembly (total price of all component items) | [Part](../part/part.md) |
| Sale Price | How much a salable item is sold for (with price-breaks) | [Part](../part/part.md) |
| Sale Cost | How much an item was sold for | [Sales Order](../sell/so.md) |
### Currency Support
InvenTree supports pricing data in multiple currencies, allowing integration with suppliers and customers using different currency systems.
Supported currencies must be configured as part of [the InvenTree setup process](../start/config.md#supported-currencies).
!!! info "Currency Support"
InvenTree provides multi-currency pricing support via the [django-money](https://django-money.readthedocs.io/en/latest/) library.
#### Default Currency
Many of the pricing operations are performed in reference to a *Default Currency* (which can be selected for the particular InvenTree installation).
#### Conversion Rates
To facilitate conversion between different currencies, exchange rate data is provided via the [exchangerate.host](https://exchangerate.host/#/) API. Currency exchange rates are updated once per day.
!!! tip "Custom Exchange Rates"
Custom exchange rates or databases can be used if desired.
## Pricing Tab
The pricing tab for a given Part provides all available pricing information for that part. It shows all price ranges and provides tools to calculate them.
The pricing tab is divided into different sections, based on the available pricing data.
!!! info "Pricing Data"
As not all parts have the same pricing data available, the pricing tab display may be different from one part to the next
### Pricing Overview
At the top of the pricing tab, an *Overview* section shows a synopsis of the available pricing data:
{% with id="pricing_overview", url="part/pricing_overview.png", description="Pricing Overview" %}
{% include 'img.html' %}
{% endwith %}
This overview tab provides information on the *range* of pricing data available within each category. If pricing data is not available for a given category, it is marked as *No data*.
Each price range is calculated in the [Default Currency](#default-currency), independent of the currency in which the original pricing information is stored. This is necessary for operations such as data sorting, price comparison, etc. Note that while the *overview* information is calculated in a single currency, the original pricing information is still available in the original currency.
Price range data is [cached in the database](#price-data-caching) when underlying pricing information changes.
!!! tip "Refresh Pricing"
While pricing data is [automatically updated](#data-updates), the user can also manually refresh the pricing calculations manually, by pressing the "Refresh" button in the overview section.
#### Overall Pricing
The *overall pricing* range is calculated based on the minimum and maximum of available pricing data. Note that *overall pricing* is the primary source of pricing data used in other pricing calculations (such as cumulative BOM costing, for example).
### Internal Pricing
A particular Part may have a set of *Internal Price Breaks* which denote quantity pricing set by the user. Internal pricing is set independent of any external pricing or BOM data - it is determined entirely by the user. If a part is purchased from external suppliers, then internal pricing may well be left blank.
If desired, price breaks can be specified based on particular quantities.
{% with id="pricing_internal", url="part/pricing_internal.png", description="Internal Pricing" %}
{% include 'img.html' %}
{% endwith %}
#### Pricing Override
If the **Internal Price Override** setting is enabled, then internal pricing data overrides any other available pricing (if present).
### Purchase History
If the Part is designated as *purchaseable*, then historical purchase cost information is displayed (and used to calculate overall pricing). Purchase history data is collected from *completed* [purchase orders](../buy/po.md).
{% with id="pricing_purchase_history", url="part/pricing_purchase_history.png", description="Purchase History" %}
{% include 'img.html' %}
{% endwith %}
### Supplier Pricing
If supplier pricing information is available, this can be also used to determine price range data.
{% with id="pricing_supplier", url="part/pricing_supplier.png", description="Supplier Pricing" %}
{% include 'img.html' %}
{% endwith %}
### BOM Pricing
If a Part is designated as an *assembly*, then the [Bill of Materials](../build/bom.md) (BOM) can be used to determine the price of the assembly. The price of each component in the BOM is used to calculate the overall price of the assembly.
{% with id="pricing_bom", url="part/pricing_bom.png", description="BOM Pricing" %}
{% include 'img.html' %}
{% endwith %}
#### BOM Pricing Chart
The BOM *Pricing Chart* displays two separate "pie charts", with minimum and maximum price data for each item in the BOM. Note that prices are only shown for BOM items which have available pricing information.
!!! info "Complete Pricing Required"
If pricing data is not available for all items in the BOM, the assembly pricing will be incomplete
### Variant Pricing
For *template* parts, the price of any *variants* of the template is taken into account:
{% with id="pricing_variants", url="part/pricing_variants.png", description="Variant Pricing" %}
{% include 'img.html' %}
{% endwith %}
### Sale Pricing
If the Part is designated as *Salable* then sale price breaks are made available. These can be configured as desired by the user, to define the desired sale price at various quantities.
{% with id="pricing_sale_price_breaks", url="part/pricing_sale_price_breaks.png", description="Sale Pricing" %}
{% include 'img.html' %}
{% endwith %}
### Sale History
If the Part is designated as *Salable* then historical sale cost information is available. Sale history data is collected from *completed* [sales orders](../sell/so.md).
{% with id="pricing_sale_history", url="part/pricing_sale_history.png", description="Sale History" %}
{% include 'img.html' %}
{% endwith %}
### Price Data Caching
Pricing calculations (and conversions) can be expensive to perform. This can make pricing data for complex Bills of Material time consuming to retrieve from the server, if not handled correctly.
For this reason, all information displayed in the [pricing overview](#pricing-overview) section is pre-calculated and *cached* in the database. This ensures that when it needs to be retrieved (e.g. viewing pricing for an entire BOM) it can be accessed immediately.
Pricing data is cached in the [default currency](#default-currency), which ensures that pricing can be compared across multiple parts in a consistent format.
#### Data Updates
The pricing data caching is intented to occur *automatically*, and generally be up-to-date without user interaction. Pricing data is re-calculated and cached by the [background worker](../settings/tasks.md) in the following ways:
- **Automatically** - If the underlying pricing data changes, part pricing is scheduled to be updated
- **Periodically** - A daily task ensures that any outdated or missing pricing is kept updated
- **Manually** - The user can manually recalculate pricing for a given part in the [pricing overview](#pricing-overview) display

View File

@ -0,0 +1,34 @@
---
title: Part Scheduling
---
## Part Scheduling
The *Scheduling* tab provides an overview of the *predicted* future availabile quantity of a particular part.
The *Scheduling* tab displays a chart of estimated future part stock levels. It begins at the current date, with the current stock level. It then projects into the "future", taking information from:
#### Incoming Stock
- **Purchase Orders** - Incoming goods will increase stock levels
- **Build Orders** - Completed build outputs will increase stock levels
#### Outgoing Stock
- **Sales Orders** - Outgoing stock items will reduce stock levels
- **Build Orders** - Allocated stock items will reduce stock levels
#### Caveats
The scheduling information only works as an adequate predictor of future stock quantity if there is sufficient information available in the database.
In particular, stock movements due to orders (Purchase Orders / Sales Orders / Build Orders) will only be counted in the scheduling *if a target date is set for the order*. If the order does not have a target date set, we cannot know *when* (in the future) the stock levels will be adjusted. Thus, orders without target date information do not contribute to the scheduling information.
Additionally, any orders with a target date in the "past" are also ignored for the purpose of part scheduling.
Finally, any unexpected or unscheduled stock operations which are not associated with future orders cannot be predicted or displayed in the scheduling tab.
{% with id="scheduling", url="part/scheduling.png", description="Part Scheduling View" %}
{% include 'img.html' %}
{% endwith %}

146
docs/docs/part/stocktake.md Normal file
View File

@ -0,0 +1,146 @@
---
title: Part Stocktake
---
## Part Stocktake
A *Stocktake* refers to a "snapshot" of stock levels for a particular part, at a specific point in time. Stocktake information is used for tracking a historical record of the quantity and value of part stock.
In particular, an individual *Stocktake* record tracks the following information:
- The date of the Stocktake event
- A reference to the [part](./part.md) which is being counted
- The total number of individual [stock items](../stock/stock.md) available
- The total stock quantity of available stock
- The total cost of stock on hand
### Stock Items vs Stock Quantity
*Stock Items* refers to the number of stock entries (e.g. *"3 reels of capacitors"*). *Stock Quantity* refers to the total cumulative stock count (e.g. *"4,560 total capacitors"*).
### Cost of Stock on Hand
The total cost of stock on hand is calculated based on the provided pricing data. For stock items which have a recorded *cost* (e.g. *purchase price*), this value is used. If no direct pricing information is available for a particular stock item, the price range of the part itself is used.
!!! info "Cost Range"
Cost data is provided as a *range* of values, accounting for any variability in available pricing data.
### Display Stocktake Data
Historical stocktake data for a particular part can be viewed in the *Stocktake* tab, available on the *Part* page.
This tab displays a chart of historical stock quantity and cost data, and corresponding tabulated data:
{% with id="stocktake_tab", url="part/part_stocktake_tab.png", description="Part stocktake tab" %}
{% include 'img.html' %}
{% endwith %}
If this tab is not visible, ensure that the *Part Stocktake* [user setting](../settings/user.md) is enabled in the *Display Settings* section.
{% with id="stocktake_tab_enable", url="part/part_stocktake_enable_tab.png", description="Enable stocktake tab" %}
{% include 'img.html' %}
{% endwith %}
!!! info "Permission Required"
The stocktake tab will be unavailable if your user account does not have the [required permissions](#stocktake-permissions)
## Stocktake Reports
While a *Stocktake* entry records a historical snapshot of stock levels for a single *part*, a *Stocktake Report* is used to generate a report data file which contains stocktake entries for multiple parts. Stocktake reports can be generated for the entire range of parts available in the database, or a subset of parts as determined by user-configurable filters.
Stocktake reports can be [generated manually](#performing-a-stocktake) by the user, or (if enabled) [generated automatically](#automatic-stocktake) at a specified interval.
As there is a lot of data to crunch to build a report, stocktake reports are generated by the [background worker process](../settings/tasks.md). When the report is completed, it is saved to the database and made available for download.
!!! tip "Background Worker"
If the background worker process is not running, stocktake reports will be unavailable!
Stocktake reports are made available for download as a tabulated `.csv` file, which can be opened in many external applications for further analysis.
## Stocktake Settings
There are a number of configuration options available in the [settings view](../settings/global.md):
{% with id="stocktake_settings", url="part/part_stocktake_settings.png", description="Stocktake settings" %}
{% include 'img.html' %}
{% endwith %}
### Enable Stocktake
Enable or disable stocktake functionality. Note that by default, stocktake functionality is disabled.
### Automatic Stocktake Period
Configure the number of days between genenration of [automatic stocktake reports](#automatic-stocktake). If this value is set to zero, automatic stocktake reports will not be generated.
### Delete Old Reports
Configure how many days stocktake reports will be retained, before being deleted automatically.
### Historical Stocktake Reports
The *Stocktake Settings* display also provides a table of historical stocktake reports:
{% with id="stocktake_report_table", url="part/part_stocktake_report_table.png", description="Stocktake reports" %}
{% include 'img.html' %}
{% endwith %}
## Stocktake Permissions
Stocktake data and actions are protected by the [stocktake role](../settings/permissions.md#role):
| Permission | Actions Available |
| --- | --- |
| `stocktake.view` | View historical stocktake data for parts |
| `stocktake.add` | Perform stocktake and generate reports |
| `stocktake.delete` | Delete stocktake records and reports |
## Performing a Stocktake
Manual stocktake can be performed via the web interface in a number of locations. The user can filter the parts for which the stocktake will be performed. A new stocktake entry will be generated for each selected part, and optionally a report can be generated for download.
When performing a stocktake, various options are presented to the user:
{% with id="stocktake_generate", url="part/part_stocktake_generate.png", description="Generate stocktake report" %}
{% include 'img.html' %}
{% endwith %}
| Option | Description |
| --- | --- |
| Part | Limit stocktake context to a part. If the selected part is a [template part](./part.md#template), any variant parts will also be included in the stocktake |
| Category | Limit stocktake context to a single [part category](./part.md#part-category). Parts which exist in child categories (under the selected parent category) will also be included. |
| Location | Limit stocktake context to a single [stock location](../stock/stock.md#stock-location). Any parts which have stock items contained in this location (or any child locations) will be included in the stocktake |
| Generate Report | Select this option to generate a [stocktake report](#stocktake-reports) for the selected parts. |
| Update Parts | Select this option to save a new stocktake record for each selected part. |
### Part Stocktake
A stockake report for a single part can be generated from the *Stocktake Tab* on the part page:
{% with id="stocktake_part", url="part/part_stocktake_from_part.png", description="Generate part stocktake report" %}
{% include 'img.html' %}
{% endwith %}
### Category Stocktake
A stocktake report for a part category can be generated from the *Part Category* page:
{% with id="stocktake_category", url="part/part_stocktake_from_category.png", description="Generate category stocktake report" %}
{% include 'img.html' %}
{% endwith %}
### Location Stocktake
A stocktake report for a stock location can be generated from the *Stock Location* page:
{% with id="stocktake_location", url="part/part_stocktake_from_location.png", description="Generate location stocktake report" %}
{% include 'img.html' %}
{% endwith %}
### Automatic Stocktake
If enabled, stocktake reports can be generated automatically at a configured interval, specified in number of days. Automatic stocktake reports are performed on the entire database of parts.
### API Functionality
Stocktake actions can also be performed via the [API](../api/api.md).

View File

@ -0,0 +1,39 @@
---
title: Part Templates
---
## Part Templates
There are various purposes for using Part Templates, among them:
* Template parts can hold information that can be re-used across "Variants", a template part could be useful for creating a base variant of an assembly which can be derived from, with BoM changes for instance.
* Variants can be used as "manufacturing variants" where the variant dictates a particular configuration which a customer can order: a variant might determine the particular options that come with a part, like harnesses, enclosure, color, specs, etc.
"Variants" parts will reference the "Template" part therefore explicitly creating and showing direct relationship.
They also allow you to do special things like:
* **Serial Numbers**
Parts that are linked in a template / variant relationship must have unique serial numbers (e.g. if you have a template part Widget, and two variants Widget-01 and Widget-02 then any assigned serial numbers must be unique across all these variants).
* **Stock Reporting**
The "stock" for a template part includes stock for all variants under that part.
* **Logical Grouping**
The template / variant relationship is subtly different to the category / part relationship.
### Enable Template Part
Any part can be set as "Template" part. To do so:
1. navigate to a specific part detail page
0. click on the "Details" tab
0. locate the part options on the right-hand side
0. toggle the `Template` option so it shows green / slider to the right:
{% with id="enable_template_part", url="part/enable_template_part.png", description="Enable Template Part Option" %}
{% include 'img.html' %}
{% endwith %}
### Create Variant
When a part's [*Template option*](#enable-template-part) is turned-on, "Variants" of this part can be created.
To create a variant, navigate to a specific part detail page, click on the "Variants" tab then click on the "New Variant" button.
The `Duplicate Part` form will be displayed. Fill it out then click on <span class="badge inventree confirm">Submit</span> to create the variant.

43
docs/docs/part/test.md Normal file
View File

@ -0,0 +1,43 @@
---
title: Part Test Templates
---
## Part Test Templates
Parts which are designated as *trackable* (meaning they can be uniquely serialized) can define templates for tests which are to be performed against individual stock items corresponding to the part.
A test template defines the parameters of the test; the individual stock items can then have associated test results which correspond to a test template.
Test templates "cascade" down to variant parts: this means that if a master part has multiple variants, any test template defined for the master part will be assigned to the variants. Any stock items of the variant parts will have the same test templates associated with them.
{% with id="part_test_templates", url="part/part_test_templates.png", description="Part Test Templates" %}
{% include 'img.html' %}
{% endwith %}
### Test Template Parameters
#### Test Name
The name of the test is a simple string value which defines the name of the test. This test must be unique for a given part (or across a set of part variants).
The test name is used to generate a test "key" which is then used to match against test results associated with individual stock items.
#### Test Description
This field is a simple description for providing information back to the user. The description is not used by the InvenTree testing framework.
#### Required
If the *required* flag is set, this indicates that the test is crucial for the acceptance of a particular stock item.
#### Requires Value
If this flag is set, then a corresponding test result against a stock item must set the *value* parameter.
#### Requires Attachment
If this flag is set, then a corresponding test result against a stock item must provide a file attachment uploaded.
### Test Results
Individual stock item objects can have test results associated with them which correspond to test templates. Refer to the [stock test result](../stock/test.md) documentation for further information.

View File

@ -0,0 +1,38 @@
---
title: Trackable Parts
---
Denoting a part as *Trackble* changes the way that [stock items](../../stock/stock) associated with the particular part are handled in the database. A trackable part also has more restrictions imposed by the database scheme.
## Stock Tracking
For many parts in an InvenTree database, simply tracking current stock levels (and locations) is sufficient. However, some parts require more extensive tracking than simple stock level knowledge.
Any stock item associated with a trackable part *must* have either a batch number or a serial number. This includes stock created manually or via an internal process (such as a [Purchase Order](../buy/po.md) or a [Build Order](../build/build.md)).
## Assign Serial Numbers
Serial numbers (if activate for a part) are used in multiple forms and processes in InvenTree.
For faster input there are several ways to define the wanted serial numbers(SN):
| Marker | Input | Result | Description |
| --- | --- | --- | --- |
| | `1` | `[1]` | single SN |
| , | `1,3,5` | `[1, 3, 5]` | list of SNs |
| - | `1-5` | `[1, 2, 3, 4, 5]` | strech of SN |
| ~ | `~` (next SN is 8) | `[8]` | represents the next SN |
| `<start>`+ | `4+` (with 3 numbers needed) | `[4, 5, 6]` | all needed SNs from `<start>` |
| `<start>`+`<length>` | `2+2` | `[2, 3, 4]` | `<length>` SNs added to `<start>` |
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]`
`~+2`(with next SN being 14) results in `[14, 15, 16]`
`~+`(with next SN being 14 and 2 numbers needed) results in `[14, 15]`
## Build Orders
[Build orders](../build/build.md) have some extra requirements when either building a trackable part, or using parts in the Bill of Materials which are themselves trackable.

161
docs/docs/part/views.md Normal file
View File

@ -0,0 +1,161 @@
---
title: Part Views
---
## Part Views
The main part view is divided into 4 different panels:
1. Categories
2. Details
3. Tabs
4. Content of each tab
{% with id="part_view_intro", url="part/part_view_intro.png", description="Part View Introduction" %}
{% include 'img.html' %}
{% endwith %}
<p></p>
## Categories
The categories of each part is displayed on the top navigation bar as show in the above screenshot.
[Click here](./part.md#part-category) for more information about categories.
## Part Details
Details provides information about the particular part. Parts details can be displayed in the header panel clicking on "Show Part Details" toggle button.
{% with id="part_overview", url="part/part_overview.png", description="Part details" %}
{% include 'img.html' %}
{% endwith %}
<p></p>
A Part is defined in the system by the following parameters:
**Internal Part Number (IPN)** - A special code which can be used to link a part to a numbering system. The IPN field is not required, but may be useful where a part numbering system has been defined.
**Name** - The Part name is a simple (unique) text label
**Description** - Longer form text field describing the Part
**Revision** - An optional revision code denoting the particular version for the part. Used when there are multiple revisions of the same master part object.
**Keywords** - Optional few words to describe the part and make the part search more efficient.
**External Link** - An external URL field is provided to link to an external page. This could be useful the part has extra documentation located on an external server.
**Creation Date** - Indicates when the part was created and by which user (label on right-hand side)
**Units** - Units of measure (UoM) for this Part. The default is 'pcs'
## Part Tabs
The Part view page organizes part data into sections, displayed as tabs. Each tab has its own function, which is described in this section.
### Parameters
Parts can have multiple defined parameters.
[Read about Part parameters](./parameter.md)
### Variants
If a part is a *Template Part* then the *Variants* tab will be visible.
[Read about Part templates](./template.md)
### Stock
The *Stock* tab shows all the stock items for the selected *Part*. The user can quickly determine how many parts are in stock, where they are located, and the status of each *Stock Item*.
{% with id="part_stock", url="part/part_stock.png", description="Part Stock" %}
{% include 'img.html' %}
{% endwith %}
#### Functions
The following functions are available from the *Part Stock* view.
##### Export
Exports the stocktake data for the selected Part. Launches a dialog to select export options, and then downloads a file containing data for all stock items for this Part.
##### New Stock Item
Launches a dialog to create a new *Stock Item* for the selected *Part*.
##### Stock Actions
If stock items are selected in the table, stock actions are enabled via the drop-down menu.
### Allocations
The *Allocated* tab displays how many units of this part have been allocated to pending build orders and/or sales orders. This tab is only visible if the Part is a *component* (meaning it can be used to make assemblies), or it is *salable* (meaning it can be sold to customers).
### Bill of Materials
The *BOM* tab displays the [Bill of Materials](../build/bom.md) - a list of sub-components used to build an assembly. Each row in the BOM specifies a quantity of another Part which is required to build the assembly. This tab is only visible if the Part is an *assembly* (meaning it can be build from other parts).
### Build Orders
The *Build Orders* tab shows a list of the builds for this part. It provides a view for important build information like quantity, status, creation and completion dates.
### Used In
The *Used In* tab displays a list of other parts that this part is used to make. This tab is only visible if the Part is a *component*.
### Suppliers
The *Suppliers* tab displays all the *Part Suppliers* and *Part Manufacturers* for the selected *Part*.
This tab is only visible if the *Part* is designated as *Purchaseable*.
{% with id="part_manufacturers_suppliers", url="part/part_manufacturers_suppliers.png", description="Part Suppliers and Manufacturers" %}
{% include 'img.html' %}
{% endwith %}
### Purchase Orders
The *Part Purchase Orders* tab lists all the Purchase Orders against the selected part.
This tab is only displayed if the part is marked as *Purchaseable*.
### Sales Orders
The *Sales Orders* tab shows a list of the sales orders for this part. It provides a view for important sales order information like customer, status, creation and shipment dates.
### Scheduling
The *Scheduling* tab provides an overview of the *predicted* future availability of a particular part. Refer to the [scheduling documentation](./scheduling.md) for further information.
### Stocktake
The *Stocktake* tab provide historical stock level information, based on user-provided stocktake data. Refer to the [stocktake documentation](./stocktake.md) for further information.
### Tests
If a part is marked as *trackable*, the user can define tests which must be performed on any stock items which are instances of this part. [Read more about testing](./test.md).
### 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.
Related parts can be added and are shown under a table of the same name in the "Part" view:
{% with id="related_parts", url="part/part_related.png", description="Related Parts Example View" %}
{% include 'img.html' %}
{% endwith %}
This feature can be enabled or disabled in the global part settings:
{% with id="related_parts_setting", url="part/part_related_setting.png", description="Related Parts Example View" %}
{% include 'img.html' %}
{% endwith %}
### Attachments
The *Part Attachments* tab displays file attachments associated with the selected *Part*. Multiple file attachements (such as datasheets) can be uploaded for each *Part*.
### Notes
A part may have notes attached, which support markdown formatting.