2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 13:58:47 +00:00

Merge pull request #1763 from eeintech/stock_table_supplier_part_detail

Fixed supplier part detail handling in stock table
This commit is contained in:
Oliver 2021-07-07 07:53:04 +10:00 committed by GitHub
commit 1dbdcb6d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 2 deletions

View File

@ -23,7 +23,7 @@
params: { params: {
company: {{ company.id }}, company: {{ company.id }},
part_detail: true, part_detail: true,
supplier_detail: true, supplier_part_detail: true,
location_detail: true, location_detail: true,
}, },
buttons: [ buttons: [

View File

@ -25,7 +25,7 @@ loadStockTable($("#stock-table"), {
params: { params: {
purchase_order: {{ order.id }}, purchase_order: {{ order.id }},
part_detail: true, part_detail: true,
supplier_detail: true, supplier_part_detail: true,
location_detail: true, location_detail: true,
}, },
buttons: [ buttons: [

View File

@ -265,6 +265,7 @@
{% endif %} {% endif %}
part_detail: true, part_detail: true,
location_detail: true, location_detail: true,
supplier_part_detail: true,
}, },
url: "{% url 'api-stock-list' %}", url: "{% url 'api-stock-list' %}",
}); });

View File

@ -688,6 +688,8 @@ function loadStockTable(table, options) {
{ {
field: 'supplier_part', field: 'supplier_part',
title: '{% trans "Supplier Part" %}', title: '{% trans "Supplier Part" %}',
visible: params['supplier_part_detail'] || false,
switchable: params['supplier_part_detail'] || false,
formatter: function(value, row) { formatter: function(value, row) {
if (!value) { if (!value) {
return '-'; return '-';