mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-18 13:05:42 +00:00
fix trailing
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
# Create some fasteners
|
||||
# Create some fasteners
|
||||
|
||||
- model: part.part
|
||||
pk: 1
|
||||
|
@ -7,7 +7,7 @@ def create_thumbnails(apps, schema_editor):
|
||||
"""
|
||||
Create thumbnails for all existing Part images.
|
||||
|
||||
Note: This functionality is now performed in apps.py,
|
||||
Note: This functionality is now performed in apps.py,
|
||||
as running the thumbnail script here caused too many database level errors.
|
||||
|
||||
This migration is left here to maintain the database migration history
|
||||
|
@ -33,7 +33,7 @@ def migrate_currencies(apps, schema_editor):
|
||||
|
||||
# The 'suffix' field denotes the currency code
|
||||
response = cursor.execute('SELECT id, suffix, description from common_currency;')
|
||||
|
||||
|
||||
results = cursor.fetchall()
|
||||
|
||||
remap = {}
|
||||
@ -57,7 +57,7 @@ def migrate_currencies(apps, schema_editor):
|
||||
|
||||
# Now iterate through each PartSellPriceBreak and update the rows
|
||||
response = cursor.execute('SELECT id, cost, currency_id, price, price_currency from part_partsellpricebreak;')
|
||||
|
||||
|
||||
results = cursor.fetchall()
|
||||
|
||||
count = 0
|
||||
@ -93,7 +93,7 @@ def reverse_currencies(apps, schema_editor): # pragma: no cover
|
||||
|
||||
# Extract a list of currency codes which are in use
|
||||
response = cursor.execute(f'SELECT id, price, price_currency from part_partsellpricebreak;')
|
||||
|
||||
|
||||
results = cursor.fetchall()
|
||||
|
||||
codes_in_use = set()
|
||||
@ -124,7 +124,7 @@ def reverse_currencies(apps, schema_editor): # pragma: no cover
|
||||
|
||||
# Create a new object in the database
|
||||
print(f"Creating new Currency object for {code}")
|
||||
|
||||
|
||||
# Construct a query to create a new Currency object
|
||||
query = f"INSERT into common_currency (symbol, suffix, description, value, base) VALUES ('$', '{code}', '{description}', 1.0, False);"
|
||||
|
||||
|
@ -34,7 +34,7 @@
|
||||
<li><a class='dropdown-item' href='#' id='bom-item-delete'><span class='fas fa-trash-alt icon-red'></span> {% trans "Delete Items" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% include "filter_list.html" with id="bom" %}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -188,7 +188,7 @@
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
<table class='table table-striped table-condensed' data-toolbar='#part-button-toolbar' id='part-table'>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -221,9 +221,9 @@
|
||||
{% include "filter_list.html" with id="category" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed' id='subcategory-table' data-toolbar='#subcategory-button-toolbar'></table>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -255,7 +255,7 @@
|
||||
onPanelLoad('parameters', function() {
|
||||
loadParametricPartTable(
|
||||
"#parametric-part-table",
|
||||
{
|
||||
{
|
||||
category: {{ category.pk }},
|
||||
}
|
||||
);
|
||||
@ -341,7 +341,7 @@
|
||||
location.href = `/part/${data.pk}/`;
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
@ -66,14 +66,14 @@
|
||||
{% include "filter_list.html" with id="parttests" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#test-button-toolbar' id='test-template-table'></table>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#test-button-toolbar' id='test-template-table'></table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class='panel panel-hidden' id='panel-purchase-orders'>
|
||||
<div class='panel-heading'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
<div class='d-flex flex-wrap'>
|
||||
<h4>{% trans "Purchase Orders" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
@ -89,9 +89,9 @@
|
||||
{% include "filter_list.html" with id="partpurchaseorders" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed po-table' id='purchase-order-table' data-toolbar='#po-button-bar'>
|
||||
</table>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
<h4>{% trans "Sales Order Allocations" %}</h4>
|
||||
</div>
|
||||
<div class='panel-content'>
|
||||
|
||||
|
||||
<div id='sales-order-allocation-button-toolbar'>
|
||||
<div class='btn-group' role='group'>
|
||||
{% include "filter_list.html" with id="salesorderallocation" %}
|
||||
@ -167,7 +167,7 @@
|
||||
{% include "filter_list.html" with id="variants" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed' id='variants-table' data-toolbar='#variant-button-toolbar'>
|
||||
</table>
|
||||
</div>
|
||||
@ -268,7 +268,7 @@
|
||||
<li><a class='dropdown-item' href='#' id='validate-bom'><span class='fas fa-clipboard-check icon-green'></span> {% trans "Validate BOM" %}</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
{% if roles.part.change %}
|
||||
<button class='btn btn-success' type='button' title='{% trans "New BOM Item" %}' id='bom-item-new'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add BOM Item" %}
|
||||
@ -292,7 +292,7 @@
|
||||
{% include "filter_list.html" with id="usedin" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table table-striped table-condensed" id='used-table' data-toolbar='#assembly-button-toolbar'>
|
||||
</table>
|
||||
</div>
|
||||
@ -321,7 +321,7 @@
|
||||
{% include "filter_list.html" with id="build" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#build-button-toolbar' id='build-table'>
|
||||
</table>
|
||||
</div>
|
||||
@ -366,7 +366,7 @@
|
||||
{% include "filter_list.html" with id="supplier-part" %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<table class="table table-striped table-condensed" id='supplier-part-table' data-toolbar='#supplier-button-toolbar'>
|
||||
</table>
|
||||
</div>
|
||||
@ -397,7 +397,7 @@
|
||||
</div>
|
||||
<table class='table table-condensed table-striped' id='manufacturer-part-table' data-toolbar='#manufacturer-button-toolbar'></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
@ -432,21 +432,21 @@
|
||||
function reloadSupplierPartTable() {
|
||||
$('#supplier-part-table').bootstrapTable('refresh');
|
||||
}
|
||||
|
||||
|
||||
$('#supplier-create').click(function () {
|
||||
|
||||
|
||||
createSupplierPart({
|
||||
part: {{ part.pk }},
|
||||
onSuccess: reloadSupplierPartTable,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#supplier-part-delete").click(function() {
|
||||
|
||||
|
||||
var selections = $("#supplier-part-table").bootstrapTable("getSelections");
|
||||
|
||||
|
||||
var requests = [];
|
||||
|
||||
|
||||
showQuestionDialog(
|
||||
'{% trans "Delete Supplier Parts?" %}',
|
||||
'{% trans "All selected supplier parts will be deleted" %}',
|
||||
@ -454,10 +454,10 @@
|
||||
accept: function() {
|
||||
selections.forEach(function(part) {
|
||||
var url = `/api/company/part/${part.pk}/`;
|
||||
|
||||
|
||||
requests.push(inventreeDelete(url));
|
||||
});
|
||||
|
||||
|
||||
$.when.apply($, requests).done(function() {
|
||||
reloadSupplierPartTable();
|
||||
});
|
||||
@ -465,7 +465,7 @@
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
loadSupplierPartTable(
|
||||
"#supplier-part-table",
|
||||
"{% url 'api-supplier-part-list' %}",
|
||||
@ -478,9 +478,9 @@
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
linkButtonsToSelection($("#supplier-part-table"), ['#supplier-part-options']);
|
||||
|
||||
|
||||
loadManufacturerPartTable(
|
||||
'#manufacturer-part-table',
|
||||
"{% url 'api-manufacturer-part-list' %}",
|
||||
@ -492,22 +492,22 @@
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
linkButtonsToSelection($("#manufacturer-part-table"), ['#manufacturer-part-options']);
|
||||
|
||||
|
||||
$("#manufacturer-part-delete").click(function() {
|
||||
|
||||
|
||||
var selections = $("#manufacturer-part-table").bootstrapTable("getSelections");
|
||||
|
||||
|
||||
deleteManufacturerParts(selections, {
|
||||
onSuccess: function() {
|
||||
onSuccess: function() {
|
||||
$("#manufacturer-part-table").bootstrapTable("refresh");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('#manufacturer-create').click(function () {
|
||||
|
||||
|
||||
createManufacturerPart({
|
||||
part: {{ part.pk }},
|
||||
onSuccess: function() {
|
||||
@ -526,7 +526,7 @@
|
||||
part: {{ part.pk }},
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
loadBuildTable($("#build-table"), {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
@ -542,7 +542,7 @@
|
||||
}
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
||||
});
|
||||
|
||||
// Load the "sales orders" tab
|
||||
@ -686,7 +686,7 @@
|
||||
|
||||
$('.delete-related-part').click(function() {
|
||||
var button = $(this);
|
||||
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
reload: true,
|
||||
});
|
||||
@ -698,7 +698,7 @@
|
||||
loadPartVariantTable($('#variants-table'), {{ part.pk }});
|
||||
|
||||
$('#new-variant').click(function() {
|
||||
|
||||
|
||||
duplicatePart(
|
||||
{{ part.pk}},
|
||||
{
|
||||
@ -732,7 +732,7 @@
|
||||
params: {
|
||||
part: {{ part.id }},
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@ -762,7 +762,7 @@
|
||||
part: {{ part.pk }},
|
||||
}
|
||||
}
|
||||
);
|
||||
);
|
||||
|
||||
// Callback for "add test template" button
|
||||
$("#add-test-template").click(function() {
|
||||
@ -799,7 +799,7 @@
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
loadStockTable($("#stock-table"), {
|
||||
params: {
|
||||
part: {{ part.id }},
|
||||
@ -825,7 +825,7 @@
|
||||
|
||||
onPanelLoad("part-parameters", function() {
|
||||
loadPartParameterTable(
|
||||
'#parameter-table',
|
||||
'#parameter-table',
|
||||
'{% url "api-part-parameter-list" %}',
|
||||
{
|
||||
params: {
|
||||
@ -833,13 +833,13 @@
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
$('#param-table').inventreeTable({
|
||||
});
|
||||
|
||||
|
||||
{% if roles.part.add %}
|
||||
$('#param-create').click(function() {
|
||||
|
||||
|
||||
constructForm('{% url "api-part-parameter-list" %}', {
|
||||
method: 'POST',
|
||||
fields: {
|
||||
@ -857,18 +857,18 @@
|
||||
});
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
|
||||
$('.param-edit').click(function() {
|
||||
var button = $(this);
|
||||
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
reload: true,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$('.param-delete').click(function() {
|
||||
var button = $(this);
|
||||
|
||||
|
||||
launchModalForm(button.attr('url'), {
|
||||
reload: true,
|
||||
});
|
||||
@ -887,7 +887,7 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
enableDragAndDrop(
|
||||
'#attachment-dropzone',
|
||||
'{% url "api-part-attachment-list" %}',
|
||||
@ -962,7 +962,7 @@
|
||||
}
|
||||
var StockPriceChart = loadStockPricingChart($('#StockPriceChart'), purchasepricedata)
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if bom_parts %}
|
||||
var bom_colors = randomColor({hue: 'green', count: {{ bom_parts|length }} })
|
||||
var bomdata = {
|
||||
|
@ -153,7 +153,7 @@
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
|
||||
{% include "spacer.html" %}
|
||||
|
||||
<button type='button' class='btn btn-outline-secondary' data-bs-toggle='collapse' href='#collapse-part-details' role='button' id='toggle-details-button'>
|
||||
@ -574,7 +574,7 @@
|
||||
$('#toggle-details-button').html('{% trans "Hide Part Details" %}');
|
||||
inventreeSave('show-part-details', true);
|
||||
});
|
||||
|
||||
|
||||
// Callback function when the "part details" panel is hidden
|
||||
$('#collapse-part-details').on('hide.bs.collapse', function() {
|
||||
$('#toggle-details-button').html('{% trans "Show Part Details" %}');
|
||||
@ -587,6 +587,6 @@
|
||||
|
||||
$('#serial-number-search').click(function() {
|
||||
findStockItemBySerialNumber({{ part.pk }});
|
||||
});
|
||||
});
|
||||
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
@ -45,7 +45,7 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if part.assembly and part.bom_count > 0 %}
|
||||
{% if min_total_bom_price %}
|
||||
<tr>
|
||||
@ -98,7 +98,7 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if show_internal_price and roles.sales_order.view %}
|
||||
{% if total_internal_part_price %}
|
||||
<tr>
|
||||
@ -113,7 +113,7 @@
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if total_part_price %}
|
||||
<tr>
|
||||
<td><strong>{% trans 'Sale Price' %}</strong>
|
||||
@ -155,11 +155,11 @@
|
||||
{% if part.purchaseable and roles.purchase_order.view %}
|
||||
<a class="anchor" id="supplier-cost"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Supplier Cost" %}
|
||||
<h4>{% trans "Supplier Cost" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='panel-content'>
|
||||
<div class="row">
|
||||
<div class="col col-md-6">
|
||||
@ -176,7 +176,7 @@
|
||||
{% if show_price_history %}
|
||||
<a class="anchor" id="purchase-price"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Purchase Price" %}
|
||||
<h4>{% trans "Purchase Price" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
@ -200,11 +200,11 @@
|
||||
{% if show_internal_price and roles.sales_order.view %}
|
||||
<a class="anchor" id="internal-cost"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Internal Cost" %}
|
||||
<h4>{% trans "Internal Cost" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='panel-content'>
|
||||
<div class="row full-height">
|
||||
<div class="col col-md-8">
|
||||
@ -218,7 +218,7 @@
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add Internal Price Break" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed' id='internal-price-break-table' data-toolbar='#internal-price-break-toolbar'
|
||||
data-sort-name="quantity" data-sort-order="asc">
|
||||
</table>
|
||||
@ -230,11 +230,11 @@
|
||||
{% if part.has_bom and roles.sales_order.view %}
|
||||
<a class="anchor" id="bom-cost"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "BOM Cost" %}
|
||||
<h4>{% trans "BOM Cost" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='panel-content'>
|
||||
<div class="row">
|
||||
<div class="col col-md-6">
|
||||
@ -256,11 +256,11 @@
|
||||
{% if part.salable and roles.sales_order.view %}
|
||||
<a class="anchor" id="sale-cost"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Sale Cost" %}
|
||||
<h4>{% trans "Sale Cost" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='panel-content'>
|
||||
<div class="row full-height">
|
||||
<div class="col col-md-8">
|
||||
@ -274,7 +274,7 @@
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Add Price Break" %}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
<table class='table table-striped table-condensed' id='price-break-table' data-toolbar='#price-break-toolbar'
|
||||
data-sort-name="quantity" data-sort-order="asc">
|
||||
</table>
|
||||
@ -285,11 +285,11 @@
|
||||
{% if show_price_history %}
|
||||
<a class="anchor" id="sale-price"></a>
|
||||
<div class='panel-heading'>
|
||||
<h4>{% trans "Sale Price" %}
|
||||
<h4>{% trans "Sale Price" %}
|
||||
<a href="#overview" title='{% trans "Jump to overview" %}'><span class="fas fa-level-up-alt"></span></a>
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
|
||||
<div class='panel-content'>
|
||||
{% if sale_history|length > 0 %}
|
||||
<div style="max-width: 99%; min-height: 300px">
|
||||
@ -303,4 +303,3 @@
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
Reference in New Issue
Block a user