From c0dc36ced688ee39628b99d0adb63576bae07d59 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 25 Jan 2023 02:50:58 +0100 Subject: [PATCH] Added variables for stock location (#423) * 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 * Fixed misunderstanding of can_complete * Added context variables for Suppliers * Fixed typos * Added example for a warehouse pick list * Added path trick to the picklist example * Corrected typo * Added context variables for stock locations * changed some wordings --- docs/report/context_variables.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/report/context_variables.md b/docs/report/context_variables.md index cfd67d4..9f7c369 100644 --- a/docs/report/context_variables.md +++ b/docs/report/context_variables.md @@ -150,8 +150,16 @@ Each part object has access to a lot of context variables about the part. The fo | Variable | Description | |----------|-------------| -| barcode | Brief payload data (e.g. for labels) | -| item_count | Simply returns the number of stock items in this location. | +| barcode | Brief payload data (e.g. for labels). Example: {"stocklocation": 826} where 826 is the primary key| +| description | The description of the location | +| icon | The name of the icon if set, e.g. fas fa-warehouse | +| item_count | Simply returns the number of stock items in this location | +| name | The name of the location. This is only the name of this location, not the path | +| owner | The owner of the location if it has one. The owner can only be assigned in the admin interface | +| parent | The parent location. Returns None if it is already the top most one | +| path | A queryset of locations that contains the hierarchy starting from the top most parent | +| path_string | A string that contains all names of the path separated by slashes e.g. A/B/C | +| structural | True if the location is structural | ### Suppliers