mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add build orders to search results list
This commit is contained in:
parent
14000517ce
commit
979f543c3f
@ -51,7 +51,7 @@ class BuildList(generics.ListCreateAPIView):
|
||||
search_fields = [
|
||||
'reference',
|
||||
'part__name',
|
||||
'description',
|
||||
'title',
|
||||
]
|
||||
|
||||
def get_queryset(self):
|
||||
|
@ -33,7 +33,6 @@ loadBuildTable($('#sub-build-table'), {
|
||||
url: '{% url "api-build-list" %}',
|
||||
filterTarget: "#filter-list-sub-build",
|
||||
params: {
|
||||
part_detail: true,
|
||||
ancestor: {{ build.pk }},
|
||||
}
|
||||
});
|
||||
|
@ -179,9 +179,6 @@ $("#new-build").click(function() {
|
||||
|
||||
loadBuildTable($("#build-table"), {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
part_detail: "true",
|
||||
},
|
||||
});
|
||||
|
||||
$('#multi-build-print').click(function() {
|
||||
|
@ -27,7 +27,6 @@ loadBuildTable($("#builds-table"), {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
sales_order: {{ order.id }},
|
||||
part_detail: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
@ -43,7 +43,6 @@
|
||||
loadBuildTable($("#build-table"), {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
part_detail: "true",
|
||||
part: {{ part.id }},
|
||||
}
|
||||
});
|
||||
|
@ -185,7 +185,6 @@ addHeaderAction('build-overdue', '{% trans "Overdue Build Orders" %}', 'fa-calen
|
||||
loadBuildTable("#table-build-pending", {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
part_detail: true,
|
||||
active: true,
|
||||
},
|
||||
disableFilters: true,
|
||||
@ -194,7 +193,6 @@ loadBuildTable("#table-build-pending", {
|
||||
loadBuildTable("#table-build-overdue", {
|
||||
url: "{% url 'api-build-list' %}",
|
||||
params: {
|
||||
part_detail: true,
|
||||
overdue: true,
|
||||
},
|
||||
disableFilters: true,
|
||||
|
@ -162,6 +162,20 @@ InvenTree | {% trans "Search Results" %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if roles.build.view %}
|
||||
|
||||
addItemTitle('{% trans "Build" %}');
|
||||
|
||||
addItem('build-order', '{% trans "Build Orders" %}', 'fa-tools');
|
||||
|
||||
loadBuildTable('#table-build-order', {
|
||||
params: {
|
||||
search: '{{ query }}',
|
||||
}
|
||||
});
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if roles.stock.view %}
|
||||
addItemTitle('{% trans "Stock" %}');
|
||||
|
||||
|
@ -609,6 +609,8 @@ function loadBuildTable(table, options) {
|
||||
var params = options.params || {};
|
||||
|
||||
var filters = {};
|
||||
|
||||
params['part_detail'] = true;
|
||||
|
||||
if (!options.disableFilters) {
|
||||
filters = loadTableFilters("build");
|
||||
@ -618,6 +620,8 @@ function loadBuildTable(table, options) {
|
||||
filters[key] = params[key];
|
||||
}
|
||||
|
||||
options.url = options.url || '{% url "api-build-list" %}';
|
||||
|
||||
var filterTarget = options.filterTarget || null;
|
||||
|
||||
setupFilterList("build", table, filterTarget);
|
||||
|
Loading…
Reference in New Issue
Block a user