{% extends 'bom/bom-base.html' %} {% load static %} {% load materializecss %} {% block head-title %}{{ title }}{% endblock %} {% block bom-menu %}{% endblock %} {% block content %}
{% if profile.role == 'A' %}

Upload a CSV to populate or update a Bill of Materials. Parts and revisions are created if they don't exist, or updated if they do. Released revisions are added to BOMs as they are: their part details and their own BOMs are left unchanged. Obsolete revisions are skipped. You'll see a preview of every change, and nothing is saved until you confirm it.

When a sub-assembly has rows beneath it in the file, its BOM is set to match those rows: subparts are added, quantities are updated, and subparts not in the file are removed. A sub-assembly listed without rows beneath it is left as it is.

In addition to uploading parts, uploading a bill of materials: associates parts to create assemblies, and adds quantities to specify how many parts are in an assembly.

{% if organization.number_scheme == 'S' %} Download a Sample CSV {% else %} Download a Sample CSV {% endif %}

Required columns
part_number or
manufacturer_part_number
Identifies the subpart. The part must already exist when using manufacturer_part_number.
quantity Also accepted: count, qty. Defaults to 1 if empty.
level Nesting depth (1 = direct child). Required unless a Parent part number is given below, in which case all rows are treated as level 1.
Optional columns
reference Also accepted: designator. Comma-separated list (e.g. R1, R2). Count must match quantity.
do_not_load Also accepted: dnl, dnp. Mark as Do Not Load. Values: y, x, yes, true.
revision Also accepted: rev. Target revision. Defaults to 1 if omitted.
description Part description. Up to 255 characters.
{% csrf_token %}
Choose file {{ bom_csv_form.file }}
{{ bom_csv_form.file.errors }}
{{ upload_bom_form.parent_part_number|materializecss:'s12' }}

Optional. Attach all rows as direct children of this assembly. Omit when the CSV includes a level column. Add to BOM keeps its existing subparts and adds to their quantities; Replace BOM sets its BOM to match the file. {% if parent_part %}
Go to {{ parent_part_number }} {% endif %}

{% else %} {% include 'bom/nothing-to-see.html' with required_privilege='Admin' %} {% endif %}
{% endblock %}