Model Context
Model Context Variables
Each report context exposes one or more underlying model instances to the template (e.g. order, part, item). In addition to the explicit context variables documented on that page, templates can access any field or property of these model instances directly.
This page documents, for each reportable model type, the available:
- Fields: Database fields defined on the model (including those inherited from mixins / abstract base classes)
- Properties:
@property attributes which have been explicitly marked with the @report_attribute decorator, making them discoverable here
Not every attribute or method available on a model instance is listed here - only database fields, and properties explicitly marked for discovery. For a full list of attributes and methods, refer to the source code for the particular model type.
Build Order
Fields
| Variable |
Type |
Description |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| batch |
CharField |
Batch code for this build output |
| completed |
PositiveIntegerField |
Number of stock items which have been completed |
| completed_by |
ForeignKey[django.contrib.auth.models.User] |
completed by |
| completion_date |
DateField |
Completion Date |
| creation_date |
DateField |
Creation Date |
| destination |
ForeignKey[stock.models.StockLocation] |
Select location where the completed items will be stored |
| external |
BooleanField |
This build order is fulfilled externally |
| id |
AutoField |
ID |
| issued_by |
ForeignKey[django.contrib.auth.models.User] |
User who issued this build order |
| level |
PositiveIntegerField |
level |
| lft |
PositiveIntegerField |
lft |
| link |
InvenTreeURLField |
Link to external URL |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| parent |
TreeForeignKey[build.models.Build] |
Build Order to which this build is allocated |
| part |
ForeignKey[part.models.Part] |
Select part to build |
| priority |
PositiveIntegerField |
Priority of this build order |
| project_code |
ForeignKey[common.models.ProjectCode] |
Project code for this build order |
| quantity |
PositiveIntegerField |
Number of stock items to build |
| reference |
CharField |
Build Order Reference |
| reference_int |
BigIntegerField |
reference int |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this build order |
| rght |
PositiveIntegerField |
rght |
| sales_order |
ForeignKey[order.models.SalesOrder] |
Sales Order to which this build is allocated |
| start_date |
DateField |
Scheduled start date for this build order |
| status |
InvenTreeCustomStatusModelField |
Build status code |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - Pending * 20 - Production * 25 - On Hold * 30 - Cancelled * 40 - Complete Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| take_from |
ForeignKey[stock.models.StockLocation] |
Select location to take stock from for this build (leave blank to take from any stock location) |
| target_date |
DateField |
Target date for build completion. Build will be overdue after this date. |
| title |
CharField |
Brief description of the build (optional) |
| tree_id |
PositiveIntegerField |
tree id |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
Build Order Line Item
Fields
| Variable |
Type |
Description |
| bom_item |
ForeignKey[part.models.BomItem] |
bom item |
| build |
ForeignKey[build.models.Build] |
Build object |
| consumed |
DecimalField |
Quantity of consumed stock |
| id |
AutoField |
ID |
| quantity |
DecimalField |
Required quantity for build order |
Company
Fields
| Variable |
Type |
Description |
| active |
BooleanField |
Is this company active? |
| contact |
CharField |
Point of contact |
| currency |
CharField |
Default currency used for this company |
| description |
CharField |
Description of the company |
| email |
EmailField |
Contact email address |
| id |
AutoField |
ID |
| image |
StdImageField |
Image |
| is_customer |
BooleanField |
Do you sell items to this company? |
| is_manufacturer |
BooleanField |
Does this company manufacture parts? |
| is_supplier |
BooleanField |
Do you purchase items from this company? |
| link |
InvenTreeURLField |
Link to external company information |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| name |
CharField |
Company name |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| phone |
CharField |
Contact phone number |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| tax_id |
CharField |
Company Tax ID |
| website |
InvenTreeURLField |
Company website URL |
Properties
| Variable |
Type |
Description |
| address |
typing.Union[str, None] |
Return the string representation for the primary address. |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| currency_code |
str |
Return the currency code associated with this company. |
| image_url |
str |
Return the URL of the image for this object. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| parts |
QuerySet[company.models.SupplierPart] |
Return SupplierPart objects which are supplied or manufactured by this company. |
| primary_address |
typing.Union[company.models.Address, None] |
Returns address object of primary address for this Company. |
| thumbnail_url |
str |
Return the URL of the image thumbnail for this object. |
Part
Fields
| Variable |
Type |
Description |
| IPN |
CharField |
Internal Part Number |
| active |
BooleanField |
Is this part active? |
| assembly |
BooleanField |
Can this part be built from other parts? |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| base_cost |
DecimalField |
Minimum charge (e.g. stocking fee) |
| bom_checked_by |
ForeignKey[django.contrib.auth.models.User] |
BOM checked by |
| bom_checked_date |
DateField |
BOM checked date |
| bom_checksum |
CharField |
Stored BOM checksum |
| bom_validated |
BooleanField |
Is the BOM for this part valid? |
| category |
TreeForeignKey[part.models.PartCategory] |
Part category |
| component |
BooleanField |
Can this part be used to build other parts? |
| consumable |
BooleanField |
Is this part consumable, such as glue or a fastener? |
| creation_date |
DateField |
Creation Date |
| creation_user |
ForeignKey[django.contrib.auth.models.User] |
Creation User |
| default_expiry |
PositiveIntegerField |
Expiry time (in days) for stock items of this part |
| default_location |
TreeForeignKey[stock.models.StockLocation] |
Where is this item normally stored? |
| description |
CharField |
Part description (optional) |
| id |
AutoField |
ID |
| image |
StdImageField |
Image |
| is_template |
BooleanField |
Is this part a template part? |
| keywords |
CharField |
Part keywords to improve visibility in search results |
| level |
PositiveIntegerField |
level |
| lft |
PositiveIntegerField |
lft |
| link |
InvenTreeURLField |
Link to external URL |
| locked |
BooleanField |
Locked parts cannot be edited |
| maximum_stock |
DecimalField |
Maximum allowed stock level |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| minimum_stock |
DecimalField |
Minimum allowed stock level |
| multiple |
PositiveIntegerField |
Sell multiple |
| name |
CharField |
Part name |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| purchaseable |
BooleanField |
Can this part be purchased from external suppliers? |
| responsible_owner |
ForeignKey[users.models.Owner] |
Owner responsible for this part |
| revision |
CharField |
Part revision or version number |
| revision_of |
ForeignKey[part.models.Part] |
Is this part a revision of another part? |
| rght |
PositiveIntegerField |
rght |
| salable |
BooleanField |
Can this part be sold to customers? |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| testable |
BooleanField |
Can this part have test results recorded against it? |
| trackable |
BooleanField |
Does this part have tracking for unique items? |
| tree_id |
PositiveIntegerField |
tree id |
| units |
CharField |
Units of measure for this part |
| variant_of |
ForeignKey[part.models.Part] |
Is this part a variant of another part? |
| virtual |
BooleanField |
Is this a virtual part, such as a software product or license? |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| available_stock |
decimal.Decimal |
Return the total available stock. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| can_build |
decimal.Decimal |
Return the number of units that can be build with available stock. |
| default_supplier |
typing.Union[company.models.SupplierPart, None] |
Return the default (primary) SupplierPart for this Part. |
| full_name |
str |
Format a 'full name' for this Part based on the format PART_NAME_FORMAT defined in InvenTree settings. |
| image_url |
str |
Return the URL of the image for this object. |
| on_order |
decimal.Decimal |
Return the total number of items on order for this part. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| quantity_being_built |
decimal.Decimal |
Return the current number of parts currently being built. |
| thumbnail_url |
str |
Return the URL of the image thumbnail for this object. |
| total_stock |
decimal.Decimal |
Return the total stock quantity for this part. |
Purchase Order
Fields
| Variable |
Type |
Description |
| address |
ForeignKey[company.models.Address] |
Company address for this order |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| complete_date |
DateField |
Date order was completed |
| contact |
ForeignKey[company.models.Contact] |
Point of contact for this order |
| created_by |
ForeignKey[django.contrib.auth.models.User] |
Created By |
| creation_date |
DateField |
Creation Date |
| description |
CharField |
Order description (optional) |
| destination |
TreeForeignKey[stock.models.StockLocation] |
Destination for received items |
| id |
AutoField |
ID |
| issue_date |
DateField |
Date order was issued |
| link |
InvenTreeURLField |
Link to external page |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| order_currency |
CharField |
Currency for this order (leave blank to use company default) |
| project_code |
ForeignKey[common.models.ProjectCode] |
Select project code for this order |
| received_by |
ForeignKey[django.contrib.auth.models.User] |
received by |
| reference |
CharField |
Order reference |
| reference_int |
BigIntegerField |
reference int |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this order |
| start_date |
DateField |
Scheduled start date for this order |
| status |
InvenTreeCustomStatusModelField |
Purchase order status |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - Pending * 20 - Placed * 25 - On Hold * 30 - Complete * 40 - Cancelled * 50 - Lost * 60 - Returned Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| supplier |
ForeignKey[company.models.Company] |
Company from which the items are being ordered |
| supplier_reference |
CharField |
Supplier order reference code |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| target_date |
DateField |
Expected date for order delivery. Order will be overdue after this date. |
| total_price |
InvenTreeModelMoneyField |
Total price for this order |
| total_price_currency |
CurrencyField |
total price currency |
| updated_at |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| company |
typing.Union[company.models.Company, None] |
The company associated with this order. |
| is_overdue |
bool |
Determine if this order is overdue. |
| order_address |
typing.Union[company.models.Address, None] |
The Address associated with this order. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| status_text |
str |
Return the text representation of the current status. This will consider any custom status. |
Return Order
Fields
| Variable |
Type |
Description |
| address |
ForeignKey[company.models.Address] |
Company address for this order |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| complete_date |
DateField |
Date order was completed |
| contact |
ForeignKey[company.models.Contact] |
Point of contact for this order |
| created_by |
ForeignKey[django.contrib.auth.models.User] |
Created By |
| creation_date |
DateField |
Creation Date |
| customer |
ForeignKey[company.models.Company] |
Company from which items are being returned |
| customer_reference |
CharField |
Customer order reference code |
| description |
CharField |
Order description (optional) |
| id |
AutoField |
ID |
| issue_date |
DateField |
Date order was issued |
| link |
InvenTreeURLField |
Link to external page |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| order_currency |
CharField |
Currency for this order (leave blank to use company default) |
| project_code |
ForeignKey[common.models.ProjectCode] |
Select project code for this order |
| reference |
CharField |
Return Order reference |
| reference_int |
BigIntegerField |
reference int |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this order |
| start_date |
DateField |
Scheduled start date for this order |
| status |
InvenTreeCustomStatusModelField |
Return order status |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - Pending * 20 - In Progress * 25 - On Hold * 30 - Complete * 40 - Cancelled Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| target_date |
DateField |
Expected date for order delivery. Order will be overdue after this date. |
| total_price |
InvenTreeModelMoneyField |
Total price for this order |
| total_price_currency |
CurrencyField |
total price currency |
| updated_at |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| company |
typing.Union[company.models.Company, None] |
The company associated with this order. |
| is_overdue |
bool |
Determine if this order is overdue. |
| order_address |
typing.Union[company.models.Address, None] |
The Address associated with this order. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| status_text |
str |
Return the text representation of the current status. This will consider any custom status. |
Sales Order
Fields
| Variable |
Type |
Description |
| address |
ForeignKey[company.models.Address] |
Company address for this order |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| contact |
ForeignKey[company.models.Contact] |
Point of contact for this order |
| created_by |
ForeignKey[django.contrib.auth.models.User] |
Created By |
| creation_date |
DateField |
Creation Date |
| customer |
ForeignKey[company.models.Company] |
Company to which the items are being sold |
| customer_reference |
CharField |
Customer order reference code |
| description |
CharField |
Order description (optional) |
| id |
AutoField |
ID |
| issue_date |
DateField |
Date order was issued |
| link |
InvenTreeURLField |
Link to external page |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| order_currency |
CharField |
Currency for this order (leave blank to use company default) |
| project_code |
ForeignKey[common.models.ProjectCode] |
Select project code for this order |
| reference |
CharField |
Order reference |
| reference_int |
BigIntegerField |
reference int |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this order |
| shipment_date |
DateField |
Shipment Date |
| shipped_by |
ForeignKey[django.contrib.auth.models.User] |
shipped by |
| start_date |
DateField |
Scheduled start date for this order |
| status |
InvenTreeCustomStatusModelField |
Sales order status |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - Pending * 15 - In Progress * 20 - Shipped * 25 - On Hold * 30 - Complete * 40 - Cancelled * 50 - Lost * 60 - Returned Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| target_date |
DateField |
Expected date for order delivery. Order will be overdue after this date. |
| total_price |
InvenTreeModelMoneyField |
Total price for this order |
| total_price_currency |
CurrencyField |
total price currency |
| updated_at |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| company |
typing.Union[company.models.Company, None] |
The company associated with this order. |
| is_overdue |
bool |
Determine if this order is overdue. |
| order_address |
typing.Union[company.models.Address, None] |
The Address associated with this order. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| status_text |
str |
Return the text representation of the current status. This will consider any custom status. |
Sales Order Shipment
Fields
| Variable |
Type |
Description |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| checked_by |
ForeignKey[django.contrib.auth.models.User] |
User who checked this shipment |
| delivery_date |
DateField |
Date of delivery of shipment |
| id |
AutoField |
ID |
| invoice_number |
CharField |
Reference number for associated invoice |
| link |
InvenTreeURLField |
Link to external page |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| order |
ForeignKey[order.models.SalesOrder] |
Sales Order |
| reference |
CharField |
Shipment number |
| shipment_address |
ForeignKey[company.models.Address] |
Shipping address for this shipment |
| shipment_date |
DateField |
Date of shipment |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| tracking_number |
CharField |
Shipment tracking information |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
Stock Item
Fields
| Variable |
Type |
Description |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| batch |
CharField |
Batch code for this stock item |
| belongs_to |
ForeignKey[stock.models.StockItem] |
Is this item installed in another item? |
| build |
ForeignKey[build.models.Build] |
Build for this stock item |
| consumed_by |
ForeignKey[build.models.Build] |
Build order which consumed this stock item |
| creation_date |
DateTimeField |
Date that this stock item was created |
| customer |
ForeignKey[company.models.Company] |
Customer |
| delete_on_deplete |
BooleanField |
Delete this Stock Item when stock is depleted |
| expiry_date |
DateField |
Expiry date for stock item. Stock will be considered expired after this date |
| id |
AutoField |
ID |
| is_building |
BooleanField |
is building |
| link |
InvenTreeURLField |
Link to external URL |
| location |
TreeForeignKey[stock.models.StockLocation] |
Where is this stock item located? |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| owner |
ForeignKey[users.models.Owner] |
Select Owner |
| packaging |
CharField |
Packaging this stock item is stored in |
| parent |
ForeignKey[stock.models.StockItem] |
Parent Stock Item |
| part |
ForeignKey[part.models.Part] |
Base part |
| purchase_order |
ForeignKey[order.models.PurchaseOrder] |
Purchase order for this stock item |
| purchase_price |
InvenTreeModelMoneyField |
Single unit purchase price at time of purchase |
| purchase_price_currency |
CurrencyField |
purchase price currency |
| quantity |
DecimalField |
Stock Quantity |
| sales_order |
ForeignKey[order.models.SalesOrder] |
Destination Sales Order |
| serial |
CharField |
Serial number for this item |
| serial_int |
IntegerField |
serial int |
| status |
InvenTreeCustomStatusModelField |
status |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - OK * 50 - Attention needed * 55 - Damaged * 60 - Destroyed * 65 - Rejected * 70 - Lost * 75 - Quarantined * 85 - Returned Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| stocktake_date |
DateField |
stocktake date |
| stocktake_user |
ForeignKey[django.contrib.auth.models.User] |
stocktake user |
| supplier_part |
ForeignKey[company.models.SupplierPart] |
Select a matching supplier part for this stock item |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| updated |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| status_label |
str |
Return label. |
Stock Location
Fields
| Variable |
Type |
Description |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| custom_icon |
CharField |
Icon (optional) |
| description |
CharField |
Description (optional) |
| external |
BooleanField |
This is an external stock location |
| id |
AutoField |
ID |
| level |
PositiveIntegerField |
level |
| lft |
PositiveIntegerField |
lft |
| location_type |
ForeignKey[stock.models.StockLocationType] |
Stock location type of this location |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| name |
CharField |
Name |
| owner |
ForeignKey[users.models.Owner] |
Select Owner |
| parent |
TreeForeignKey[stock.models.StockLocation] |
parent |
| pathstring |
CharField |
Path |
| rght |
PositiveIntegerField |
rght |
| structural |
BooleanField |
Stock items may not be directly located into a structural stock locations, but may be located to child locations. |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| tree_id |
PositiveIntegerField |
tree id |
Properties
| Variable |
Type |
Description |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| icon |
str |
Get the current icon used for this location. |
| item_count |
int |
Simply returns the number of stock items in this location. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| parentpath |
list |
Construct the parent path of this tree node. |
| path |
list |
Construct the complete part of this tree node. |
Transfer Order
Fields
| Variable |
Type |
Description |
| address |
ForeignKey[company.models.Address] |
Company address for this order |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| complete_date |
DateField |
Date order was completed |
| consume |
BooleanField |
Rather than transfer the stock to the destination, "consume" it, by removing transferred quantity from the allocated stock item |
| contact |
ForeignKey[company.models.Contact] |
Point of contact for this order |
| created_by |
ForeignKey[django.contrib.auth.models.User] |
Created By |
| creation_date |
DateField |
Creation Date |
| description |
CharField |
Order description (optional) |
| destination |
ForeignKey[stock.models.StockLocation] |
Destination for transferred items |
| id |
AutoField |
ID |
| issue_date |
DateField |
Date order was issued |
| link |
InvenTreeURLField |
Link to external page |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| project_code |
ForeignKey[common.models.ProjectCode] |
Select project code for this order |
| reference |
CharField |
Transfer Order Reference |
| reference_int |
BigIntegerField |
reference int |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this order |
| start_date |
DateField |
Scheduled start date for this order |
| status |
InvenTreeCustomStatusModelField |
Transfer order status |
| status_custom_key |
ExtraInvenTreeCustomStatusModelField |
Additional status information for this item * 10 - Pending * 20 - Issued * 25 - On Hold * 30 - Complete * 40 - Cancelled Additional custom status keys may be retrieved from the corresponding 'status_retrieve' call. |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| take_from |
ForeignKey[stock.models.StockLocation] |
Source for transferred items |
| target_date |
DateField |
Expected date for order delivery. Order will be overdue after this date. |
| updated_at |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| company |
typing.Union[company.models.Company, None] |
The company associated with this order. |
| is_overdue |
bool |
Determine if this order is overdue. |
| order_address |
typing.Union[company.models.Address, None] |
The Address associated with this order. |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| status_text |
str |
Return the text representation of the current status. This will consider any custom status. |
Some related model types are not themselves directly reportable, but are referenced by a field or @report_attribute property on a reportable model (e.g. PartCategory via part.category, SupplierPart via part.default_supplier or stockitem.supplier_part).
These are discovered automatically - there is no manually-maintained list of related models here. If a reportable model gains a new field or @report_attribute property pointing at another model, that model will automatically appear in this section.
Address
Fields
| Variable |
Type |
Description |
| company |
ForeignKey[company.models.Company] |
Select company |
| country |
CharField |
Address country |
| id |
AutoField |
ID |
| internal_shipping_notes |
CharField |
Shipping notes for internal use |
| line1 |
CharField |
Address line 1 |
| line2 |
CharField |
Address line 2 |
| link |
InvenTreeURLField |
Link to address information (external) |
| postal_city |
CharField |
Postal code city/region |
| postal_code |
CharField |
Postal code |
| primary |
BooleanField |
Set as primary address |
| province |
CharField |
State or province |
| shipping_notes |
CharField |
Notes for shipping courier |
| title |
CharField |
Title describing the address entry |
Bom Item
Fields
| Variable |
Type |
Description |
| allow_variants |
BooleanField |
Stock items for variant parts can be used for this BOM item |
| attrition |
DecimalField |
Estimated attrition for a build, expressed as a percentage (0-100) |
| checksum |
CharField |
BOM line checksum |
| consumable |
BooleanField |
This BOM item is consumable (it is not tracked in build orders) |
| id |
AutoField |
ID |
| inherited |
BooleanField |
This BOM item is inherited by BOMs for variant parts |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| note |
CharField |
BOM item notes |
| optional |
BooleanField |
This BOM item is optional |
| part |
ForeignKey[part.models.Part] |
Select parent part |
| quantity |
DecimalField |
BOM quantity for this BOM item |
| raw_amount |
CharField |
Amount of sub-part consumed to produce one part |
| reference |
CharField |
BOM item reference |
| rounding_multiple |
DecimalField |
Round up required production quantity to nearest multiple of this value |
| setup_quantity |
DecimalField |
Extra required quantity for a build, to account for setup losses |
| sub_part |
ForeignKey[part.models.Part] |
Select part to be used in BOM |
| validated |
BooleanField |
This BOM item has been validated |
Fields
| Variable |
Type |
Description |
| company |
ForeignKey[company.models.Company] |
company |
| email |
EmailField |
email |
| id |
AutoField |
ID |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| name |
CharField |
name |
| phone |
CharField |
phone |
| role |
CharField |
role |
Owner
Fields
| Variable |
Type |
Description |
| id |
AutoField |
ID |
| owner_id |
PositiveIntegerField |
owner id |
| owner_type |
ForeignKey[django.contrib.contenttypes.models.ContentType] |
owner type |
Part Category
Fields
| Variable |
Type |
Description |
| _icon |
CharField |
Icon (optional) |
| default_keywords |
CharField |
Default keywords for parts in this category |
| default_location |
TreeForeignKey[stock.models.StockLocation] |
Default location for parts in this category |
| description |
CharField |
Description (optional) |
| id |
AutoField |
ID |
| level |
PositiveIntegerField |
level |
| lft |
PositiveIntegerField |
lft |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| name |
CharField |
Name |
| parent |
TreeForeignKey[part.models.PartCategory] |
parent |
| pathstring |
CharField |
Path |
| rght |
PositiveIntegerField |
rght |
| structural |
BooleanField |
Parts may not be directly assigned to a structural category, but may be assigned to child categories. |
| tree_id |
PositiveIntegerField |
tree id |
Properties
| Variable |
Type |
Description |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
| parentpath |
list |
Construct the parent path of this tree node. |
| path |
list |
Construct the complete part of this tree node. |
Project Code
Fields
| Variable |
Type |
Description |
| active |
BooleanField |
Is this project code active? |
| code |
CharField |
Unique project code |
| description |
CharField |
Project description |
| id |
AutoField |
ID |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| responsible |
ForeignKey[users.models.Owner] |
User or group responsible for this project |
Stock Location Type
Fields
| Variable |
Type |
Description |
| description |
CharField |
Description (optional) |
| icon |
CharField |
Default icon for all locations that have no icon set (optional) |
| id |
AutoField |
ID |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| name |
CharField |
Name |
Supplier Part
Fields
| Variable |
Type |
Description |
| SKU |
CharField |
Supplier stock keeping unit |
| active |
BooleanField |
Is this supplier part active? |
| availability_updated |
DateTimeField |
Date of last update of availability data |
| available |
DecimalField |
Quantity available from supplier |
| barcode_data |
CharField |
Third party barcode data |
| barcode_hash |
CharField |
Unique hash of barcode data |
| base_cost |
DecimalField |
Minimum charge (e.g. stocking fee) |
| description |
CharField |
Supplier part description |
| id |
AutoField |
ID |
| link |
InvenTreeURLField |
URL for external supplier part link |
| manufacturer_part |
ForeignKey[company.models.ManufacturerPart] |
Select manufacturer part |
| metadata |
JSONField |
JSON metadata field, for use by external plugins |
| multiple |
PositiveIntegerField |
Order multiple |
| note |
CharField |
Notes |
| notes |
InvenTreeNotesField |
Markdown notes (optional) |
| pack_quantity |
CharField |
Total quantity supplied in a single pack. Leave empty for single items. |
| pack_quantity_native |
RoundingDecimalField |
pack quantity native |
| packaging |
CharField |
Part packaging |
| part |
ForeignKey[part.models.Part] |
Select part |
| primary |
BooleanField |
Is this the primary supplier part for the linked Part? |
| supplier |
ForeignKey[company.models.Company] |
Select supplier |
| tags |
TaggableManager[taggit.models.Tag] |
A comma-separated list of tags. |
| updated |
DateTimeField |
Timestamp of last update |
Properties
| Variable |
Type |
Description |
| attachments |
report.mixins.QuerySet |
Return a queryset containing all attachments for this model. |
| barcode |
str |
Format a minimal barcode string (e.g. for label printing). |
| parameters |
report.mixins.QuerySet |
Return a QuerySet containing all the Parameter instances for this model. |
Tag
Fields
| Variable |
Type |
Description |
| id |
AutoField |
ID |
| name |
CharField |
name |
| slug |
SlugField |
slug |
User
Fields
| Variable |
Type |
Description |
| date_joined |
DateTimeField |
date joined |
| email |
EmailField |
email address |
| first_name |
CharField |
first name |
| groups |
ManyToManyField[django.contrib.auth.models.Group] |
The groups this user belongs to. A user will get all permissions granted to each of their groups. |
| id |
AutoField |
ID |
| is_active |
BooleanField |
Designates whether this user should be treated as active. Unselect this instead of deleting accounts. |
| is_staff |
BooleanField |
Designates whether the user can log into this admin site. |
| is_superuser |
BooleanField |
Designates that this user has all permissions without explicitly assigning them. |
| last_login |
DateTimeField |
last login |
| last_name |
CharField |
last name |
| password |
CharField |
password |
| user_permissions |
ManyToManyField[django.contrib.auth.models.Permission] |
Specific permissions for this user. |
| username |
CharField |
Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. |