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:
@@ -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";
|
||||
});
|
||||
|
5
InvenTree/part/templates/part/bom_validate.html
Normal file
5
InvenTree/part/templates/part/bom_validate.html
Normal 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 %}
|
Reference in New Issue
Block a user