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

Add picklist example (#412)

* 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
This commit is contained in:
Michael 2023-01-02 12:09:09 +01:00 committed by GitHub
parent e5d388d9ad
commit 65773f0706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -76,6 +76,7 @@ will result in the first part of the list. Each query set has again its own cont
| --- | --- |
| .bom_item | The bom item where this part belongs to |
| .stock_item | The allocated [StockItem](./context_variables.md#stockitem) |
| .quantity | The number of components needed for the build (components in BOM x parts to build) |
### Example

View File

@ -6,3 +6,49 @@ title: Packing List Report
!!! missing "TODO"
This section requires further work
## Pick List
When all material has been allocated someone has to pick all things from the warehouse.
In case you need a printed pick list you can use the following template. This it just the
table. All other info and CSS has been left out for simplicity. Please have a look at the
BOM report for details.
{% raw %}
```html
<table class='changes-table'>
<thead>
<tr>
<th>Original IPN</th>
<th>Allocated Part</th>
<th>Location</th>
<th>PCS</th>
</tr>
</thead>
<tbody>
{% for line in build.allocated_stock.all %}
<tr>
<td> {{ line.bom_item.sub_part.IPN }} </td>
{% if line.stock_item.part.IPN != line.bom_item.sub_part.IPN %}
<td class='chg'> {{ line.stock_item.part.IPN }} </td>
{% else %}
<td> {{ line.stock_item.part.IPN }} </td>
{% endif %}
<td> {{ line.stock_item.location.pathstring }} </td>
<td> {{ line.quantity }} </td>
</tr>
{% endfor %}
</tbody>
</table>
```
{% endraw %}
Here we have a loop that runs through all allocated parts for the build. For each part
we list the original IPN from the BOM and the IPN of the allocated part. These can differ
in case you have substitutes or template/variants in the BOM. In case the parts differ
we use a different format for the table cell e.g. print bold font or red color.
For the picker we list the full path names of the stock locations and the quantity
that is needed for the build. This will result in the following printout:
{% with id="report-options", url="report/picklist.png", description="Picklist Example" %} {% include "img.html" %} {% endwith %}