{% extends 'base.html' %} {% load crispy_forms_tags %} {% block title %}{{ title }}{% endblock %} {% block content %}

{{ title }}

Back to BOM List
Bill of Materials Information
{% csrf_token %} {# Use dynamic form for both creation and editing #}
{% if main_form %} {{ main_form.manufactured_product|as_crispy_field }} {% else %} {{ form.manufactured_product|as_crispy_field }} {% endif %}
Components
{% if component_formset %} {{ component_formset.management_form }}
{% for component_form in component_formset %}
Component #{{ forloop.counter }}
{% if forloop.counter > 1 %} {% endif %}
{{ component_form.component|as_crispy_field }}
{{ component_form.quantity|as_crispy_field }}
{{ component_form.unit|as_crispy_field }}
{% endfor %}
{% else %} {# Single BOM form for backward compatibility #}
{{ form.component|as_crispy_field }}
{{ form.quantity|as_crispy_field }}
{{ form.unit|as_crispy_field }}
{% endif %}
Cancel
BOM Tips
  • Select the manufactured product and component
  • Enter the exact quantity needed
  • Unit of measurement is automatically populated
  • {% if component_formset %}
  • Add multiple components dynamically
  • Remove components you don't need
  • {% endif %}
{% endblock %} {% block extra_js %} {% endblock %}