2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-08-14 15:41:10 +00:00

Add a form/view/etc for BOM validation

This commit is contained in:
Oliver Walters
2019-05-12 16:27:50 +10:00
parent c7f0d56be4
commit e3a9a70678
6 changed files with 77 additions and 14 deletions

View File

@@ -39,6 +39,9 @@
<span class='caret'></span>
</button>
<ul class='dropdown-menu'>
{% if part.is_bom_valid == False %}
<li><a href='#' id='validate-bom' title='Validate BOM'>Validate BOM</a></li>
{% endif %}
<li><a href='#' id='edit-bom' title='Edit BOM'>Edit BOM</a></li>
<li><a href='#' id='export-bom' title='Export BOM'>Export BOM</a></li>
</ul>
@@ -87,6 +90,15 @@
{% else %}
$("#validate-bom").click(function() {
launchModalForm(
"{% url 'bom-validate' part.id %}",
{
reload: true,
}
);
});
$("#edit-bom").click(function () {
location.href = "{% url 'part-bom' part.id %}?edit=True";
});

View File

@@ -0,0 +1,5 @@
{% extends "modal_form.html" %}
{% block pre_form_content %}
Confirm that the Bill of Materials (BOM) is valid for:<br><i>{{ part.full_name }}</i>
{% endblock %}