{% extends "page_base.html" %} {% load static %} {% load i18n %} {% load inventree_extras %} {% block page_title %} {% inventree_title %} | {% trans "Supplier List" %} {% endblock %} {% block heading %} {{ title }} {% endblock %} {% block actions %} {% if pagetype == 'manufacturers' and roles.purchase_order.add or pagetype == 'suppliers' and roles.purchase_order.add or pagetype == 'customers' and roles.sales_order.add %} {% endif %} {% endblock %} {% block page_info %}
{% endblock %} {% block js_ready %} {{ block.super }} $('#new-company').click(function() { var fields = companyFormFields(); // Field overrides fields.is_supplier.value = {% if pagetype == 'suppliers' %}true{% else %}false{% endif %}; fields.is_manufacturer.value = {% if pagetype == 'manufacturers' %}true{% else %}false{% endif %}; fields.is_customer.value = {% if pagetype == 'customers' %}true{% else %}false{% endif %}; createCompany({ fields: fields, }); }); loadCompanyTable("#company-table", "{% url 'api-company-list' %}", { pagetype: '{{ pagetype }}', params: { {% for key,value in filters.items %}{{ key }}: "{{ value }}",{% endfor %} } } ); {% endblock %}