2
0
mirror of https://github.com/inventree/inventree-docs.git synced 2025-04-27 21:26:43 +00:00

Added context variables fo user model (#404)

* started python API reference guide

* Added test to the API reference guide

* Added Price break

* added context variables to the build section

* Cleand up build section and added new example

* Fine tuning

* fixed picture

* removed unfinished python reference guide

* Added allocated_stock to the build rreport

* Added contect variables for user model

* Added link to user in build.md
This commit is contained in:
Michael 2022-12-18 13:43:00 +01:00 committed by GitHub
parent c2fc58f333
commit 244470fd8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 3 deletions

View File

@ -34,10 +34,10 @@ The following variables are accessed by build.variable
| can_complete | Boolean that tells if the build can be completed ( all material allocated)|
| creation_date | Date where the build has been created |
| completion_date | Date the build was completed (or, if incomplete, the expected date of completion) |
| completed_by | User that completed the build |
| completed_by | The [User](./context_variables.md#user) that completed the build |
| is_overdue | Boolean that tells if the build is overdue |
| is_complete | Boolean that tells if the build is complete |
| issued_by | User who created the build |
| issued_by | The [User](./context_variables.md#user) who created the build |
| link | External URL for extra information |
| notes | Text notes |
| parent | Reference to a parent build object if this is a sub build |
@ -45,7 +45,7 @@ The following variables are accessed by build.variable
| quantity | Build order quantity |
| reference | Build order reference (required, must be unique) |
| required_parts | A query set with all parts that are required for the build |
| responsible | User (or group) responsible for completing the build |
| responsible | Owner responsible for completing the build. This can be a user or a group. Depending on that further context variables differ |
| sales_order | References to a [Sales Order](./context_variables.md#salesorder) object for which this build is required (e.g. the output of this build will be used to fulfil a sales order) |
| status | The status of the build. 20 means 'Production' |
| sub_build_count | Number of sub builds |

View File

@ -231,3 +231,14 @@ Each part object has access to a lot of context variables about the part. The fo
| prefix | Purchase Order reference prefix |
| reference | The reference number |
| title | The title of the order |
#### user
| Variable | Description |
|----------|-------------|
| username | the username of the user |
| fist_name | The first name of the user |
| last_name | The last name of the user |
| email | The email address of the user |
| pk | The primary key of the user |