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

Merge pull request #2477 from SchrodingersGat/duplicate-bom-form

Duplicate bom form
This commit is contained in:
Oliver
2021-12-21 23:06:44 +11:00
committed by GitHub
12 changed files with 271 additions and 216 deletions

View File

@@ -1,17 +0,0 @@
{% extends "modal_form.html" %}
{% load i18n %}
{% block pre_form_content %}
<p>
{% trans "Select parent part to copy BOM from" %}
</p>
{% if part.has_bom %}
<div class='alert alert-block alert-danger'>
<strong>{% trans "Warning" %}</strong><br>
{% trans "This part already has a Bill of Materials" %}<br>
</div>
{% endif %}
{% endblock %}

View File

@@ -1,12 +0,0 @@
{% extends "modal_form.html" %}
{% load i18n %}
{% block pre_form_content %}
{% blocktrans with part.full_name as part %}Confirm that the Bill of Materials (BOM) is valid for:<br><em>{{ part }}</em>{% endblocktrans %}
<div class='alert alert-warning alert-block'>
{% trans 'This will validate each line in the BOM.' %}
</div>
{% endblock %}

View File

@@ -585,14 +585,12 @@
});
$('#bom-duplicate').click(function() {
launchModalForm(
"{% url 'duplicate-bom' part.id %}",
{
success: function() {
$('#bom-table').bootstrapTable('refresh');
}
duplicateBom({{ part.pk }}, {
success: function(response) {
$('#bom-table').bootstrapTable('refresh');
}
);
});
});
$("#bom-item-new").click(function () {
@@ -616,12 +614,10 @@
});
$("#validate-bom").click(function() {
launchModalForm(
"{% url 'bom-validate' part.id %}",
{
reload: true,
}
);
validateBom({{ part.id }}, {
reload: true
});
});
$("#download-bom").click(function () {