* Add ParameterTemplate model - Data structure duplicated from PartParameterTemplate * Apply data migration for templates * Admin integration * API endpoints for ParameterTemplate * Scaffolding * Add validator for ParameterTemplate model type - Update migrations - Make Parameter class abstract (for now) - Validators * API updates - Fix options for model_type - Add API filters * Add definition for Parameter model * Add django admin site integration * Update InvenTreeParameterMixin class - Fetch queryset of all linked Parameter instances - Ensure deletion of linked instances * API endpoints for Parameter instances * Refactor UI table for parameter templates * Add comment for later * Add "enabled" field to ParameterTemplate model * Add new field to serializer * Rough-in new table * Implement generic "parameter" table * Enable parameters for Company model * Change migration for part parameter - Make it "universal" * Remove code for ManufacturerPartParameter * Fix for filters * Add data import for parameter table * Add verbose name to ParameterTemplate model * Removed dead API code * Update global setting * Fix typos * Check global setting for unit validation * Use GenericForeignKey * Add generic relationship to allow reverse lookups * Fixes for table structure * Add custom serializer field for ContentType with choices * Adds ContentTypeField - Handles representation of content type - Provides human-readable options * Refactor API filtering for endpoints - Specify ContentType by ID, model or app label * Revert change to parameters property * Define GenericRelationship for linking model * Refactoring some code * Add a generic way to back-annotate and prefetch parameters for any model type * Change panel position * Directly annotate parameters against different model serializers * remove defunct admin classes * Run plugin validation against parameter * Fix prefetching for PartSerializer * Implement generic "filtering" against queryset * Implement generic "ordering" by parameter * Make parametric table generic * Refactor segmented panels * Consolidate part table views * Fix for parametric part table - Only display parameters for which we know there is a value * Add parametric tables for company views * Fix typo in file name * Prefetch to reduce hits * Add generic API mixin for filtering and ordering by parameter * Fix hook for rebuilding template parameters * Remove serializer * Remove old models * Fix code for copying parameters from category * Implement more parametric tables: - ManufacturerPart - SupplierPart - Fixes and enhancements * Add parameter support for orders * Add UI support for parameters against orders * Update API version * Update CHANGELOG.md * Add parameter support for build orders * Tweak frontend * Add renderer * Remove defunct endpoints * Add migration requirement * Require contenttypes to be updated * Update migration * Try using ID val * Adjust migration dependencies * fix params fixture * fix schema export * fix modelset * Fixes for data migration * tweak table * Fix for Category Parameters * Use branch of demo dataset for testing * Add parameteric build order table * disable broken imports * remove old model from ruleset * correct test * Table tweaks * fix test * Remove old model type * fix test * fix test * Refactor mixin to avoid specifying model type manually * fix test * fix resolve name * remove unneeded import * Tweak unit testing * Fix unit test * Enable bulk-create * More fixes * More unit test tweaks * Enhancements * Unit test fixes * Add some migration tests * Fix admin tests * Fix part tests * adapt expectation * fix remaining typecheck * Docs updates * Rearrange models * fix paramater caching * fix doc links * adjust assumption * Adjust data migration unit tests * docs fixes * Fix docs link * Fixes * Tweak formatting * Add doc for setting * Add metadata view for parameters * Add metadata view for ParamterTemplate * Update CHANGELOG file * Deconflict model_type fields * Invert key:value * Revert "Invert key:value" This reverts commitd555658db2. * fix assert * Update API rev notes * Initial unit tests for API * Test parameter create / edit / delete via the API * Add some more unit tests for the API * Validate queryset annotation - Add unit test with large dataset - Ensure number of queries is fixed - Fix for prefetching check * Add breaking change info to CHANGELOG.md * Ensure that parameters are removed when deleting the linked object * Enhance type hinting * Refactor part parameter exporter plugin - Any model which supports parameters can use this now - Update documentation * Improve serializer field * Adjust unit test * Reimplement checks for locked parts * Fix unit test for data migration * Fix for unit test * Allow disable edit for ParameterTable * Fix supplier part import wizard * Add unit tests for template API filtering * Add playwright tests for purchasing index * Add tests for manufacturing index page * ui tests for sales index * Add data migration tests for ManufacturerPartParameter * Pull specific branch for python binding tests * Specify target migration * Remove debug statement * Tweak migration unit tests * Add options for spectacular * Add explicit choice options * Ensure empty string values are converted to None * Don't use custom branch for python checks * Fix for migration test * Fix migration test * Fix reference target * Remove duplicate enum in spectactular.py * Add null choice to custom serializer class * [UI] Edit shipment details - Pass "pending" status through to the form * New migration strategy: part.0144: - Add new "enabled" field to PartParameterTemplate model - Add new ContentType fields to the "PartParameterTemplate" and "PartParameter" models - Data migration for existing "PartParameter" records part.0145: - Set NOT NULL constraints on new fields - Remove the obsolete "part" field from the "PartParameter" model * More migration updates: - Create new "models" (without moving the existing tables) - Data migration for PartCataegoryParameterTemplate model - Remove PartParameterTemplate and PartParameter models * Overhaul of migration strategy - New models simply point to the old database tables - Perform schema and data migrations on the old models first (in the part app) - Swap model references in correct order * Improve checks for data migrations * Bug fix for data migration * Add migration unit test to ensure that primary keys are maintained * Add playwright test for company parameters * Rename underlying database tables * Fixes for migration unit tests * Revert "Rename underlying database tables" This reverts commit477c692076. * Fix for migration sequencing * Simplify new playwright test * Remove spectacular collision * Monkey patch the drf-spectacular warn function * Do not use custom branch for playwright testing --------- Co-authored-by: Matthias Mair <code@mjmair.com>
5.4 KiB
title
| title |
|---|
| Part Views |
Part Views
The Part detail view page provides a detailed view of a single part in the system. The page is divided into several sections, which are described in this document.
Category Breadcrumb List
The categories of each part is displayed on the top navigation bar as show in the above screenshot. Click here 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.
{{ image("part/part_overview.png", "Part Overview") }}
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. Read more about part revisions here.
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.
Variants
If a part is a Template Part then the Variants tab will be visible.
Read about Part templates and variants
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.
{{ image("part/part_stock.png", "Part Stock") }}
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 - 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.
{{ image("part/part_manufacturers_suppliers.png", "Part Suppliers and Manufacturers") }}
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.
Stock History
The Stock History tab provide historical stock level information. Refer to the stock history documentation for further information.
Test Templates
If a part is marked as testable, the user can define tests which must be performed on any stock items which are instances of this part. Read more about testing.
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:
{{ image("part/part_related.png", "Related Parts Example View") }}
This feature can be enabled or disabled in the global part settings.
Parameters
Parts can have multiple defined parameters.
Attachments
The Part Attachments tab displays file attachments associated with the selected Part. Multiple file attachments (such as datasheets) can be uploaded for each Part.
Notes
A part may have notes attached, which support markdown formatting.