{% load i18n plmapp_tags %} {% block content %} {% include "parts/bom_thead.html" %} {% with documents|key:obj.id as documents %} {% include "parts/bom_docs.html" %} {% endwith %} {# alternates #} {% with alternates|key:obj.id as alternates %} {% with c.level|add:1 as level %} {% include "parts/bom_alt.html" %} {% endwith %} {% endwith %} {% for c in children %} {% with c.link as link %} {% with link.child as child %} {% for field, verbose_name in extra_columns %} {% endfor %} {% endwith %} {% endwith %} {# documents #} {% with documents|key:c.link.child_id as documents %} {% with c.level|add:1 as level %} {% include "parts/bom_docs.html" %} {% endwith %} {% endwith %} {# alternates #} {% with alternates|key:c.link.child_id as alternates %} {% with c.level|add:1 as level %} {% include "parts/bom_alt.html" %} {% endwith %} {% endwith %} {% endfor %}
{% if documents|key:c.link.child_id or alternates|key:c.link.child_id %} {{c.level}} {% else %} {% if forloop.last or level == "last" %} {{c.level}} {% else %} {% with forloop.counter as next %} {% with children|indice:next as ci%} {% if ci.level > c.level %} {{c.level}} {% else %} {{c.level}} {% endif %} {% endwith %} {% endwith %} {% endif %} {% endif %} {{ link.order }} {{ link.quantity }} {{ link.get_unit_display }} {{ child.reference }} {{ child.revision }} {{ child.type }} {{ child.name }} {{ extension_data|key:link.id|key:field }} {{ child.state.name }} {{ states|key:child.id }}
{% endblock %}