Skip to content

Packing List

Packing List


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.

<table class='changes-table'>
      <th>Original IPN</th>
      <th>Allocated Part</th>
  {% for line in build.allocated_stock.all %}
      <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>
  {% endfor %}

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:

Picklist Example Picklist Example

For those of you who would like to replace the "/" by something else because it is hard to read in some fonts use the following trick:

 <td> {% for loc in line.stock_item.location.path %}{{ }}{% if not forloop.last %}-{% endif %}{% endfor %} </td>

Here we use location.path which is a query set that contains the location path up to the topmost parent. We use a loop to cycle through that and print the .name of the entry followed by a "-". The foorloop.last is a Django trick that allows us to not print the "-" after the last entry. The result looks like here:

Picklist Example Picklist Example

Finally added a |floatformat:0 to the quantity that removes the trailing zeros.

Last update: January 9, 2023