From 5160165669e2d73e50e881d58d7093254268dab1 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:19:34 +1000 Subject: [PATCH 01/10] Add endpoint for dynamic javascript files --- .../InvenTree/static/script/inventree/part.js | 242 ------------------ InvenTree/InvenTree/urls.py | 2 + InvenTree/InvenTree/views.py | 12 + InvenTree/templates/base.html | 2 + InvenTree/templates/js/part.js | 227 ++++++++++++++++ 5 files changed, 243 insertions(+), 242 deletions(-) create mode 100644 InvenTree/templates/js/part.js diff --git a/InvenTree/InvenTree/static/script/inventree/part.js b/InvenTree/InvenTree/static/script/inventree/part.js index 92460a51a7..64849a30a6 100644 --- a/InvenTree/InvenTree/static/script/inventree/part.js +++ b/InvenTree/InvenTree/static/script/inventree/part.js @@ -2,22 +2,6 @@ * Requires api.js to be loaded first */ -function getPartCategoryList(filters={}, options={}) { - return inventreeGet('/api/part/category/', filters, options); -} - -function getSupplierPartList(filters={}, options={}) { - return inventreeGet('/api/part/supplier/', filters, options); -} - -function getPartList(filters={}, options={}) { - return inventreeGet('/api/part/', filters, options); -} - -function getBomList(filters={}, options={}) { - return inventreeGet('/api/bom/', filters, options); -} - function toggleStar(options) { /* Toggle the 'starred' status of a part. * Performs AJAX queries and updates the display on the button. @@ -72,230 +56,4 @@ function toggleStar(options) { }, } ); -} - -function loadPartTable(table, url, options={}) { - /* Load part listing data into specified table. - * - * Args: - * - table: HTML reference to the table - * - url: Base URL for API query - * - options: object containing following (optional) fields - * checkbox: Show the checkbox column - * query: extra query params for API request - * buttons: If provided, link buttons to selection status of this table - * disableFilters: If true, disable custom filters - */ - - // Ensure category detail is included - options.params['category_detail'] = true; - - var params = options.params || {}; - - var filters = {}; - - if (!options.disableFilters) { - filters = loadTableFilters("parts"); - } - - for (var key in params) { - filters[key] = params[key]; - } - - setupFilterList("parts", $(table)); - - var columns = [ - { - field: 'pk', - title: 'ID', - visible: false, - } - ]; - - if (options.checkbox) { - columns.push({ - checkbox: true, - title: 'Select', - searchable: false, - }); - } - - columns.push({ - field: 'name', - title: 'Part', - sortable: true, - formatter: function(value, row, index, field) { - - var name = ''; - - if (row.IPN) { - name += row.IPN; - name += ' | '; - } - - name += value; - - if (row.revision) { - name += ' | '; - name += row.revision; - } - - if (row.is_template) { - name = '' + name + ''; - } - - var display = imageHoverIcon(row.thumbnail) + renderLink(name, '/part/' + row.pk + '/'); - - if (row.is_template) { - display += ``; - } - - if (row.assembly) { - display += ``; - } - - if (row.starred) { - display += ``; - } - - if (row.salable) { - display += ``; - } - - /* - if (row.component) { - display = display + ``; - } - */ - - if (!row.active) { - display += `INACTIVE`; - } - return display; - } - }); - - columns.push({ - sortable: true, - field: 'description', - title: 'Description', - formatter: function(value, row, index, field) { - - if (row.is_template) { - value = '' + value + ''; - } - - return value; - } - }); - - columns.push({ - sortable: true, - field: 'category_detail', - title: 'Category', - formatter: function(value, row, index, field) { - if (row.category) { - return renderLink(value.pathstring, "/part/category/" + row.category + "/"); - } - else { - return 'No category'; - } - } - }); - - columns.push({ - field: 'in_stock', - title: 'Stock', - searchable: false, - sortable: true, - formatter: function(value, row, index, field) { - var link = "stock"; - - if (value) { - // There IS stock available for this part - - // Is stock "low" (below the 'minimum_stock' quantity)? - if (row.minimum_stock && row.minimum_stock > value) { - value += "Low stock"; - } - - } else if (row.on_order) { - // There is no stock available, but stock is on order - value = "0On Order : " + row.on_order + ""; - link = "orders"; - } else if (row.building) { - // There is no stock available, but stock is being built - value = "0Building : " + row.building + ""; - link = "builds"; - } else { - // There is no stock available - value = "0No Stock"; - } - - return renderLink(value, '/part/' + row.pk + "/" + link + "/"); - } - }); - - $(table).inventreeTable({ - url: url, - sortName: 'name', - method: 'get', - queryParams: filters, - groupBy: false, - original: params, - formatNoMatches: function() { return "No parts found"; }, - columns: columns, - }); - - if (options.buttons) { - linkButtonsToSelection($(table), options.buttons); - } - - /* Button callbacks for part table buttons */ - - $("#multi-part-order").click(function() { - var selections = $(table).bootstrapTable("getSelections"); - - var parts = []; - - selections.forEach(function(item) { - parts.push(item.pk); - }); - - launchModalForm("/order/purchase-order/order-parts/", { - data: { - parts: parts, - }, - }); - }); - - $("#multi-part-category").click(function() { - var selections = $(table).bootstrapTable("getSelections"); - - var parts = []; - - selections.forEach(function(item) { - parts.push(item.pk); - }); - - launchModalForm("/part/set-category/", { - data: { - parts: parts, - }, - reload: true, - }); - }); - - $('#multi-part-export').click(function() { - var selections = $(table).bootstrapTable("getSelections"); - - var parts = ''; - - selections.forEach(function(item) { - parts += item.pk; - parts += ','; - }); - - location.href = '/part/export/?parts=' + parts; - }); } \ No newline at end of file diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index cf53667fb9..a3a8950401 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -35,6 +35,7 @@ from rest_framework.documentation import include_docs_urls from .views import IndexView, SearchView, DatabaseStatsView from .views import SettingsView, EditUserView, SetPasswordView +from .views import DynamicJsView from .api import InfoView, BarcodePluginView, ActionPluginView @@ -74,6 +75,7 @@ settings_urls = [ ] dynamic_javascript_urls = [ + url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'), ] urlpatterns = [ diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 943a18d35c..400981eb17 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -514,6 +514,18 @@ class SearchView(TemplateView): return super(TemplateView, self).render_to_response(context) +class DynamicJsView(TemplateView): + """ + View for returning javacsript files, + which instead of being served dynamically, + are passed through the django translation engine! + """ + + template_name = "" + content_type = 'text/javascript' + + + class SettingsView(TemplateView): """ View for configuring User settings """ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index bf5fa4a1c3..9d8f650c69 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -114,6 +114,8 @@ InvenTree + + diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js new file mode 100644 index 0000000000..aea67065ca --- /dev/null +++ b/InvenTree/templates/js/part.js @@ -0,0 +1,227 @@ +{% load i18n %} + +function loadPartTable(table, url, options={}) { + /* Load part listing data into specified table. + * + * Args: + * - table: HTML reference to the table + * - url: Base URL for API query + * - options: object containing following (optional) fields + * checkbox: Show the checkbox column + * query: extra query params for API request + * buttons: If provided, link buttons to selection status of this table + * disableFilters: If true, disable custom filters + */ + + // Ensure category detail is included + options.params['category_detail'] = true; + + var params = options.params || {}; + + var filters = {}; + + if (!options.disableFilters) { + filters = loadTableFilters("parts"); + } + + for (var key in params) { + filters[key] = params[key]; + } + + setupFilterList("parts", $(table)); + + var columns = [ + { + field: 'pk', + title: 'ID', + visible: false, + } + ]; + + if (options.checkbox) { + columns.push({ + checkbox: true, + title: 'Select', + searchable: false, + }); + } + + columns.push({ + field: 'name', + title: 'Part', + sortable: true, + formatter: function(value, row, index, field) { + + var name = ''; + + if (row.IPN) { + name += row.IPN; + name += ' | '; + } + + name += value; + + if (row.revision) { + name += ' | '; + name += row.revision; + } + + if (row.is_template) { + name = '' + name + ''; + } + + var display = imageHoverIcon(row.thumbnail) + renderLink(name, '/part/' + row.pk + '/'); + + if (row.is_template) { + display += ``; + } + + if (row.assembly) { + display += ``; + } + + if (row.starred) { + display += ``; + } + + if (row.salable) { + display += ``; + } + + /* + if (row.component) { + display = display + ``; + } + */ + + if (!row.active) { + display += `INACTIVE`; + } + return display; + } + }); + + columns.push({ + sortable: true, + field: 'description', + title: 'Description', + formatter: function(value, row, index, field) { + + if (row.is_template) { + value = '' + value + ''; + } + + return value; + } + }); + + columns.push({ + sortable: true, + field: 'category_detail', + title: 'Category', + formatter: function(value, row, index, field) { + if (row.category) { + return renderLink(value.pathstring, "/part/category/" + row.category + "/"); + } + else { + return 'No category'; + } + } + }); + + columns.push({ + field: 'in_stock', + title: 'Stock', + searchable: false, + sortable: true, + formatter: function(value, row, index, field) { + var link = "stock"; + + if (value) { + // There IS stock available for this part + + // Is stock "low" (below the 'minimum_stock' quantity)? + if (row.minimum_stock && row.minimum_stock > value) { + value += "Low stock"; + } + + } else if (row.on_order) { + // There is no stock available, but stock is on order + value = "0On Order : " + row.on_order + ""; + link = "orders"; + } else if (row.building) { + // There is no stock available, but stock is being built + value = "0Building : " + row.building + ""; + link = "builds"; + } else { + // There is no stock available + value = "0No Stock"; + } + + return renderLink(value, '/part/' + row.pk + "/" + link + "/"); + } + }); + + $(table).inventreeTable({ + url: url, + sortName: 'name', + method: 'get', + queryParams: filters, + groupBy: false, + original: params, + formatNoMatches: function() { return "No parts found"; }, + columns: columns, + }); + + if (options.buttons) { + linkButtonsToSelection($(table), options.buttons); + } + + /* Button callbacks for part table buttons */ + + $("#multi-part-order").click(function() { + var selections = $(table).bootstrapTable("getSelections"); + + var parts = []; + + selections.forEach(function(item) { + parts.push(item.pk); + }); + + launchModalForm("/order/purchase-order/order-parts/", { + data: { + parts: parts, + }, + }); + }); + + $("#multi-part-category").click(function() { + var selections = $(table).bootstrapTable("getSelections"); + + var parts = []; + + selections.forEach(function(item) { + parts.push(item.pk); + }); + + launchModalForm("/part/set-category/", { + data: { + parts: parts, + }, + reload: true, + }); + }); + + $('#multi-part-export').click(function() { + var selections = $(table).bootstrapTable("getSelections"); + + var parts = ''; + + selections.forEach(function(item) { + parts += item.pk; + parts += ','; + }); + + location.href = '/part/export/?parts=' + parts; + }); +} \ No newline at end of file From 9b1e387a8b0a042fbb4f29e92543a3220daacec6 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:27:45 +1000 Subject: [PATCH 02/10] Translations for part.js --- InvenTree/templates/js/part.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index aea67065ca..c4d5960a7a 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -41,14 +41,14 @@ function loadPartTable(table, url, options={}) { if (options.checkbox) { columns.push({ checkbox: true, - title: 'Select', + title: '{% trans 'Select' %}', searchable: false, }); } columns.push({ field: 'name', - title: 'Part', + title: '{% trans 'Part' %}', sortable: true, formatter: function(value, row, index, field) { @@ -73,19 +73,19 @@ function loadPartTable(table, url, options={}) { var display = imageHoverIcon(row.thumbnail) + renderLink(name, '/part/' + row.pk + '/'); if (row.is_template) { - display += ``; + display += ``; } if (row.assembly) { - display += ``; + display += ``; } if (row.starred) { - display += ``; + display += ``; } if (row.salable) { - display += ``; + display += ``; } /* @@ -95,7 +95,7 @@ function loadPartTable(table, url, options={}) { */ if (!row.active) { - display += `INACTIVE`; + display += `{% trans "Inactive" %}`; } return display; } @@ -104,7 +104,7 @@ function loadPartTable(table, url, options={}) { columns.push({ sortable: true, field: 'description', - title: 'Description', + title: '{% trans 'Description' %}', formatter: function(value, row, index, field) { if (row.is_template) { @@ -118,20 +118,20 @@ function loadPartTable(table, url, options={}) { columns.push({ sortable: true, field: 'category_detail', - title: 'Category', + title: '{% trans 'Category' %}', formatter: function(value, row, index, field) { if (row.category) { return renderLink(value.pathstring, "/part/category/" + row.category + "/"); } else { - return 'No category'; + return '{% trans "No category" %}'; } } }); columns.push({ field: 'in_stock', - title: 'Stock', + title: '{% trans "Stock" %}', searchable: false, sortable: true, formatter: function(value, row, index, field) { @@ -142,20 +142,20 @@ function loadPartTable(table, url, options={}) { // Is stock "low" (below the 'minimum_stock' quantity)? if (row.minimum_stock && row.minimum_stock > value) { - value += "Low stock"; + value += "{% trans "Low stock" %}"; } } else if (row.on_order) { // There is no stock available, but stock is on order - value = "0On Order : " + row.on_order + ""; + value = "0{% trans "On Order" %}: " + row.on_order + ""; link = "orders"; } else if (row.building) { // There is no stock available, but stock is being built - value = "0Building : " + row.building + ""; + value = "0{% trans "Building" %}: " + row.building + ""; link = "builds"; } else { // There is no stock available - value = "0No Stock"; + value = "0{% trans "No Stock" %}"; } return renderLink(value, '/part/' + row.pk + "/" + link + "/"); @@ -169,7 +169,7 @@ function loadPartTable(table, url, options={}) { queryParams: filters, groupBy: false, original: params, - formatNoMatches: function() { return "No parts found"; }, + formatNoMatches: function() { return "{% trans "No parts found" %}"; }, columns: columns, }); From b1a642918c091f5b50647367b56f458458eca457 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:36:18 +1000 Subject: [PATCH 03/10] Add translation layer for stock.js --- .../static/script/inventree/stock.js | 374 ------------------ InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 1 + InvenTree/templates/js/stock.js | 360 +++++++++++++++++ 4 files changed, 362 insertions(+), 374 deletions(-) create mode 100644 InvenTree/templates/js/stock.js diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js index 4e4b61aa93..950b0260e4 100644 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ b/InvenTree/InvenTree/static/script/inventree/stock.js @@ -2,19 +2,6 @@ * Requires api.js to be loaded first */ -function getStockList(filters={}, options={}) { - return inventreeGet('/api/stock/', filters, options); -} - -function getStockDetail(pk, options={}) { - return inventreeGet('/api/stock/' + pk + '/', {}, options) -} - -function getStockLocations(filters={}, options={}) { - return inventreeGet('/api/stock/location/', filters, options) -} - - /* Functions for interacting with stock management forms */ @@ -29,367 +16,6 @@ function removeStockRow(e) { $('#' + row).remove(); } - -function loadStockTable(table, options) { - /* Load data into a stock table with adjustable options. - * Fetches data (via AJAX) and loads into a bootstrap table. - * Also links in default button callbacks. - * - * Options: - * url - URL for the stock query - * params - query params for augmenting stock data request - * groupByField - Column for grouping stock items - * buttons - Which buttons to link to stock selection callbacks - * filterList -
    element where filters are displayed - * disableFilters: If true, disable custom filters - */ - - // List of user-params which override the default filters - - options.params['part_detail'] = true; - options.params['location_detail'] = true; - - var params = options.params || {}; - - var filterListElement = options.filterList || "#filter-list-stock"; - - var filters = {}; - - if (!options.disableFilters) { - filters = loadTableFilters("stock"); - } - - var original = {}; - - for (var key in params) { - original[key] = params[key]; - } - - setupFilterList("stock", table, filterListElement); - - // Override the default values, or add new ones - for (var key in params) { - filters[key] = params[key]; - } - - table.inventreeTable({ - method: 'get', - formatNoMatches: function() { - return 'No stock items matching query'; - }, - url: options.url, - queryParams: filters, - customSort: customGroupSorter, - groupBy: true, - original: original, - groupByField: options.groupByField || 'part', - groupByFormatter: function(field, id, data) { - - var row = data[0]; - - if (field == 'part_name') { - - var name = row.part_detail.full_name; - - return imageHoverIcon(row.part_detail.thumbnail) + name + ' (' + data.length + ' items)'; - } - else if (field == 'part_description') { - return row.part_detail.description; - } - else if (field == 'quantity') { - var stock = 0; - var items = 0; - - data.forEach(function(item) { - stock += parseFloat(item.quantity); - items += 1; - }); - - stock = +stock.toFixed(5); - - return stock + " (" + items + " items)"; - } else if (field == 'status') { - var statii = []; - - data.forEach(function(item) { - var status = String(item.status); - - if (!status || status == '') { - status = '-'; - } - - if (!statii.includes(status)) { - statii.push(status); - } - }); - - // Multiple status codes - if (statii.length > 1) { - return "-"; - } else if (statii.length == 1) { - return stockStatusDisplay(statii[0]); - } else { - return "-"; - } - } else if (field == 'batch') { - var batches = []; - - data.forEach(function(item) { - var batch = item.batch; - - if (!batch || batch == '') { - batch = '-'; - } - - if (!batches.includes(batch)) { - batches.push(batch); - } - }); - - if (batches.length > 1) { - return "" + batches.length + " batches"; - } else if (batches.length == 1) { - if (batches[0]) { - return batches[0]; - } else { - return '-'; - } - } else { - return '-'; - } - } else if (field == 'location__path') { - /* Determine how many locations */ - var locations = []; - - data.forEach(function(item) { - var loc = item.location; - - if (!locations.includes(loc)) { - locations.push(loc); - } - }); - - if (locations.length > 1) { - return "In " + locations.length + " locations"; - } else { - // A single location! - return renderLink(row.location__path, '/stock/location/' + row.location + '/') - } - } else if (field == 'notes') { - var notes = []; - - data.forEach(function(item) { - var note = item.notes; - - if (!note || note == '') { - note = '-'; - } - - if (!notes.includes(note)) { - notes.push(note); - } - }); - - if (notes.length > 1) { - return '...'; - } else if (notes.length == 1) { - return notes[0] || '-'; - } else { - return '-'; - } - } - else { - return ''; - } - }, - columns: [ - { - checkbox: true, - title: 'Select', - searchable: false, - }, - { - field: 'pk', - title: 'ID', - visible: false, - }, - { - field: 'part_name', - title: 'Part', - sortable: true, - formatter: function(value, row, index, field) { - - var url = ''; - var thumb = row.part_detail.thumbnail; - var name = row.part_detail.full_name; - - if (row.supplier_part) { - url = `/supplier-part/${row.supplier_part}/`; - } else { - url = `/part/${row.part}/`; - } - - html = imageHoverIcon(thumb) + renderLink(name, url); - - return html; - } - }, - { - field: 'part_description', - title: 'Description', - sortable: true, - formatter: function(value, row, index, field) { - return row.part_detail.description; - } - }, - { - field: 'quantity', - title: 'Stock', - sortable: true, - formatter: function(value, row, index, field) { - - var val = parseFloat(value); - - // If there is a single unit with a serial number, use the serial number - if (row.serial && row.quantity == 1) { - val = '# ' + row.serial; - } else { - val = +val.toFixed(5); - } - - var html = renderLink(val, `/stock/item/${row.pk}/`); - - if (row.allocated) { - html += ``; - } - - // 70 = "LOST" - if (row.status == 70) { - html += ``; - } - - return html; - } - }, - { - field: 'status', - title: 'Status', - sortable: 'true', - formatter: function(value, row, index, field) { - return stockStatusDisplay(value); - }, - }, - { - field: 'batch', - title: 'Batch', - sortable: true, - }, - { - field: 'location_detail.pathstring', - title: 'Location', - sortable: true, - formatter: function(value, row, index, field) { - if (value) { - return renderLink(value, '/stock/location/' + row.location + '/'); - } - else { - return 'No stock location set'; - } - } - }, - { - field: 'notes', - title: 'Notes', - } - ], - }); - - if (options.buttons) { - linkButtonsToSelection(table, options.buttons); - } - - function stockAdjustment(action) { - var items = $("#stock-table").bootstrapTable("getSelections"); - - var stock = []; - - items.forEach(function(item) { - stock.push(item.pk); - }); - - // Buttons for launching secondary modals - var secondary = []; - - if (action == 'move') { - secondary.push({ - field: 'destination', - label: 'New Location', - title: 'Create new location', - url: "/stock/location/new/", - }); - } - - launchModalForm("/stock/adjust/", - { - data: { - action: action, - stock: stock, - }, - success: function() { - $("#stock-table").bootstrapTable('refresh'); - }, - secondary: secondary, - } - ); - } - - // Automatically link button callbacks - $('#multi-item-stocktake').click(function() { - stockAdjustment('count'); - }); - - $('#multi-item-remove').click(function() { - stockAdjustment('take'); - }); - - $('#multi-item-add').click(function() { - stockAdjustment('add'); - }); - - $("#multi-item-move").click(function() { - stockAdjustment('move'); - }); - - $("#multi-item-order").click(function() { - var selections = $("#stock-table").bootstrapTable("getSelections"); - - var stock = []; - - selections.forEach(function(item) { - stock.push(item.pk); - }); - - launchModalForm("/order/purchase-order/order-parts/", { - data: { - stock: stock, - }, - }); - }); - - $("#multi-item-delete").click(function() { - var selections = $("#stock-table").bootstrapTable("getSelections"); - - var stock = []; - - selections.forEach(function(item) { - stock.push(item.pk); - }); - - stockAdjustment('delete'); - }); -} - - function loadStockTrackingTable(table, options) { var cols = [ diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index a3a8950401..61ca4afbc9 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -76,6 +76,7 @@ settings_urls = [ dynamic_javascript_urls = [ url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'), + url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'), ] urlpatterns = [ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 9d8f650c69..f734d47eba 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -115,6 +115,7 @@ InvenTree + diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js new file mode 100644 index 0000000000..d986a19246 --- /dev/null +++ b/InvenTree/templates/js/stock.js @@ -0,0 +1,360 @@ +{% load i18n %} + +function loadStockTable(table, options) { + /* Load data into a stock table with adjustable options. + * Fetches data (via AJAX) and loads into a bootstrap table. + * Also links in default button callbacks. + * + * Options: + * url - URL for the stock query + * params - query params for augmenting stock data request + * groupByField - Column for grouping stock items + * buttons - Which buttons to link to stock selection callbacks + * filterList -
      element where filters are displayed + * disableFilters: If true, disable custom filters + */ + + // List of user-params which override the default filters + + options.params['part_detail'] = true; + options.params['location_detail'] = true; + + var params = options.params || {}; + + var filterListElement = options.filterList || "#filter-list-stock"; + + var filters = {}; + + if (!options.disableFilters) { + filters = loadTableFilters("stock"); + } + + var original = {}; + + for (var key in params) { + original[key] = params[key]; + } + + setupFilterList("stock", table, filterListElement); + + // Override the default values, or add new ones + for (var key in params) { + filters[key] = params[key]; + } + + table.inventreeTable({ + method: 'get', + formatNoMatches: function() { + return '{% trans "No stock items matching query" %}'; + }, + url: options.url, + queryParams: filters, + customSort: customGroupSorter, + groupBy: true, + original: original, + groupByField: options.groupByField || 'part', + groupByFormatter: function(field, id, data) { + + var row = data[0]; + + if (field == 'part_name') { + + var name = row.part_detail.full_name; + + return imageHoverIcon(row.part_detail.thumbnail) + name + ' (' + data.length + ' items)'; + } + else if (field == 'part_description') { + return row.part_detail.description; + } + else if (field == 'quantity') { + var stock = 0; + var items = 0; + + data.forEach(function(item) { + stock += parseFloat(item.quantity); + items += 1; + }); + + stock = +stock.toFixed(5); + + return stock + " (" + items + " items)"; + } else if (field == 'status') { + var statii = []; + + data.forEach(function(item) { + var status = String(item.status); + + if (!status || status == '') { + status = '-'; + } + + if (!statii.includes(status)) { + statii.push(status); + } + }); + + // Multiple status codes + if (statii.length > 1) { + return "-"; + } else if (statii.length == 1) { + return stockStatusDisplay(statii[0]); + } else { + return "-"; + } + } else if (field == 'batch') { + var batches = []; + + data.forEach(function(item) { + var batch = item.batch; + + if (!batch || batch == '') { + batch = '-'; + } + + if (!batches.includes(batch)) { + batches.push(batch); + } + }); + + if (batches.length > 1) { + return "" + batches.length + " batches"; + } else if (batches.length == 1) { + if (batches[0]) { + return batches[0]; + } else { + return '-'; + } + } else { + return '-'; + } + } else if (field == 'location__path') { + /* Determine how many locations */ + var locations = []; + + data.forEach(function(item) { + var loc = item.location; + + if (!locations.includes(loc)) { + locations.push(loc); + } + }); + + if (locations.length > 1) { + return "In " + locations.length + " locations"; + } else { + // A single location! + return renderLink(row.location__path, '/stock/location/' + row.location + '/') + } + } else if (field == 'notes') { + var notes = []; + + data.forEach(function(item) { + var note = item.notes; + + if (!note || note == '') { + note = '-'; + } + + if (!notes.includes(note)) { + notes.push(note); + } + }); + + if (notes.length > 1) { + return '...'; + } else if (notes.length == 1) { + return notes[0] || '-'; + } else { + return '-'; + } + } + else { + return ''; + } + }, + columns: [ + { + checkbox: true, + title: '{% trans "Select" %}', + searchable: false, + }, + { + field: 'pk', + title: 'ID', + visible: false, + }, + { + field: 'part_name', + title: '{% trans "Part" %}', + sortable: true, + formatter: function(value, row, index, field) { + + var url = ''; + var thumb = row.part_detail.thumbnail; + var name = row.part_detail.full_name; + + if (row.supplier_part) { + url = `/supplier-part/${row.supplier_part}/`; + } else { + url = `/part/${row.part}/`; + } + + html = imageHoverIcon(thumb) + renderLink(name, url); + + return html; + } + }, + { + field: 'part_description', + title: '{% trans "Description" %}', + sortable: true, + formatter: function(value, row, index, field) { + return row.part_detail.description; + } + }, + { + field: 'quantity', + title: '{% trans "Stock" %}', + sortable: true, + formatter: function(value, row, index, field) { + + var val = parseFloat(value); + + // If there is a single unit with a serial number, use the serial number + if (row.serial && row.quantity == 1) { + val = '# ' + row.serial; + } else { + val = +val.toFixed(5); + } + + var html = renderLink(val, `/stock/item/${row.pk}/`); + + if (row.allocated) { + html += ``; + } + + // 70 = "LOST" + if (row.status == 70) { + html += ``; + } + + return html; + } + }, + { + field: 'status', + title: '{% trans "Status" %}', + sortable: 'true', + formatter: function(value, row, index, field) { + return stockStatusDisplay(value); + }, + }, + { + field: 'batch', + title: '{% trans "Batch" %}', + sortable: true, + }, + { + field: 'location_detail.pathstring', + title: '{% trans "Location" %}', + sortable: true, + formatter: function(value, row, index, field) { + if (value) { + return renderLink(value, '/stock/location/' + row.location + '/'); + } + else { + return '{% trans "No stock location set" %}'; + } + } + }, + { + field: 'notes', + title: '{% trans "Notes" %}', + } + ], + }); + + if (options.buttons) { + linkButtonsToSelection(table, options.buttons); + } + + function stockAdjustment(action) { + var items = $("#stock-table").bootstrapTable("getSelections"); + + var stock = []; + + items.forEach(function(item) { + stock.push(item.pk); + }); + + // Buttons for launching secondary modals + var secondary = []; + + if (action == 'move') { + secondary.push({ + field: 'destination', + label: 'New Location', + title: 'Create new location', + url: "/stock/location/new/", + }); + } + + launchModalForm("/stock/adjust/", + { + data: { + action: action, + stock: stock, + }, + success: function() { + $("#stock-table").bootstrapTable('refresh'); + }, + secondary: secondary, + } + ); + } + + // Automatically link button callbacks + $('#multi-item-stocktake').click(function() { + stockAdjustment('count'); + }); + + $('#multi-item-remove').click(function() { + stockAdjustment('take'); + }); + + $('#multi-item-add').click(function() { + stockAdjustment('add'); + }); + + $("#multi-item-move").click(function() { + stockAdjustment('move'); + }); + + $("#multi-item-order").click(function() { + var selections = $("#stock-table").bootstrapTable("getSelections"); + + var stock = []; + + selections.forEach(function(item) { + stock.push(item.pk); + }); + + launchModalForm("/order/purchase-order/order-parts/", { + data: { + stock: stock, + }, + }); + }); + + $("#multi-item-delete").click(function() { + var selections = $("#stock-table").bootstrapTable("getSelections"); + + var stock = []; + + selections.forEach(function(item) { + stock.push(item.pk); + }); + + stockAdjustment('delete'); + }); +} From 24a816e9a2173a8885bdfbf51e0a74fda35e8e01 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:43:07 +1000 Subject: [PATCH 04/10] More translations for part.js and stock.js --- .../InvenTree/static/script/inventree/part.js | 59 -------- .../static/script/inventree/stock.js | 140 ----------------- InvenTree/templates/base.html | 2 - InvenTree/templates/js/part.js | 60 ++++++++ InvenTree/templates/js/stock.js | 141 ++++++++++++++++++ 5 files changed, 201 insertions(+), 201 deletions(-) delete mode 100644 InvenTree/InvenTree/static/script/inventree/part.js delete mode 100644 InvenTree/InvenTree/static/script/inventree/stock.js diff --git a/InvenTree/InvenTree/static/script/inventree/part.js b/InvenTree/InvenTree/static/script/inventree/part.js deleted file mode 100644 index 64849a30a6..0000000000 --- a/InvenTree/InvenTree/static/script/inventree/part.js +++ /dev/null @@ -1,59 +0,0 @@ -/* Part API functions - * Requires api.js to be loaded first - */ - -function toggleStar(options) { - /* Toggle the 'starred' status of a part. - * Performs AJAX queries and updates the display on the button. - * - * options: - * - button: ID of the button (default = '#part-star-icon') - * - part: pk of the part object - * - user: pk of the user - */ - - var url = '/api/part/star/'; - - inventreeGet( - url, - { - part: options.part, - user: options.user, - }, - { - success: function(response) { - if (response.length == 0) { - // Zero length response = star does not exist - // So let's add one! - inventreePut( - url, - { - part: options.part, - user: options.user, - }, - { - method: 'POST', - success: function(response, status) { - $(options.button).addClass('icon-yellow'); - }, - } - ); - } else { - var pk = response[0].pk; - // There IS a star (delete it!) - inventreePut( - url + pk + "/", - { - }, - { - method: 'DELETE', - success: function(response, status) { - $(options.button).removeClass('icon-yellow'); - }, - } - ); - } - }, - } - ); -} \ No newline at end of file diff --git a/InvenTree/InvenTree/static/script/inventree/stock.js b/InvenTree/InvenTree/static/script/inventree/stock.js deleted file mode 100644 index 950b0260e4..0000000000 --- a/InvenTree/InvenTree/static/script/inventree/stock.js +++ /dev/null @@ -1,140 +0,0 @@ -/* Stock API functions - * Requires api.js to be loaded first - */ - -/* Functions for interacting with stock management forms - */ - -function removeStockRow(e) { - // Remove a selected row from a stock modal form - - e = e || window.event; - var src = e.target || e.srcElement; - - var row = $(src).attr('row'); - - $('#' + row).remove(); -} - -function loadStockTrackingTable(table, options) { - - var cols = [ - { - field: 'pk', - visible: false, - }, - { - field: 'date', - title: 'Date', - sortable: true, - formatter: function(value, row, index, field) { - var m = moment(value); - if (m.isValid()) { - var html = m.format('dddd MMMM Do YYYY'); // + '
      ' + m.format('h:mm a'); - return html; - } - - return 'N/A'; - } - }, - ]; - - // If enabled, provide a link to the referenced StockItem - if (options.partColumn) { - cols.push({ - field: 'item', - title: 'Stock Item', - sortable: true, - formatter: function(value, row, index, field) { - return renderLink(value.part_name, value.url); - } - }); - } - - // Stock transaction description - cols.push({ - field: 'title', - title: 'Description', - sortable: true, - formatter: function(value, row, index, field) { - var html = "" + value + ""; - - if (row.notes) { - html += "
      " + row.notes + ""; - } - - if (row.link) { - html += "
      " + row.link + ""; - } - - return html; - } - }); - - cols.push({ - field: 'quantity', - title: 'Quantity', - formatter: function(value, row, index, field) { - return parseFloat(value); - }, - }); - - cols.push({ - sortable: true, - field: 'user', - title: 'User', - formatter: function(value, row, index, field) { - if (value) - { - // TODO - Format the user's first and last names - return value.username; - } - else - { - return "No user information"; - } - } - }); - - cols.push({ - sortable: false, - formatter: function(value, row, index, field) { - // Manually created entries can be edited or deleted - if (!row.system) { - var bEdit = ""; - var bDel = ""; - - return "
      " + bEdit + bDel + "
      "; - } else { - return ""; - } - } - }); - - table.inventreeTable({ - method: 'get', - queryParams: options.params, - columns: cols, - url: options.url, - }); - - if (options.buttons) { - linkButtonsToSelection(table, options.buttons); - } - - table.on('click', '.btn-entry-edit', function() { - var button = $(this); - - launchModalForm(button.attr('url'), { - reload: true, - }); - }); - - table.on('click', '.btn-entry-delete', function() { - var button = $(this); - - launchModalForm(button.attr('url'), { - reload: true, - }); - }); -} \ No newline at end of file diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index f734d47eba..f812376e67 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -102,12 +102,10 @@ InvenTree - - diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.js index c4d5960a7a..57e7fa5798 100644 --- a/InvenTree/templates/js/part.js +++ b/InvenTree/templates/js/part.js @@ -1,5 +1,65 @@ {% load i18n %} +/* Part API functions + * Requires api.js to be loaded first + */ + +function toggleStar(options) { + /* Toggle the 'starred' status of a part. + * Performs AJAX queries and updates the display on the button. + * + * options: + * - button: ID of the button (default = '#part-star-icon') + * - part: pk of the part object + * - user: pk of the user + */ + + var url = '/api/part/star/'; + + inventreeGet( + url, + { + part: options.part, + user: options.user, + }, + { + success: function(response) { + if (response.length == 0) { + // Zero length response = star does not exist + // So let's add one! + inventreePut( + url, + { + part: options.part, + user: options.user, + }, + { + method: 'POST', + success: function(response, status) { + $(options.button).addClass('icon-yellow'); + }, + } + ); + } else { + var pk = response[0].pk; + // There IS a star (delete it!) + inventreePut( + url + pk + "/", + { + }, + { + method: 'DELETE', + success: function(response, status) { + $(options.button).removeClass('icon-yellow'); + }, + } + ); + } + }, + } + ); +} + function loadPartTable(table, url, options={}) { /* Load part listing data into specified table. * diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index d986a19246..5645f9aa9c 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -1,5 +1,23 @@ {% load i18n %} +/* Stock API functions + * Requires api.js to be loaded first + */ + +/* Functions for interacting with stock management forms + */ + +function removeStockRow(e) { + // Remove a selected row from a stock modal form + + e = e || window.event; + var src = e.target || e.srcElement; + + var row = $(src).attr('row'); + + $('#' + row).remove(); +} + function loadStockTable(table, options) { /* Load data into a stock table with adjustable options. * Fetches data (via AJAX) and loads into a bootstrap table. @@ -358,3 +376,126 @@ function loadStockTable(table, options) { stockAdjustment('delete'); }); } + +function loadStockTrackingTable(table, options) { + + var cols = [ + { + field: 'pk', + visible: false, + }, + { + field: 'date', + title: '{% trans "Date" %}', + sortable: true, + formatter: function(value, row, index, field) { + var m = moment(value); + if (m.isValid()) { + var html = m.format('dddd MMMM Do YYYY'); // + '
      ' + m.format('h:mm a'); + return html; + } + + return 'N/A'; + } + }, + ]; + + // If enabled, provide a link to the referenced StockItem + if (options.partColumn) { + cols.push({ + field: 'item', + title: '{% trans "Stock Item" %}', + sortable: true, + formatter: function(value, row, index, field) { + return renderLink(value.part_name, value.url); + } + }); + } + + // Stock transaction description + cols.push({ + field: 'title', + title: '{% trans "Description" %}', + sortable: true, + formatter: function(value, row, index, field) { + var html = "" + value + ""; + + if (row.notes) { + html += "
      " + row.notes + ""; + } + + if (row.link) { + html += "
      " + row.link + ""; + } + + return html; + } + }); + + cols.push({ + field: 'quantity', + title: '{% trans "Quantity" %}', + formatter: function(value, row, index, field) { + return parseFloat(value); + }, + }); + + cols.push({ + sortable: true, + field: 'user', + title: '{% trans "User" %}', + formatter: function(value, row, index, field) { + if (value) + { + // TODO - Format the user's first and last names + return value.username; + } + else + { + return "{% trans "No user information" %}"; + } + } + }); + + cols.push({ + sortable: false, + formatter: function(value, row, index, field) { + // Manually created entries can be edited or deleted + if (!row.system) { + var bEdit = ""; + var bDel = ""; + + return "
      " + bEdit + bDel + "
      "; + } else { + return ""; + } + } + }); + + table.inventreeTable({ + method: 'get', + queryParams: options.params, + columns: cols, + url: options.url, + }); + + if (options.buttons) { + linkButtonsToSelection(table, options.buttons); + } + + table.on('click', '.btn-entry-edit', function() { + var button = $(this); + + launchModalForm(button.attr('url'), { + reload: true, + }); + }); + + table.on('click', '.btn-entry-delete', function() { + var button = $(this); + + launchModalForm(button.attr('url'), { + reload: true, + }); + }); +} \ No newline at end of file From 23bd9afaf824d6c05f62a7fdbe495a670720b8de Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:48:28 +1000 Subject: [PATCH 05/10] Add translation layer for build.js --- InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 2 +- .../inventree => templates/js}/build.js | 28 ++++++++++--------- 3 files changed, 17 insertions(+), 14 deletions(-) rename InvenTree/{InvenTree/static/script/inventree => templates/js}/build.js (83%) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 61ca4afbc9..2cdf6cf598 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -77,6 +77,7 @@ settings_urls = [ dynamic_javascript_urls = [ url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'), url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'), + url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'), ] urlpatterns = [ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index f812376e67..ab872d9684 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -105,7 +105,6 @@ InvenTree - @@ -114,6 +113,7 @@ InvenTree + diff --git a/InvenTree/InvenTree/static/script/inventree/build.js b/InvenTree/templates/js/build.js similarity index 83% rename from InvenTree/InvenTree/static/script/inventree/build.js rename to InvenTree/templates/js/build.js index bb2de7fb81..b48e6a2a09 100644 --- a/InvenTree/InvenTree/static/script/inventree/build.js +++ b/InvenTree/templates/js/build.js @@ -1,3 +1,5 @@ +{% load i18n %} + function loadBuildTable(table, options) { // Display a table of Build objects @@ -14,7 +16,7 @@ function loadBuildTable(table, options) { table.inventreeTable({ method: 'get', formatNoMatches: function() { - return "No builds matching query"; + return "{% trans "No builds matching query" %}"; }, url: options.url, queryParams: filters, @@ -28,7 +30,7 @@ function loadBuildTable(table, options) { }, { field: 'title', - title: 'Build', + title: '{% trans "Build" %}', sortable: true, formatter: function(value, row, index, field) { return renderLink(value, '/build/' + row.pk + '/'); @@ -36,7 +38,7 @@ function loadBuildTable(table, options) { }, { field: 'part', - title: 'Part', + title: '{% trans "Part" %}', sortable: true, formatter: function(value, row, index, field) { @@ -47,12 +49,12 @@ function loadBuildTable(table, options) { }, { field: 'quantity', - title: 'Quantity', + title: '{% trans "Quantity" %}', sortable: true, }, { field: 'status', - title: 'Status', + title: '{% trans "Status" %}', sortable: true, formatter: function(value, row, index, field) { return buildStatusDisplay(value); @@ -60,12 +62,12 @@ function loadBuildTable(table, options) { }, { field: 'creation_date', - title: 'Created', + title: '{% trans "Created" %}', sortable: true, }, { field: 'completion_date', - title: 'Completed', + title: '{% trans "Completed" %}', sortable: true, }, ], @@ -97,30 +99,30 @@ function loadAllocationTable(table, part_id, part, url, required, button) { table.bootstrapTable({ url: url, sortable: false, - formatNoMatches: function() { return 'No parts allocated for ' + part; }, + formatNoMatches: function() { return '{% trans "No parts allocated for" %} ' + part; }, columns: [ { field: 'stock_item_detail', - title: 'Stock Item', + title: '{% trans "Stock Item" %}', formatter: function(value, row, index, field) { return '' + parseFloat(value.quantity) + ' x ' + value.part_name + ' @ ' + value.location_name; } }, { field: 'stock_item_detail.quantity', - title: 'Available', + title: '{% trans "Available" %}', formatter: function(value, row, index, field) { return parseFloat(value); } }, { field: 'quantity', - title: 'Allocated', + title: '{% trans "Allocated" %}', formatter: function(value, row, index, field) { var html = parseFloat(value); - var bEdit = ""; - var bDel = ""; + var bEdit = ""; + var bDel = ""; html += "
      " + bEdit + bDel + "
      "; From 2c9b76575ebc2c4bc0bd7aa591e2e24f9ef71fc8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 21:55:09 +1000 Subject: [PATCH 06/10] Add translation layer for order.js --- InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 2 +- .../inventree => templates/js}/order.js | 36 ++++++++++--------- 3 files changed, 21 insertions(+), 18 deletions(-) rename InvenTree/{InvenTree/static/script/inventree => templates/js}/order.js (86%) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 2cdf6cf598..2da9f140a0 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -78,6 +78,7 @@ dynamic_javascript_urls = [ url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'), url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'), url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'), + url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'), ] urlpatterns = [ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index ab872d9684..13937eb3ed 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -106,7 +106,6 @@ InvenTree - @@ -114,6 +113,7 @@ InvenTree + diff --git a/InvenTree/InvenTree/static/script/inventree/order.js b/InvenTree/templates/js/order.js similarity index 86% rename from InvenTree/InvenTree/static/script/inventree/order.js rename to InvenTree/templates/js/order.js index c4e39d9e1d..17bd67cabb 100644 --- a/InvenTree/InvenTree/static/script/inventree/order.js +++ b/InvenTree/templates/js/order.js @@ -1,3 +1,5 @@ +{% load i18n %} + function removeOrderRowFromOrderWizard(e) { /* Remove a part selection from an order form. */ @@ -121,7 +123,7 @@ function loadPurchaseOrderTable(table, options) { queryParams: filters, groupBy: false, original: options.params, - formatNoMatches: function() { return "No purchase orders found"; }, + formatNoMatches: function() { return "{% trans "No purchase orders found" %}"; }, columns: [ { field: 'pk', @@ -131,7 +133,7 @@ function loadPurchaseOrderTable(table, options) { { sortable: true, field: 'reference', - title: 'Purchase Order', + title: '{% trans "Purchase Order" %}', formatter: function(value, row, index, field) { return renderLink(value, `/order/purchase-order/${row.pk}/`); } @@ -139,25 +141,25 @@ function loadPurchaseOrderTable(table, options) { { sortable: true, field: 'supplier_detail', - title: 'Supplier', + title: '{% trans "Supplier" %}', formatter: function(value, row, index, field) { return imageHoverIcon(row.supplier_detail.image) + renderLink(row.supplier_detail.name, `/company/${row.supplier}/purchase-orders/`); } }, { field: 'supplier_reference', - title: 'Supplier Reference', + title: '{% trans "Supplier Reference" %}', sortable: true, }, { sortable: true, field: 'description', - title: 'Description', + title: '{% trans "Description" %}', }, { sortable: true, field: 'status', - title: 'Status', + title: '{% trans "Status" %}', formatter: function(value, row, index, field) { return purchaseOrderStatusDisplay(row.status, row.status_text); } @@ -165,12 +167,12 @@ function loadPurchaseOrderTable(table, options) { { sortable: true, field: 'creation_date', - title: 'Date', + title: '{% trans "Date" %}', }, { sortable: true, field: 'line_items', - title: 'Items' + title: '{% trans "Items" %}' }, ], }); @@ -194,7 +196,7 @@ function loadSalesOrderTable(table, options) { queryParams: filters, groupBy: false, original: options.params, - formatNoMatches: function() { return "No sales orders found"; }, + formatNoMatches: function() { return "{% trans "No sales orders found" %}"; }, columns: [ { field: 'pk', @@ -204,7 +206,7 @@ function loadSalesOrderTable(table, options) { { sortable: true, field: 'reference', - title: 'Sales Order', + title: '{% trans "Sales Order" %}', formatter: function(value, row, index, field) { return renderLink(value, `/order/sales-order/${row.pk}/`); }, @@ -212,25 +214,25 @@ function loadSalesOrderTable(table, options) { { sortable: true, field: 'customer_detail', - title: 'Customer', + title: '{% trans "Customer" %}', formatter: function(value, row, index, field) { return imageHoverIcon(row.customer_detail.image) + renderLink(row.customer_detail.name, `/company/${row.customer}/sales-orders/`); } }, { field: 'customer_reference', - title: 'Customer Reference', + title: '{% trans "Customer Reference" %}', sotrable: true, }, { sortable: true, field: 'description', - title: 'Description', + title: '{% trans "Description" %}', }, { sortable: true, field: 'status', - title: 'Status', + title: '{% trans "Status" %}', formatter: function(value, row, index, field) { return salesOrderStatusDisplay(row.status, row.status_text); } @@ -238,17 +240,17 @@ function loadSalesOrderTable(table, options) { { sortable: true, field: 'creation_date', - title: 'Creation Date', + title: '{% trans "Creation Date" %}', }, { sortable: true, field: 'shipment_date', - title: "Shipment Date", + title: "{% trans "Shipment Date" %}", }, { sortable: true, field: 'line_items', - title: 'Items' + title: '{% trans "Items" %}' }, ], }); From 6c3dc2a25d6503fd2255e18977a24c0747caa5c8 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 22:01:40 +1000 Subject: [PATCH 07/10] Translation layer for company.js --- InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 4 +-- .../inventree => templates/js}/company.js | 35 ++++++++++--------- 3 files changed, 21 insertions(+), 19 deletions(-) rename InvenTree/{InvenTree/static/script/inventree => templates/js}/company.js (80%) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 2da9f140a0..2fcfa941c4 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -79,6 +79,7 @@ dynamic_javascript_urls = [ url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'), url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'), url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'), + url(r'^company.js', DynamicJsView.as_view(template_name='js/company.js'), name='company.js'), ] urlpatterns = [ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 13937eb3ed..cba64ac176 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -102,14 +102,14 @@ InvenTree - - + + diff --git a/InvenTree/InvenTree/static/script/inventree/company.js b/InvenTree/templates/js/company.js similarity index 80% rename from InvenTree/InvenTree/static/script/inventree/company.js rename to InvenTree/templates/js/company.js index d5c37ce363..8b278e2a21 100644 --- a/InvenTree/InvenTree/static/script/inventree/company.js +++ b/InvenTree/templates/js/company.js @@ -1,3 +1,4 @@ +{% load i18n %} function loadCompanyTable(table, url, options={}) { /* @@ -25,7 +26,7 @@ function loadCompanyTable(table, url, options={}) { method: 'get', queryParams: filters, groupBy: false, - formatNoMatches: function() { return "No company information found"; }, + formatNoMatches: function() { return "{% trans "No company information found" %}"; }, columns: [ { field: 'pk', @@ -34,21 +35,21 @@ function loadCompanyTable(table, url, options={}) { }, { field: 'name', - title: 'Company', + title: '{% trans "Company" %}', sortable: true, formatter: function(value, row, index, field) { var html = imageHoverIcon(row.image) + renderLink(value, row.url); if (row.is_customer) { - html += ``; + html += ``; } if (row.is_manufacturer) { - html += ``; + html += ``; } if (row.is_supplier) { - html += ``; + html += ``; } return html; @@ -56,12 +57,12 @@ function loadCompanyTable(table, url, options={}) { }, { field: 'description', - title: 'Description', + title: '{% trans "Description" %}', sortable: true, }, { field: 'website', - title: 'Website', + title: '{% trans "Website" %}', formatter: function(value, row, index, field) { if (value) { return renderLink(value, value); @@ -97,7 +98,7 @@ function loadSupplierPartTable(table, url, options) { method: 'get', queryParams: filters, groupBy: false, - formatNoMatches: function() { return "No supplier parts found"; }, + formatNoMatches: function() { return "{% trans "No supplier parts found" %}"; }, columns: [ { checkbox: true, @@ -105,7 +106,7 @@ function loadSupplierPartTable(table, url, options) { { sortable: true, field: 'part_detail.full_name', - title: 'Part', + title: '{% trans "Part" %}', formatter: function(value, row, index, field) { var url = `/part/${row.part}/`; @@ -113,15 +114,15 @@ function loadSupplierPartTable(table, url, options) { var html = imageHoverIcon(row.part_detail.thumbnail) + renderLink(value, url); if (row.part_detail.is_template) { - html += ``; + html += ``; } if (row.part_detail.assembly) { - html += ``; + html += ``; } if (!row.part_detail.active) { - html += `INACTIVE`; + html += `{% trans "Inactive" %}`; } return html; @@ -130,7 +131,7 @@ function loadSupplierPartTable(table, url, options) { { sortable: true, field: 'supplier', - title: "Supplier", + title: "{% trans "Supplier" %}", formatter: function(value, row, index, field) { if (value) { var name = row.supplier_detail.name; @@ -146,7 +147,7 @@ function loadSupplierPartTable(table, url, options) { { sortable: true, field: 'SKU', - title: "Supplier Part", + title: "{% trans "Supplier Part" %}", formatter: function(value, row, index, field) { return renderLink(value, `/supplier-part/${row.pk}/`); } @@ -154,7 +155,7 @@ function loadSupplierPartTable(table, url, options) { { sortable: true, field: 'manufacturer', - title: 'Manufacturer', + title: '{% trans "Manufacturer" %}', formatter: function(value, row, index, field) { if (value) { var name = row.manufacturer_detail.name; @@ -170,11 +171,11 @@ function loadSupplierPartTable(table, url, options) { { sortable: true, field: 'MPN', - title: 'MPN', + title: '{% trans "MPN" %}', }, { field: 'link', - title: 'Link', + title: '{% trans "Link" %}', formatter: function(value, row, index, field) { if (value) { return renderLink(value, value); From 853ba825c06c0a8e944ddbf0c87473d59745ce59 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 22:07:24 +1000 Subject: [PATCH 08/10] Translation layer for bom.js --- InvenTree/InvenTree/urls.py | 1 + InvenTree/templates/base.html | 2 +- .../script/inventree => templates/js}/bom.js | 32 ++++++++++--------- 3 files changed, 19 insertions(+), 16 deletions(-) rename InvenTree/{InvenTree/static/script/inventree => templates/js}/bom.js (83%) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 2fcfa941c4..391541861b 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -80,6 +80,7 @@ dynamic_javascript_urls = [ url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'), url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'), url(r'^company.js', DynamicJsView.as_view(template_name='js/company.js'), name='company.js'), + url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.js'), name='bom.js'), ] urlpatterns = [ diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index cba64ac176..fbe8398f27 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -105,10 +105,10 @@ InvenTree - + diff --git a/InvenTree/InvenTree/static/script/inventree/bom.js b/InvenTree/templates/js/bom.js similarity index 83% rename from InvenTree/InvenTree/static/script/inventree/bom.js rename to InvenTree/templates/js/bom.js index e4b90a9f26..518df74d61 100644 --- a/InvenTree/InvenTree/static/script/inventree/bom.js +++ b/InvenTree/templates/js/bom.js @@ -1,3 +1,5 @@ +{% load i18n %} + /* BOM management functions. * Requires follwing files to be loaded first: * - api.js @@ -130,7 +132,7 @@ function loadBomTable(table, options) { cols.push( { field: 'sub_part_detail.full_name', - title: 'Part', + title: '{% trans "Part" %}', sortable: true, formatter: function(value, row, index, field) { var url = `/part/${row.sub_part}/`; @@ -138,7 +140,7 @@ function loadBomTable(table, options) { // Display an extra icon if this part is an assembly if (row.sub_part_detail.assembly) { - var text = ``; + var text = ``; html += renderLink(text, `/part/${row.sub_part}/bom/`); } @@ -152,14 +154,14 @@ function loadBomTable(table, options) { cols.push( { field: 'sub_part_detail.description', - title: 'Description', + title: '{% trans "Description" %}', } ); // Part reference cols.push({ field: 'reference', - title: 'Reference', + title: '{% trans "Reference" %}', searchable: true, sortable: true, }); @@ -167,7 +169,7 @@ function loadBomTable(table, options) { // Part quantity cols.push({ field: 'quantity', - title: 'Quantity', + title: '{% trans "Quantity" %}', searchable: false, sortable: true, formatter: function(value, row, index, field) { @@ -189,7 +191,7 @@ function loadBomTable(table, options) { cols.push( { field: 'sub_part_detail.stock', - title: 'Available', + title: '{% trans "Available" %}', searchable: false, sortable: true, formatter: function(value, row, index, field) { @@ -198,7 +200,7 @@ function loadBomTable(table, options) { var text = value; if (value == null || value <= 0) { - text = `No Stock`; + text = `{% trans "No Stock" %}`; } return renderLink(text, url); @@ -208,13 +210,13 @@ function loadBomTable(table, options) { cols.push( { field: 'price_range', - title: 'Price', + title: '{% trans "Price" %}', sortable: true, formatter: function(value, row, index, field) { if (value) { return value; } else { - return "No pricing available"; + return "{% trans "No pricing available" %}"; } } }); @@ -224,7 +226,7 @@ function loadBomTable(table, options) { cols.push( { field: 'note', - title: 'Notes', + title: '{% trans "Notes" %}', searchable: true, sortable: true, } @@ -234,11 +236,11 @@ function loadBomTable(table, options) { cols.push({ formatter: function(value, row, index, field) { - var bValidate = ""; - var bValid = ""; + var bValidate = ""; + var bValid = ""; - var bEdit = ""; - var bDelt = ""; + var bEdit = ""; + var bDelt = ""; var html = "
      "; @@ -283,7 +285,7 @@ function loadBomTable(table, options) { return {classes: 'rowinvalid'}; } }, - formatNoMatches: function() { return "No BOM items found"; }, + formatNoMatches: function() { return "{% trans "No BOM items found" %}"; }, clickToSelect: true, queryParams: function(p) { return params; From 314b8fdbfffd48b9805fd727dcfee882bbaa882c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 22:08:25 +1000 Subject: [PATCH 09/10] regenerate translation files --- InvenTree/InvenTree/views.py | 1 - InvenTree/locale/de/LC_MESSAGES/django.po | 87 +++++++++++++---------- InvenTree/locale/en/LC_MESSAGES/django.po | 79 +++++++++++--------- InvenTree/locale/es/LC_MESSAGES/django.po | 79 +++++++++++--------- 4 files changed, 138 insertions(+), 108 deletions(-) diff --git a/InvenTree/InvenTree/views.py b/InvenTree/InvenTree/views.py index 400981eb17..c988859042 100644 --- a/InvenTree/InvenTree/views.py +++ b/InvenTree/InvenTree/views.py @@ -525,7 +525,6 @@ class DynamicJsView(TemplateView): content_type = 'text/javascript' - class SettingsView(TemplateView): """ View for configuring User settings """ diff --git a/InvenTree/locale/de/LC_MESSAGES/django.po b/InvenTree/locale/de/LC_MESSAGES/django.po index f4f0d4757d..1fe40e8b54 100644 --- a/InvenTree/locale/de/LC_MESSAGES/django.po +++ b/InvenTree/locale/de/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-02 04:54+0000\n" +"POT-Creation-Date: 2020-05-02 12:07+0000\n" "PO-Revision-Date: 2020-02-02 08:07+0100\n" "Last-Translator: Christian Schlüter \n" "Language-Team: C \n" @@ -81,19 +81,19 @@ msgstr "Datei zum Anhängen auswählen" msgid "File comment" msgstr "Datei-Kommentar" -#: InvenTree/settings.py:274 +#: InvenTree/settings.py:295 msgid "English" msgstr "Englisch" -#: InvenTree/settings.py:275 +#: InvenTree/settings.py:296 msgid "German" msgstr "Deutsch" -#: InvenTree/settings.py:276 +#: InvenTree/settings.py:297 msgid "French" msgstr "Französisch" -#: InvenTree/settings.py:277 +#: InvenTree/settings.py:298 msgid "Polish" msgstr "Polnisch" @@ -158,7 +158,7 @@ msgstr "Lagerobjekt bearbeiten" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/part_base.html:114 part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 msgid "Allocated" msgstr "Zugeordnet" @@ -187,7 +187,7 @@ msgstr "Überschuss darf 100% nicht überschreiten" msgid "Overage must be an integer value or a percentage" msgstr "Überschuss muss eine Ganzzahl oder ein Prozentwert sein" -#: InvenTree/views.py:536 +#: InvenTree/views.py:548 msgid "Database Statistics" msgstr "" @@ -272,7 +272,7 @@ msgstr "Anzahl" msgid "Number of parts to build" msgstr "Anzahl der zu bauenden Teile" -#: build/models.py:112 part/templates/part/part_base.html:131 +#: build/models.py:112 part/templates/part/part_base.html:138 msgid "Build Status" msgstr "Bau-Status" @@ -293,7 +293,7 @@ msgid "Batch code for this build output" msgstr "Chargennummer für diese Bau-Ausgabe" #: build/models.py:139 build/templates/build/detail.html:55 -#: company/templates/company/supplier_part_base.html:57 +#: company/templates/company/supplier_part_base.html:60 #: company/templates/company/supplier_part_detail.html:24 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: stock/models.py:371 stock/templates/stock/item_base.html:189 @@ -435,7 +435,7 @@ msgid "No BOM items found" msgstr "Keine Seriennummern gefunden" #: build/templates/build/allocate.html:328 -#: company/templates/company/supplier_part_base.html:50 +#: company/templates/company/supplier_part_base.html:53 #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 @@ -983,13 +983,13 @@ msgid "Contact" msgstr "" #: company/templates/company/detail.html:16 -#: company/templates/company/supplier_part_base.html:73 +#: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 msgid "Manufacturer" msgstr "Hersteller" #: company/templates/company/detail.html:21 -#: company/templates/company/supplier_part_base.html:63 +#: company/templates/company/supplier_part_base.html:66 #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 @@ -1142,44 +1142,51 @@ msgid "Supplier Part" msgstr "Zulieferer-Teil" #: company/templates/company/supplier_part_base.html:23 +#: part/templates/part/orders.html:14 +#, fuzzy +#| msgid "Order Parts" +msgid "Order part" +msgstr "Teile bestellen" + +#: company/templates/company/supplier_part_base.html:26 #, fuzzy #| msgid "Supplier Part" msgid "Edit supplier part" msgstr "Zulieferer-Teil" -#: company/templates/company/supplier_part_base.html:26 +#: company/templates/company/supplier_part_base.html:29 #, fuzzy #| msgid "Supplier Part" msgid "Delete supplier part" msgstr "Zulieferer-Teil" -#: company/templates/company/supplier_part_base.html:35 +#: company/templates/company/supplier_part_base.html:38 #: company/templates/company/supplier_part_detail.html:11 #, fuzzy #| msgid "Supplier Parts" msgid "Supplier Part Details" msgstr "Zulieferer-Teile" -#: company/templates/company/supplier_part_base.html:40 +#: company/templates/company/supplier_part_base.html:43 #: company/templates/company/supplier_part_detail.html:14 #, fuzzy #| msgid "Internal Part Number" msgid "Internal Part" msgstr "Interne Teilenummer" -#: company/templates/company/supplier_part_base.html:67 +#: company/templates/company/supplier_part_base.html:70 #: company/templates/company/supplier_part_detail.html:22 msgid "SKU" msgstr "" -#: company/templates/company/supplier_part_base.html:77 +#: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 #, fuzzy #| msgid "IPN" msgid "MPN" msgstr "IPN (Interne Produktnummer)" -#: company/templates/company/supplier_part_base.html:84 +#: company/templates/company/supplier_part_base.html:87 #: company/templates/company/supplier_part_detail.html:34 msgid "Note" msgstr "Notiz" @@ -1660,8 +1667,8 @@ msgid "Attachments" msgstr "Anhänge" #: order/templates/order/purchase_order_detail.html:16 -#: order/templates/order/sales_order_detail.html:17 order/views.py:1042 -#: order/views.py:1156 +#: order/templates/order/sales_order_detail.html:17 order/views.py:1051 +#: order/views.py:1165 msgid "Add Line Item" msgstr "Position hinzufügen" @@ -1952,49 +1959,49 @@ msgstr "Anzahl kleiner null empfangen" msgid "No lines specified" msgstr "Keine Zeilen angegeben" -#: order/views.py:1062 +#: order/views.py:1071 msgid "Invalid Purchase Order" msgstr "Ungültige Bestellung" -#: order/views.py:1070 +#: order/views.py:1079 msgid "Supplier must match for Part and Order" msgstr "Zulieferer muss zum Teil und zur Bestellung passen" -#: order/views.py:1075 +#: order/views.py:1084 msgid "Invalid SupplierPart selection" msgstr "Ungültige Wahl des Zulieferer-Teils" -#: order/views.py:1207 order/views.py:1225 +#: order/views.py:1216 order/views.py:1234 #, fuzzy #| msgid "Add Line Item" msgid "Edit Line Item" msgstr "Position hinzufügen" -#: order/views.py:1241 order/views.py:1253 +#: order/views.py:1250 order/views.py:1262 #, fuzzy #| msgid "Delete Stock Item" msgid "Delete Line Item" msgstr "Lagerobjekt löschen" -#: order/views.py:1246 order/views.py:1258 +#: order/views.py:1255 order/views.py:1267 #, fuzzy #| msgid "Deleted {n} stock items" msgid "Deleted line item" msgstr "{n} Teile im Lager gelöscht" -#: order/views.py:1267 +#: order/views.py:1276 #, fuzzy #| msgid "Allocate Stock to Build" msgid "Allocate Stock to Order" msgstr "Lagerbestand dem Bau zuweisen" -#: order/views.py:1336 +#: order/views.py:1345 #, fuzzy #| msgid "Edit Stock Location" msgid "Edit Allocation Quantity" msgstr "Lagerobjekt-Standort bearbeiten" -#: order/views.py:1351 +#: order/views.py:1360 #, fuzzy #| msgid "Receive parts to this location" msgid "Remove allocation" @@ -2462,12 +2469,6 @@ msgstr "Teil kann nicht an Kunden verkauft werden" msgid "Part Notes" msgstr "Teil-Bemerkungen" -#: part/templates/part/orders.html:14 -#, fuzzy -#| msgid "Order Parts" -msgid "Order part" -msgstr "Teile bestellen" - #: part/templates/part/orders.html:14 #, fuzzy #| msgid "Order Parts" @@ -2558,15 +2559,27 @@ msgstr "Verfügbarer Lagerbestand" msgid "In Stock" msgstr "Auf Lager" +#: part/templates/part/part_base.html:114 +#, fuzzy +#| msgid "Allocate Stock to Build" +msgid "Allocated to Build Orders" +msgstr "Lagerbestand dem Bau zuweisen" + #: part/templates/part/part_base.html:121 +#, fuzzy +#| msgid "Allocate Stock to Build" +msgid "Allocated to Sales Orders" +msgstr "Lagerbestand dem Bau zuweisen" + +#: part/templates/part/part_base.html:128 msgid "On Order" msgstr "bestellt" -#: part/templates/part/part_base.html:136 +#: part/templates/part/part_base.html:143 msgid "Can Build" msgstr "Herstellbar?" -#: part/templates/part/part_base.html:142 +#: part/templates/part/part_base.html:149 msgid "Underway" msgstr "unterwegs" diff --git a/InvenTree/locale/en/LC_MESSAGES/django.po b/InvenTree/locale/en/LC_MESSAGES/django.po index a5073b2006..8bc436a43d 100644 --- a/InvenTree/locale/en/LC_MESSAGES/django.po +++ b/InvenTree/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-02 04:54+0000\n" +"POT-Creation-Date: 2020-05-02 12:07+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,19 +78,19 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/settings.py:274 +#: InvenTree/settings.py:295 msgid "English" msgstr "" -#: InvenTree/settings.py:275 +#: InvenTree/settings.py:296 msgid "German" msgstr "" -#: InvenTree/settings.py:276 +#: InvenTree/settings.py:297 msgid "French" msgstr "" -#: InvenTree/settings.py:277 +#: InvenTree/settings.py:298 msgid "Polish" msgstr "" @@ -153,7 +153,7 @@ msgstr "" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/part_base.html:114 part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 msgid "Allocated" msgstr "" @@ -182,7 +182,7 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:536 +#: InvenTree/views.py:548 msgid "Database Statistics" msgstr "" @@ -255,7 +255,7 @@ msgstr "" msgid "Number of parts to build" msgstr "" -#: build/models.py:112 part/templates/part/part_base.html:131 +#: build/models.py:112 part/templates/part/part_base.html:138 msgid "Build Status" msgstr "" @@ -272,7 +272,7 @@ msgid "Batch code for this build output" msgstr "" #: build/models.py:139 build/templates/build/detail.html:55 -#: company/templates/company/supplier_part_base.html:57 +#: company/templates/company/supplier_part_base.html:60 #: company/templates/company/supplier_part_detail.html:24 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: stock/models.py:371 stock/templates/stock/item_base.html:189 @@ -397,7 +397,7 @@ msgid "No BOM items found" msgstr "" #: build/templates/build/allocate.html:328 -#: company/templates/company/supplier_part_base.html:50 +#: company/templates/company/supplier_part_base.html:53 #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 @@ -870,13 +870,13 @@ msgid "Contact" msgstr "" #: company/templates/company/detail.html:16 -#: company/templates/company/supplier_part_base.html:73 +#: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 msgid "Manufacturer" msgstr "" #: company/templates/company/detail.html:21 -#: company/templates/company/supplier_part_base.html:63 +#: company/templates/company/supplier_part_base.html:66 #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 @@ -1000,34 +1000,39 @@ msgid "Supplier Part" msgstr "" #: company/templates/company/supplier_part_base.html:23 -msgid "Edit supplier part" +#: part/templates/part/orders.html:14 +msgid "Order part" msgstr "" #: company/templates/company/supplier_part_base.html:26 +msgid "Edit supplier part" +msgstr "" + +#: company/templates/company/supplier_part_base.html:29 msgid "Delete supplier part" msgstr "" -#: company/templates/company/supplier_part_base.html:35 +#: company/templates/company/supplier_part_base.html:38 #: company/templates/company/supplier_part_detail.html:11 msgid "Supplier Part Details" msgstr "" -#: company/templates/company/supplier_part_base.html:40 +#: company/templates/company/supplier_part_base.html:43 #: company/templates/company/supplier_part_detail.html:14 msgid "Internal Part" msgstr "" -#: company/templates/company/supplier_part_base.html:67 +#: company/templates/company/supplier_part_base.html:70 #: company/templates/company/supplier_part_detail.html:22 msgid "SKU" msgstr "" -#: company/templates/company/supplier_part_base.html:77 +#: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 msgid "MPN" msgstr "" -#: company/templates/company/supplier_part_base.html:84 +#: company/templates/company/supplier_part_base.html:87 #: company/templates/company/supplier_part_detail.html:34 msgid "Note" msgstr "" @@ -1422,8 +1427,8 @@ msgid "Attachments" msgstr "" #: order/templates/order/purchase_order_detail.html:16 -#: order/templates/order/sales_order_detail.html:17 order/views.py:1042 -#: order/views.py:1156 +#: order/templates/order/sales_order_detail.html:17 order/views.py:1051 +#: order/views.py:1165 msgid "Add Line Item" msgstr "" @@ -1645,39 +1650,39 @@ msgstr "" msgid "No lines specified" msgstr "" -#: order/views.py:1062 +#: order/views.py:1071 msgid "Invalid Purchase Order" msgstr "" -#: order/views.py:1070 +#: order/views.py:1079 msgid "Supplier must match for Part and Order" msgstr "" -#: order/views.py:1075 +#: order/views.py:1084 msgid "Invalid SupplierPart selection" msgstr "" -#: order/views.py:1207 order/views.py:1225 +#: order/views.py:1216 order/views.py:1234 msgid "Edit Line Item" msgstr "" -#: order/views.py:1241 order/views.py:1253 +#: order/views.py:1250 order/views.py:1262 msgid "Delete Line Item" msgstr "" -#: order/views.py:1246 order/views.py:1258 +#: order/views.py:1255 order/views.py:1267 msgid "Deleted line item" msgstr "" -#: order/views.py:1267 +#: order/views.py:1276 msgid "Allocate Stock to Order" msgstr "" -#: order/views.py:1336 +#: order/views.py:1345 msgid "Edit Allocation Quantity" msgstr "" -#: order/views.py:1351 +#: order/views.py:1360 msgid "Remove allocation" msgstr "" @@ -2121,10 +2126,6 @@ msgstr "" msgid "Part Notes" msgstr "" -#: part/templates/part/orders.html:14 -msgid "Order part" -msgstr "" - #: part/templates/part/orders.html:14 msgid "Order Part" msgstr "" @@ -2197,15 +2198,23 @@ msgstr "" msgid "In Stock" msgstr "" +#: part/templates/part/part_base.html:114 +msgid "Allocated to Build Orders" +msgstr "" + #: part/templates/part/part_base.html:121 +msgid "Allocated to Sales Orders" +msgstr "" + +#: part/templates/part/part_base.html:128 msgid "On Order" msgstr "" -#: part/templates/part/part_base.html:136 +#: part/templates/part/part_base.html:143 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:142 +#: part/templates/part/part_base.html:149 msgid "Underway" msgstr "" diff --git a/InvenTree/locale/es/LC_MESSAGES/django.po b/InvenTree/locale/es/LC_MESSAGES/django.po index a5073b2006..8bc436a43d 100644 --- a/InvenTree/locale/es/LC_MESSAGES/django.po +++ b/InvenTree/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-02 04:54+0000\n" +"POT-Creation-Date: 2020-05-02 12:07+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -78,19 +78,19 @@ msgstr "" msgid "File comment" msgstr "" -#: InvenTree/settings.py:274 +#: InvenTree/settings.py:295 msgid "English" msgstr "" -#: InvenTree/settings.py:275 +#: InvenTree/settings.py:296 msgid "German" msgstr "" -#: InvenTree/settings.py:276 +#: InvenTree/settings.py:297 msgid "French" msgstr "" -#: InvenTree/settings.py:277 +#: InvenTree/settings.py:298 msgid "Polish" msgstr "" @@ -153,7 +153,7 @@ msgstr "" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/part_base.html:114 part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 msgid "Allocated" msgstr "" @@ -182,7 +182,7 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:536 +#: InvenTree/views.py:548 msgid "Database Statistics" msgstr "" @@ -255,7 +255,7 @@ msgstr "" msgid "Number of parts to build" msgstr "" -#: build/models.py:112 part/templates/part/part_base.html:131 +#: build/models.py:112 part/templates/part/part_base.html:138 msgid "Build Status" msgstr "" @@ -272,7 +272,7 @@ msgid "Batch code for this build output" msgstr "" #: build/models.py:139 build/templates/build/detail.html:55 -#: company/templates/company/supplier_part_base.html:57 +#: company/templates/company/supplier_part_base.html:60 #: company/templates/company/supplier_part_detail.html:24 #: part/templates/part/detail.html:67 part/templates/part/part_base.html:85 #: stock/models.py:371 stock/templates/stock/item_base.html:189 @@ -397,7 +397,7 @@ msgid "No BOM items found" msgstr "" #: build/templates/build/allocate.html:328 -#: company/templates/company/supplier_part_base.html:50 +#: company/templates/company/supplier_part_base.html:53 #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 @@ -870,13 +870,13 @@ msgid "Contact" msgstr "" #: company/templates/company/detail.html:16 -#: company/templates/company/supplier_part_base.html:73 +#: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 msgid "Manufacturer" msgstr "" #: company/templates/company/detail.html:21 -#: company/templates/company/supplier_part_base.html:63 +#: company/templates/company/supplier_part_base.html:66 #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 @@ -1000,34 +1000,39 @@ msgid "Supplier Part" msgstr "" #: company/templates/company/supplier_part_base.html:23 -msgid "Edit supplier part" +#: part/templates/part/orders.html:14 +msgid "Order part" msgstr "" #: company/templates/company/supplier_part_base.html:26 +msgid "Edit supplier part" +msgstr "" + +#: company/templates/company/supplier_part_base.html:29 msgid "Delete supplier part" msgstr "" -#: company/templates/company/supplier_part_base.html:35 +#: company/templates/company/supplier_part_base.html:38 #: company/templates/company/supplier_part_detail.html:11 msgid "Supplier Part Details" msgstr "" -#: company/templates/company/supplier_part_base.html:40 +#: company/templates/company/supplier_part_base.html:43 #: company/templates/company/supplier_part_detail.html:14 msgid "Internal Part" msgstr "" -#: company/templates/company/supplier_part_base.html:67 +#: company/templates/company/supplier_part_base.html:70 #: company/templates/company/supplier_part_detail.html:22 msgid "SKU" msgstr "" -#: company/templates/company/supplier_part_base.html:77 +#: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 msgid "MPN" msgstr "" -#: company/templates/company/supplier_part_base.html:84 +#: company/templates/company/supplier_part_base.html:87 #: company/templates/company/supplier_part_detail.html:34 msgid "Note" msgstr "" @@ -1422,8 +1427,8 @@ msgid "Attachments" msgstr "" #: order/templates/order/purchase_order_detail.html:16 -#: order/templates/order/sales_order_detail.html:17 order/views.py:1042 -#: order/views.py:1156 +#: order/templates/order/sales_order_detail.html:17 order/views.py:1051 +#: order/views.py:1165 msgid "Add Line Item" msgstr "" @@ -1645,39 +1650,39 @@ msgstr "" msgid "No lines specified" msgstr "" -#: order/views.py:1062 +#: order/views.py:1071 msgid "Invalid Purchase Order" msgstr "" -#: order/views.py:1070 +#: order/views.py:1079 msgid "Supplier must match for Part and Order" msgstr "" -#: order/views.py:1075 +#: order/views.py:1084 msgid "Invalid SupplierPart selection" msgstr "" -#: order/views.py:1207 order/views.py:1225 +#: order/views.py:1216 order/views.py:1234 msgid "Edit Line Item" msgstr "" -#: order/views.py:1241 order/views.py:1253 +#: order/views.py:1250 order/views.py:1262 msgid "Delete Line Item" msgstr "" -#: order/views.py:1246 order/views.py:1258 +#: order/views.py:1255 order/views.py:1267 msgid "Deleted line item" msgstr "" -#: order/views.py:1267 +#: order/views.py:1276 msgid "Allocate Stock to Order" msgstr "" -#: order/views.py:1336 +#: order/views.py:1345 msgid "Edit Allocation Quantity" msgstr "" -#: order/views.py:1351 +#: order/views.py:1360 msgid "Remove allocation" msgstr "" @@ -2121,10 +2126,6 @@ msgstr "" msgid "Part Notes" msgstr "" -#: part/templates/part/orders.html:14 -msgid "Order part" -msgstr "" - #: part/templates/part/orders.html:14 msgid "Order Part" msgstr "" @@ -2197,15 +2198,23 @@ msgstr "" msgid "In Stock" msgstr "" +#: part/templates/part/part_base.html:114 +msgid "Allocated to Build Orders" +msgstr "" + #: part/templates/part/part_base.html:121 +msgid "Allocated to Sales Orders" +msgstr "" + +#: part/templates/part/part_base.html:128 msgid "On Order" msgstr "" -#: part/templates/part/part_base.html:136 +#: part/templates/part/part_base.html:143 msgid "Can Build" msgstr "" -#: part/templates/part/part_base.html:142 +#: part/templates/part/part_base.html:149 msgid "Underway" msgstr "" From af6dd83f058651650c2b5fc582cdfcd2b7ea476e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sat, 2 May 2020 22:13:14 +1000 Subject: [PATCH 10/10] Rename .js files to .html This is required so they are parsed by the translation engine --- InvenTree/InvenTree/urls.py | 12 +- InvenTree/locale/de/LC_MESSAGES/django.mo | Bin 25831 -> 25916 bytes InvenTree/locale/de/LC_MESSAGES/django.po | 221 +++++++++++++++--- InvenTree/locale/en/LC_MESSAGES/django.po | 180 +++++++++++--- InvenTree/locale/es/LC_MESSAGES/django.po | 180 +++++++++++--- InvenTree/templates/js/{bom.js => bom.html} | 0 .../templates/js/{build.js => build.html} | 0 .../templates/js/{company.js => company.html} | 0 .../templates/js/{order.js => order.html} | 0 InvenTree/templates/js/{part.js => part.html} | 0 10 files changed, 486 insertions(+), 107 deletions(-) rename InvenTree/templates/js/{bom.js => bom.html} (100%) rename InvenTree/templates/js/{build.js => build.html} (100%) rename InvenTree/templates/js/{company.js => company.html} (100%) rename InvenTree/templates/js/{order.js => order.html} (100%) rename InvenTree/templates/js/{part.js => part.html} (100%) diff --git a/InvenTree/InvenTree/urls.py b/InvenTree/InvenTree/urls.py index 391541861b..e7530035d6 100644 --- a/InvenTree/InvenTree/urls.py +++ b/InvenTree/InvenTree/urls.py @@ -75,12 +75,12 @@ settings_urls = [ ] dynamic_javascript_urls = [ - url(r'^part.js', DynamicJsView.as_view(template_name='js/part.js'), name='part.js'), - url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.js'), name='stock.js'), - url(r'^build.js', DynamicJsView.as_view(template_name='js/build.js'), name='build.js'), - url(r'^order.js', DynamicJsView.as_view(template_name='js/order.js'), name='order.js'), - url(r'^company.js', DynamicJsView.as_view(template_name='js/company.js'), name='company.js'), - url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.js'), name='bom.js'), + url(r'^part.js', DynamicJsView.as_view(template_name='js/part.html'), name='part.js'), + url(r'^stock.js', DynamicJsView.as_view(template_name='js/stock.html'), name='stock.js'), + url(r'^build.js', DynamicJsView.as_view(template_name='js/build.html'), name='build.js'), + url(r'^order.js', DynamicJsView.as_view(template_name='js/order.html'), name='order.js'), + url(r'^company.js', DynamicJsView.as_view(template_name='js/company.html'), name='company.js'), + url(r'^bom.js', DynamicJsView.as_view(template_name='js/bom.html'), name='bom.js'), ] urlpatterns = [ diff --git a/InvenTree/locale/de/LC_MESSAGES/django.mo b/InvenTree/locale/de/LC_MESSAGES/django.mo index 84a39a22c6057a91a94248c8655a8247a799ee22..83b96a9ff9259221e70e26b868e0d7e8e0d5a916 100644 GIT binary patch delta 7656 zcmZA52V9rc9>?(`2q>}?0YQ)+C7ZvMfiGMkQ%xMrF>1 zqnlP<6}4NbWu`eOGe??DE$x23|L0V`?(=&6c%O5ganAXj^E{y6?yIt+qKflXt*TEO zj-o2YL}Tq5#+;-a5Uy5Z7Q`5nj*ns?zKcQVU(c98jKp9}#yZ#vYhrI(FUA1sv#~lZ zus(@-#yIAA3OStk3aepstTBwiBw+})Ky}ms^?=@}4u_&Q-h~>_1gwQ~Q3F_lJkq>~ zx^EZy;C_t5Pdw)xW3E#0r=cdTx*-~MVK%DcJk)@Cp=L4+BXO*)&%+4ni_sU?qB?v7 z8{#{t44%gN7#43#Dz?D@`ZuE}=!Pk%49vmWI3JaPXHf%r4gGK{YCyZJ2W|TosOwIn zGISX=;6E`G0}|Zl$D#U5K}Usj3VLu3Y7ILfNinx$6yArLVJU{;M$~nCP}iNZ?V6qj z9*!D7DrzaRu`c#N-9HYML8m_JuZ~M;(0*HmdcZrV4i4J(v#2$`fyz)oqC4O)REA=# zO;M@MwT?%1xEwW*b*Me^o^Ag$k^F09=j;VllZU zO*9qtpk=5TtVP|p3%&3ds>2hg6kkP6z=u((9*N3qW7N{*qXsezm7zP((E~?QkPd3* z&!9T^95u6J=#Q0H1HZRkxB9ZxwYh4c&L^TW+8mo>d(;w5MonxH2I0o0TaJ3pi^y2bKGYuj6}3sjnv?%L z3KY!wa|z=xf=0fgrZooQPz=GbsMmBR>UDbxGjSU-c5?-*V=SZ9^HMMf z`=Q>dVuu3z%*;cLbR8z*VSB+f)LKQRyEnw5AN5@9h+R-AUx<1emZJt%X6x%w9lnLy z1G_O8kE52txky1N3(j!YIvO>QBxLfY5Ov{P)E-%h+KgMV6&^yZZ4IWalr}`otP5)I zj6r2!64u07sOukh&pW2vEtpN#?Wh5Lh+6AUP#u1TjMZF0EkR;SH|1#hyL%yO zhRaa*m)rU_)Dj#-&HNIE<2BSkL$cfq$DyNO?a8PKWTN&^zHJ|mk<@2mT`WQEiS^m!pABxd(ol>Su^aYk>(0Csb>R!B zj>=IP*n}F`9#keS*z>=jGWI7%qfd@IkOb6Q(+zcfAJp@P=a7HRY?QrVChEZtpfa!q zy>SnYu0keI15V3jkT?pp1aG1SwioN*3Dj%-i>=4EcmF=fLT%QOsDaFMY~dl)0~ccf zo%rY>JdVgEL7j@m!*aWwrIy{3K*cH^?xM8i; z*}Xp*W9Z*>rJx6lM(xV^s5M)Jnt3@Y#XGIXQLou==!1S;+yMuoW*mvy)TyY~Iu|vt ziKv0Bux>&}Dc?guH=e*`yo_4oh_3E$v1HWiG!QkTsi-BmA9Y^|YO}6EKU|Lq_%_zZ zW2k}LM7`#vHqA^-!BW(NKfnk)f*QajtcL#G-7j7!s)Iz-9_nh_ z=VBc7MaZYXtheVcqCRl(1#Tw#7Lb3Xa10Gv^LtP;pNX33qo^4zLoGoWYG&K8I-Wp2 z=jL0~+Y?vlroICzvjZ^^??w%DDQd!Rq9%60p`dT~*QmAm*`Dz4;btTO**B&Grr-jM z!A+QkAEO@V-P7IOQK%(MLSO7*+xw&LD?&|RE-J&$N(!3sCe#4lN3HGWs7-Vpv+*Ws z&9ZvA4nRF<5^4Y?*aBZgEzxmQ2EIW}@OKQvfZp!;DD>C+U!Q^=&=ixfldX@(IO_8- z09T_1xB;~ncB48tgH`c2)Dqo5%`CEydw(kG`Gu(aMxrKiKlPTYm{dsBb~-mEG6~Z(>8e|0(_4RQJW2 z)JI!qU=a1kusN2ZHeCfOBZpBlKaG4m%~@3H8!>8in2s7~zODDgX4FSw3oJqY3C@Tp zG{Emrn=NF3F$~TO#5^p=OuT^Fgz*F2e|#38W;_Fxfd!~t{Q@?`w~>#hIfeS>Ck=8Z zRD>GHghAwA4=AHSU%)p|9Ua6}^d9UEpc(4*nv8l~OHiAy6xl>(2M)nK7>e;!l&MTq zrgBl4Da0B$0F~JhL&(1_m_&m%&s@}AC`G+Kt1t~;v3`jfXwXpCCRm4hA?DyH)cd{~ z^}6k~o<$9)>M(a8K^R3n!l9sDpN6_%FluDQs1Z*_4RDq{{|G9zOR*JhLuK$Ps$;L= z?!c09H1*E5z78X(A3$CIHHM?}6NPjNHEwhNkjTX_>O)X_VfpC0!CtD5r2N^{clG>yZ$+>i|bGs*k{|1qL$)3Y5+gj z^EXk~2j1bXX$q?2Ow=AIuohu7^{J@)m)QCW4Ac9+je<7C$EegE$1L<2;o2VczRpHv z;9@o+4>_|f6Z_b5n>y=VGruN ziL1m}VjZE^C69BxurX@M3hg~w_l~yAC%|}9&c#U7-l`z9v=@oi_PXwr7i#@=%p$dtf}1e*2%g<9R1j zY-f3#NTr-<>$+|#@fuN`w&p}AhtTn|%ilk9D6JwE*cPWMH_fEd%r@jwe}ZxfvBkDE!Va{* ziM`N=c+Z||fOUwCL~cjsl|&wLKmMC&YaiH? z@?(UKOrjO-J%}}w>)2}!=_JPnqCRcI3155eCT+8H^8b!gwq8|gx85L*5q`wC#AG6! z`0M!876PrKur3iwN8wm9CnjU_oR}3=HV4NBC-_evHD&Y%JH`}`n6f!0ucH3{09~;U A7XSbN delta 7566 zcmZA537n7B9>?)B!&rt{Ei;T+m@$iOFt#xa!_W+4Y-2YjyRJeDx`~ITLWmMlXi@H{ zL`f04H>C)1C%X_OTUipKq|bNGabIrF>-GD;&pFR|p0hueO<(z(-tOZa3oX6Ca1HV? zrUq85V9Yn9|EQu;W3nQRNx^K)!O0kiUts_q!XP}2;dmWGFgVKQYhgw5X;>b!oINnZ z7|#qO(V82}upEAi^ue6MV7!cK$T!+H6pW?F$DleAhoP8)YPcivi0O-Ja3cEQG>pON z?tT&a)4uuA6%?Z?UPd)|9n}%P7(0RxtVTY{McSo#ha)G)?p>wf_ndc zR0oec&!VRnUm>Bj`yCmysa(sL>evJ|!mg<8FcMX7GOFG}SN%#TI02-5o|#{xC1pq-#C9jP3=`@%{bd& z7gR@vqV~vmS3U#Pv1M`0zbbr8L4Dkb8u3lkREO5KGZE!XMNMHIsw0C?Ydr!PteJ}q z@O{*KPM}7912r>2@peg~Q8SU^ki%L8q^-~HjyYpV!Lw>mLh)uwZ=zKQ~x_MDW){Tl}V^2 z%SCl;DC*cf=3I=L^7Zci4%CvJM2-9kGDDsTNHT_RhN+F|*dA%iJmJdUa`|nj1}~vH z>{rKquuwCUgnrl@wP#wR8p^?PIKq{WMU8w42I>6IBB5jQGO7csUH$^9L0{%oBMw8Y zWh>NP>4AFjR8+m0s1Ythb!ate$~U7L+=ANNyHPWC1_Nl{+$N#j7{J166D6Tul!F>U zKI*}V=!^4E4bDeRaS>_&8(n@kYV(~$HFOizkq~;V8LEnUUk&t>Xi7pO&qXyb2Q{*J z=#PuB0>0r~d%w}j)Vr5iCUVGsE$u)!2IihnH0#y$VN6R zQ4Q}wHGBj$g45U-e?rYrbh3S}Ayy>c7WG^g)O-3OeJ~zskF7#&(jAzA=aQNKOcM3z zZXw#QqjnaSW!7@dYLsE*~i{BTr*_oMc}Bn-mm zQA_bUYR0^+B(&DWsE!;#25Wqq*orBrJ<=Ps8OLICoQYc7Pf=5P3^lS_sP{!O9h!l7 z48ew|`t4Bn3#^_QB1ggH)RQ)G06qli9 z=sm2An^Ak9*yS%_$@%wVIO<^)R6_}NIt5=KMdb!-Z1P3NP|^*b(q029eyLT%P+ZEZ)Aoh>~QdSM6bj0;dB zKY{A$dDL3}idxIE8FoseP;1-*qcIcJ&@ilybC7S2DMF3>Fls=jP~VxeSQEX#cD6!8 zjG!P5Rk4pNAAs6CBV2w0s@^o0UyABL5$f1(L+z1W$N@2jk?mzd+uOgOk0LYT znN=h-;?JDBP$NBnI+hnuGobIZ>QzED5Q&I1U@HL~LvgSTBirh~257VA@9fNF3Ks$(ys_C%3$GsciF#z?$^ zYA2*4OHBKwAqlNnDr)3;s3{)poQ^tP%h3bV){C6IWDgw}WqHo#)kG4jc>BZ@*TL0!~?>8PdXhGnro*1{nei%+3CvJ!PF z4xtA43u=G?*>+~*vRVHm3Nk6si^pIXPDOR#MJ$KwP+z)FPz~%xZK5l#Jh79V;#B0Q zoBpW#i%=i7ov0iFzH zP5sZPsrAXR$14og(N?Gt--{a9MASg$qB``d=WeV+ZMI#={xCmd5~g&qnW?)mET5fHve2ZfJD>`cSa33AJqZx0TNoHxQ==*u)7^dUDVolL@jX+hSR>uBcX~9U>-h$zIYrp zvXiKhoJV!w2C9Le9(F3@QM1htO*bAjBOYqxvyqRYc@EXVeW(VHp*nie?m}^?Ww! z3)rs@^RI>;rJydpiy3$rb-ZfywQH7++I*R)O*9hw;X_ynccNzMJJd{_L(R-}tbnSl zj#Nb5k3j96#D2`bHbW)_IzBnr7<)ROM)h=q^B{(kzmEKszy$ZV=RFs7+#Ys5hw9L3 zR7W;ob=-pNdUF(Yzmzw?_ACHZu?DJ#wNVusqo%eMHpk(pDO`$ixC+(5VjO{&UB2%? z_rXEcpNm!T6->bou^M{kNK_$FI^S-N>ez;SI;ta6kdK?0g^_pwwKP{zn<{LOeLfr2 zKmkVM1Z;r|Q4Q@znlfiG1UnX#EP-eGlF-^bg1S+NT8agz4lHr^S7HSD^{6%7i|Y7y zs6BAa>3^?1&QYl6(_B6aRew0@`AL|l^FN(LOA6LF&!f(3{9rpH-7%j0c+@dlf;wia zP@8chYKp&b_xGdr&}mm*eTe-q)xjjnJENW(k14corjmFBKfqp?G}P{T4>dDSq4vfL zs2Ny_+JqZ06pK-N<&^UxYLneSH5fh2Hkgf?kvvrW!RUpN7)?SA6k=VR?Ocz(_eo5vQzmOF}C#M!@9SV+Ds(SR6DJV?wVG=sYGd6v^@(yPCmkAxsw!~>dSF*))r*3l})_(wrNTMwf zMCck%M3aue4aA-6cM@@~&JTAAG1Zm5epi`}Sa%|Vd-q~v{11*IqFnucKFt3_3f2-j zQgyiz>TYI|e}m99#bPqKrz5zFI6$P4uS(<)bII%2Z6ulzttfj8yP>YV7V`)GM%++d z>%W2sp;9&CJn4TEx;`gv5B|acl5{-CqRXj%Mnn3g?-X@w5n~7P3 zu1iFD>c6)&hZhk`iLWB`5i6cY>LYKb(`-vPPjnFmF zJ-dqZJ*2C+d>d>{git=12qf**B(a`IBvS=jViGZe^wUHaq9b`-9q@jeG#R94kp7Su zLkw}{A2~%s>hvbok)EVHQB34gR*T^3ZT6LD|JBo(^mi^l4g1?lrV~yk-yW;Gvc9g~ z9d^3J60A7CW_Ts\n" "Language-Team: C \n" @@ -158,7 +158,7 @@ msgstr "Lagerobjekt bearbeiten" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 templates/js/build.html:120 msgid "Allocated" msgstr "Zugeordnet" @@ -187,7 +187,7 @@ msgstr "Überschuss darf 100% nicht überschreiten" msgid "Overage must be an integer value or a percentage" msgstr "Überschuss muss eine Ganzzahl oder ein Prozentwert sein" -#: InvenTree/views.py:548 +#: InvenTree/views.py:547 msgid "Database Statistics" msgstr "" @@ -230,7 +230,9 @@ msgstr "" #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:145 #: part/templates/part/part_app_base.html:7 -#: part/templates/part/set_category.html:13 +#: part/templates/part/set_category.html:13 templates/js/bom.html:135 +#: templates/js/build.html:41 templates/js/company.html:109 +#: templates/js/part.html:111 msgid "Part" msgstr "Teil" @@ -309,6 +311,7 @@ msgstr "Link zu einer externen URL" #: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: stock/models.py:439 stock/templates/stock/tabs.html:17 +#: templates/js/bom.html:229 msgid "Notes" msgstr "Notizen" @@ -403,7 +406,8 @@ msgstr "Seriennummer" #: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:154 -#: stock/templates/stock/stock_adjust.html:18 +#: stock/templates/stock/stock_adjust.html:18 templates/js/bom.html:172 +#: templates/js/build.html:52 msgid "Quantity" msgstr "Anzahl" @@ -415,20 +419,20 @@ msgid "Location" msgstr "Standort" #: build/templates/build/allocate.html:201 -#: order/templates/order/sales_order_detail.html:92 +#: order/templates/order/sales_order_detail.html:92 templates/js/build.html:124 #, fuzzy #| msgid "Edit Stock Location" msgid "Edit stock allocation" msgstr "Lagerobjekt-Standort bearbeiten" #: build/templates/build/allocate.html:202 -#: order/templates/order/sales_order_detail.html:93 +#: order/templates/order/sales_order_detail.html:93 templates/js/build.html:125 #, fuzzy #| msgid "Delete Stock Location" msgid "Delete stock allocation" msgstr "Standort löschen" -#: build/templates/build/allocate.html:229 +#: build/templates/build/allocate.html:229 templates/js/bom.html:288 #, fuzzy #| msgid "No serial numbers found" msgid "No BOM items found" @@ -439,11 +443,15 @@ msgstr "Keine Seriennummern gefunden" #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 +#: templates/js/bom.html:157 templates/js/company.html:60 +#: templates/js/order.html:157 templates/js/order.html:230 +#: templates/js/part.html:167 msgid "Description" msgstr "Beschreibung" #: build/templates/build/allocate.html:333 #: order/templates/order/purchase_order_detail.html:170 +#: templates/js/bom.html:164 msgid "Reference" msgstr "Referenz" @@ -504,7 +512,8 @@ msgstr "Lagerobjekt dem Bau zuweisen" #: build/templates/build/build_base.html:8 #: build/templates/build/build_base.html:34 #: build/templates/build/complete.html:6 -#: stock/templates/stock/item_base.html:168 templates/navbar.html:12 +#: stock/templates/stock/item_base.html:168 templates/js/build.html:33 +#: templates/navbar.html:12 msgid "Build" msgstr "Bau" @@ -526,7 +535,8 @@ msgstr "Bau-Status" #: build/templates/build/build_base.html:80 #: build/templates/build/detail.html:42 -#: stock/templates/stock/item_base.html:221 +#: stock/templates/stock/item_base.html:221 templates/js/build.html:57 +#: templates/js/order.html:162 templates/js/order.html:235 msgid "Status" msgstr "Status" @@ -536,7 +546,7 @@ msgstr "Status" #: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:27 -#: stock/templates/stock/item_base.html:122 +#: stock/templates/stock/item_base.html:122 templates/js/order.html:209 #, fuzzy #| msgid "Sales Orders" msgid "Sales Order" @@ -622,7 +632,7 @@ msgstr "Los" #: build/templates/build/detail.html:61 #: order/templates/order/order_base.html:93 -#: order/templates/order/sales_order_base.html:92 +#: order/templates/order/sales_order_base.html:92 templates/js/build.html:65 msgid "Created" msgstr "Erstellt" @@ -638,7 +648,7 @@ msgstr "Ja" msgid "No" msgstr "Nein" -#: build/templates/build/detail.html:80 +#: build/templates/build/detail.html:80 templates/js/build.html:70 msgid "Completed" msgstr "Fertig" @@ -951,7 +961,7 @@ msgid "Part packaging" msgstr "Teile-Packaging" #: company/templates/company/company_base.html:7 -#: company/templates/company/company_base.html:22 +#: company/templates/company/company_base.html:22 templates/js/company.html:38 msgid "Company" msgstr "Firma" @@ -962,7 +972,7 @@ msgstr "Firma" msgid "Company Details" msgstr "Firmenbemerkungen" -#: company/templates/company/company_base.html:48 +#: company/templates/company/company_base.html:48 templates/js/company.html:65 msgid "Website" msgstr "" @@ -985,6 +995,7 @@ msgstr "" #: company/templates/company/detail.html:16 #: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 +#: templates/js/company.html:48 templates/js/company.html:158 msgid "Manufacturer" msgstr "Hersteller" @@ -993,12 +1004,14 @@ msgstr "Hersteller" #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 -#: stock/templates/stock/item_base.html:196 +#: stock/templates/stock/item_base.html:196 templates/js/company.html:52 +#: templates/js/company.html:134 templates/js/order.html:144 msgid "Supplier" msgstr "Zulieferer" #: company/templates/company/detail.html:26 order/models.py:275 -#: order/templates/order/sales_order_base.html:73 +#: order/templates/order/sales_order_base.html:73 templates/js/company.html:44 +#: templates/js/order.html:217 msgid "Customer" msgstr "Kunde" @@ -1137,7 +1150,7 @@ msgstr "Bestellungen" #: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:19 stock/models.py:344 -#: stock/templates/stock/item_base.html:201 +#: stock/templates/stock/item_base.html:201 templates/js/company.html:150 msgid "Supplier Part" msgstr "Zulieferer-Teil" @@ -1181,6 +1194,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 +#: templates/js/company.html:174 #, fuzzy #| msgid "IPN" msgid "MPN" @@ -1222,6 +1236,7 @@ msgid "New Price Break" msgstr "" #: company/templates/company/supplier_part_pricing.html:28 +#: templates/js/bom.html:213 msgid "Price" msgstr "" @@ -1259,7 +1274,8 @@ msgstr "Teile-Packaging" #: company/templates/company/supplier_part_tabs.html:8 #: company/templates/company/tabs.html:12 part/templates/part/tabs.html:17 -#: stock/templates/stock/location.html:12 templates/navbar.html:11 +#: stock/templates/stock/location.html:12 templates/js/part.html:194 +#: templates/navbar.html:11 msgid "Stock" msgstr "Lagerbestand" @@ -1473,7 +1489,7 @@ msgstr "Position - Notizen" #: order/models.py:427 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:23 -#: stock/templates/stock/item_base.html:175 +#: stock/templates/stock/item_base.html:175 templates/js/order.html:136 msgid "Purchase Order" msgstr "Kaufvertrag" @@ -1544,7 +1560,7 @@ msgstr "Bestell-Referenz" msgid "Order Status" msgstr "Teile bestellen" -#: order/templates/order/order_base.html:80 +#: order/templates/order/order_base.html:80 templates/js/order.html:151 #, fuzzy #| msgid "Reference" msgid "Supplier Reference" @@ -1609,7 +1625,8 @@ msgid "Select existing purchase orders, or create new orders." msgstr "" #: order/templates/order/order_wizard/select_pos.html:31 -#: order/templates/order/po_tabs.html:5 +#: order/templates/order/po_tabs.html:5 templates/js/order.html:175 +#: templates/js/order.html:253 msgid "Items" msgstr "Positionen" @@ -1737,7 +1754,7 @@ msgstr "Teile" msgid "Sales Order Details" msgstr "Bestelldetails" -#: order/templates/order/sales_order_base.html:79 +#: order/templates/order/sales_order_base.html:79 templates/js/order.html:224 #, fuzzy #| msgid "Reference" msgid "Customer Reference" @@ -2257,7 +2274,7 @@ msgstr "bestellt" #: stock/templates/stock/item_base.html:8 #: stock/templates/stock/item_base.html:52 #: stock/templates/stock/item_base.html:183 -#: stock/templates/stock/stock_adjust.html:16 +#: stock/templates/stock/stock_adjust.html:16 templates/js/build.html:106 msgid "Stock Item" msgstr "Lagerobjekt" @@ -2364,6 +2381,7 @@ msgid "Variant Of" msgstr "Variante von" #: part/templates/part/detail.html:57 part/templates/part/set_category.html:15 +#: templates/js/part.html:181 msgid "Category" msgstr "Kategorie" @@ -2379,7 +2397,7 @@ msgstr "Einheiten" msgid "Minimum Stock" msgstr "Minimaler Lagerbestand" -#: part/templates/part/detail.html:101 +#: part/templates/part/detail.html:101 templates/js/order.html:243 #, fuzzy #| msgid "Create new Stock Item" msgid "Creation Date" @@ -2539,7 +2557,8 @@ msgstr "" msgid "This part is a variant of" msgstr "Dieses Teil ist nicht aktiv" -#: part/templates/part/part_base.html:30 +#: part/templates/part/part_base.html:30 templates/js/company.html:125 +#: templates/js/part.html:158 msgid "Inactive" msgstr "" @@ -2571,7 +2590,7 @@ msgstr "Lagerbestand dem Bau zuweisen" msgid "Allocated to Sales Orders" msgstr "Lagerbestand dem Bau zuweisen" -#: part/templates/part/part_base.html:128 +#: part/templates/part/part_base.html:128 templates/js/part.html:210 msgid "On Order" msgstr "bestellt" @@ -2629,7 +2648,8 @@ msgstr "Zulieferer-Teil" msgid "Create New Part" msgstr "Neues Lagerobjekt hinzufügen" -#: part/templates/part/stock_count.html:7 +#: part/templates/part/stock_count.html:7 templates/js/bom.html:203 +#: templates/js/part.html:218 #, fuzzy #| msgid "Stock" msgid "No Stock" @@ -3463,6 +3483,142 @@ msgstr "Code auf GitHub ansehen" msgid "Submit Bug Report" msgstr "" +#: templates/js/bom.html:143 +msgid "Open subassembly" +msgstr "" + +#: templates/js/bom.html:194 templates/js/build.html:113 +msgid "Available" +msgstr "verfügbar" + +#: templates/js/bom.html:219 +#, fuzzy +#| msgid "Available" +msgid "No pricing available" +msgstr "verfügbar" + +#: templates/js/bom.html:239 +#, fuzzy +#| msgid "Stock Item" +msgid "Validate BOM Item" +msgstr "Lagerobjekt" + +#: templates/js/bom.html:240 +msgid "This line has been validated" +msgstr "" + +#: templates/js/bom.html:242 +#, fuzzy +#| msgid "Edit Stock Item" +msgid "Edit BOM Item" +msgstr "Lagerobjekt bearbeiten" + +#: templates/js/bom.html:243 +#, fuzzy +#| msgid "Delete Stock Item" +msgid "Delete BOM Item" +msgstr "Lagerobjekt löschen" + +#: templates/js/build.html:19 +msgid "No builds matching query" +msgstr "" + +#: templates/js/build.html:102 +#, fuzzy +#| msgid "Allocated" +msgid "No parts allocated for" +msgstr "Zugeordnet" + +#: templates/js/company.html:29 +#, fuzzy +#| msgid "Link to external company information" +msgid "No company information found" +msgstr "Link auf externe Firmeninformation" + +#: templates/js/company.html:101 +#, fuzzy +#| msgid "No serial numbers found" +msgid "No supplier parts found" +msgstr "Keine Seriennummern gefunden" + +#: templates/js/company.html:117 templates/js/part.html:136 +#, fuzzy +#| msgid "Parameter Template" +msgid "Template part" +msgstr "Parameter Vorlage" + +#: templates/js/company.html:121 templates/js/part.html:140 +#, fuzzy +#| msgid "Assembly" +msgid "Assembled part" +msgstr "Baugruppe" + +#: templates/js/company.html:178 +msgid "Link" +msgstr "" + +#: templates/js/order.html:126 +#, fuzzy +#| msgid "Purchase Order" +msgid "No purchase orders found" +msgstr "Kaufvertrag" + +#: templates/js/order.html:170 +msgid "Date" +msgstr "" + +#: templates/js/order.html:199 +#, fuzzy +#| msgid "No serial numbers found" +msgid "No sales orders found" +msgstr "Keine Seriennummern gefunden" + +#: templates/js/order.html:248 +msgid "Shipment Date" +msgstr "" + +#: templates/js/part.html:104 +#, fuzzy +#| msgid "Select part" +msgid "Select" +msgstr "Teil auswählen" + +#: templates/js/part.html:144 +#, fuzzy +#| msgid "Required Parts" +msgid "Starred part" +msgstr "benötigte Teile" + +#: templates/js/part.html:148 +#, fuzzy +#| msgid "Sellable" +msgid "Salable part" +msgstr "Verkaufbar" + +#: templates/js/part.html:187 +#, fuzzy +#| msgid "Part category" +msgid "No category" +msgstr "Teile-Kategorie" + +#: templates/js/part.html:205 templates/table_filters.html:95 +#, fuzzy +#| msgid "Stock" +msgid "Low stock" +msgstr "Lagerbestand" + +#: templates/js/part.html:214 +#, fuzzy +#| msgid "Build" +msgid "Building" +msgstr "Bau" + +#: templates/js/part.html:232 +#, fuzzy +#| msgid "No serial numbers found" +msgid "No parts found" +msgstr "Keine Seriennummern gefunden" + #: templates/navbar.html:14 msgid "Buy" msgstr "" @@ -3623,12 +3779,6 @@ msgstr "Parameter Vorlage" msgid "Stock available" msgstr "verfügbar" -#: templates/table_filters.html:95 -#, fuzzy -#| msgid "Stock" -msgid "Low stock" -msgstr "Lagerbestand" - #: templates/table_filters.html:107 msgid "Starred" msgstr "" @@ -3642,9 +3792,6 @@ msgstr "Kaufbar" #~ msgid "Allocate Stock to Build" #~ msgstr "Lagerbestand dem Bau zuweisen" -#~ msgid "Available" -#~ msgstr "verfügbar" - #~ msgid "Required Parts" #~ msgstr "benötigte Teile" diff --git a/InvenTree/locale/en/LC_MESSAGES/django.po b/InvenTree/locale/en/LC_MESSAGES/django.po index 8bc436a43d..85ebc1e513 100644 --- a/InvenTree/locale/en/LC_MESSAGES/django.po +++ b/InvenTree/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-02 12:07+0000\n" +"POT-Creation-Date: 2020-05-02 12:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -153,7 +153,7 @@ msgstr "" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 templates/js/build.html:120 msgid "Allocated" msgstr "" @@ -182,7 +182,7 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:548 +#: InvenTree/views.py:547 msgid "Database Statistics" msgstr "" @@ -221,7 +221,9 @@ msgstr "" #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:145 #: part/templates/part/part_app_base.html:7 -#: part/templates/part/set_category.html:13 +#: part/templates/part/set_category.html:13 templates/js/bom.html:135 +#: templates/js/build.html:41 templates/js/company.html:109 +#: templates/js/part.html:111 msgid "Part" msgstr "" @@ -288,6 +290,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: stock/models.py:439 stock/templates/stock/tabs.html:17 +#: templates/js/bom.html:229 msgid "Notes" msgstr "" @@ -371,7 +374,8 @@ msgstr "" #: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:154 -#: stock/templates/stock/stock_adjust.html:18 +#: stock/templates/stock/stock_adjust.html:18 templates/js/bom.html:172 +#: templates/js/build.html:52 msgid "Quantity" msgstr "" @@ -383,16 +387,16 @@ msgid "Location" msgstr "" #: build/templates/build/allocate.html:201 -#: order/templates/order/sales_order_detail.html:92 +#: order/templates/order/sales_order_detail.html:92 templates/js/build.html:124 msgid "Edit stock allocation" msgstr "" #: build/templates/build/allocate.html:202 -#: order/templates/order/sales_order_detail.html:93 +#: order/templates/order/sales_order_detail.html:93 templates/js/build.html:125 msgid "Delete stock allocation" msgstr "" -#: build/templates/build/allocate.html:229 +#: build/templates/build/allocate.html:229 templates/js/bom.html:288 msgid "No BOM items found" msgstr "" @@ -401,11 +405,15 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 +#: templates/js/bom.html:157 templates/js/company.html:60 +#: templates/js/order.html:157 templates/js/order.html:230 +#: templates/js/part.html:167 msgid "Description" msgstr "" #: build/templates/build/allocate.html:333 #: order/templates/order/purchase_order_detail.html:170 +#: templates/js/bom.html:164 msgid "Reference" msgstr "" @@ -452,7 +460,8 @@ msgstr "" #: build/templates/build/build_base.html:8 #: build/templates/build/build_base.html:34 #: build/templates/build/complete.html:6 -#: stock/templates/stock/item_base.html:168 templates/navbar.html:12 +#: stock/templates/stock/item_base.html:168 templates/js/build.html:33 +#: templates/navbar.html:12 msgid "Build" msgstr "" @@ -470,7 +479,8 @@ msgstr "" #: build/templates/build/build_base.html:80 #: build/templates/build/detail.html:42 -#: stock/templates/stock/item_base.html:221 +#: stock/templates/stock/item_base.html:221 templates/js/build.html:57 +#: templates/js/order.html:162 templates/js/order.html:235 msgid "Status" msgstr "" @@ -480,7 +490,7 @@ msgstr "" #: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:27 -#: stock/templates/stock/item_base.html:122 +#: stock/templates/stock/item_base.html:122 templates/js/order.html:209 msgid "Sales Order" msgstr "" @@ -553,7 +563,7 @@ msgstr "" #: build/templates/build/detail.html:61 #: order/templates/order/order_base.html:93 -#: order/templates/order/sales_order_base.html:92 +#: order/templates/order/sales_order_base.html:92 templates/js/build.html:65 msgid "Created" msgstr "" @@ -569,7 +579,7 @@ msgstr "" msgid "No" msgstr "" -#: build/templates/build/detail.html:80 +#: build/templates/build/detail.html:80 templates/js/build.html:70 msgid "Completed" msgstr "" @@ -840,7 +850,7 @@ msgid "Part packaging" msgstr "" #: company/templates/company/company_base.html:7 -#: company/templates/company/company_base.html:22 +#: company/templates/company/company_base.html:22 templates/js/company.html:38 msgid "Company" msgstr "" @@ -849,7 +859,7 @@ msgstr "" msgid "Company Details" msgstr "" -#: company/templates/company/company_base.html:48 +#: company/templates/company/company_base.html:48 templates/js/company.html:65 msgid "Website" msgstr "" @@ -872,6 +882,7 @@ msgstr "" #: company/templates/company/detail.html:16 #: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 +#: templates/js/company.html:48 templates/js/company.html:158 msgid "Manufacturer" msgstr "" @@ -880,12 +891,14 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 -#: stock/templates/stock/item_base.html:196 +#: stock/templates/stock/item_base.html:196 templates/js/company.html:52 +#: templates/js/company.html:134 templates/js/order.html:144 msgid "Supplier" msgstr "" #: company/templates/company/detail.html:26 order/models.py:275 -#: order/templates/order/sales_order_base.html:73 +#: order/templates/order/sales_order_base.html:73 templates/js/company.html:44 +#: templates/js/order.html:217 msgid "Customer" msgstr "" @@ -995,7 +1008,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:19 stock/models.py:344 -#: stock/templates/stock/item_base.html:201 +#: stock/templates/stock/item_base.html:201 templates/js/company.html:150 msgid "Supplier Part" msgstr "" @@ -1029,6 +1042,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 +#: templates/js/company.html:174 msgid "MPN" msgstr "" @@ -1062,6 +1076,7 @@ msgid "New Price Break" msgstr "" #: company/templates/company/supplier_part_pricing.html:28 +#: templates/js/bom.html:213 msgid "Price" msgstr "" @@ -1091,7 +1106,8 @@ msgstr "" #: company/templates/company/supplier_part_tabs.html:8 #: company/templates/company/tabs.html:12 part/templates/part/tabs.html:17 -#: stock/templates/stock/location.html:12 templates/navbar.html:11 +#: stock/templates/stock/location.html:12 templates/js/part.html:194 +#: templates/navbar.html:11 msgid "Stock" msgstr "" @@ -1265,7 +1281,7 @@ msgstr "" #: order/models.py:427 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:23 -#: stock/templates/stock/item_base.html:175 +#: stock/templates/stock/item_base.html:175 templates/js/order.html:136 msgid "Purchase Order" msgstr "" @@ -1320,7 +1336,7 @@ msgstr "" msgid "Order Status" msgstr "" -#: order/templates/order/order_base.html:80 +#: order/templates/order/order_base.html:80 templates/js/order.html:151 msgid "Supplier Reference" msgstr "" @@ -1375,7 +1391,8 @@ msgid "Select existing purchase orders, or create new orders." msgstr "" #: order/templates/order/order_wizard/select_pos.html:31 -#: order/templates/order/po_tabs.html:5 +#: order/templates/order/po_tabs.html:5 templates/js/order.html:175 +#: templates/js/order.html:253 msgid "Items" msgstr "" @@ -1479,7 +1496,7 @@ msgstr "" msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:79 +#: order/templates/order/sales_order_base.html:79 templates/js/order.html:224 msgid "Customer Reference" msgstr "" @@ -1928,7 +1945,7 @@ msgstr "" #: stock/templates/stock/item_base.html:8 #: stock/templates/stock/item_base.html:52 #: stock/templates/stock/item_base.html:183 -#: stock/templates/stock/stock_adjust.html:16 +#: stock/templates/stock/stock_adjust.html:16 templates/js/build.html:106 msgid "Stock Item" msgstr "" @@ -2027,6 +2044,7 @@ msgid "Variant Of" msgstr "" #: part/templates/part/detail.html:57 part/templates/part/set_category.html:15 +#: templates/js/part.html:181 msgid "Category" msgstr "" @@ -2042,7 +2060,7 @@ msgstr "" msgid "Minimum Stock" msgstr "" -#: part/templates/part/detail.html:101 +#: part/templates/part/detail.html:101 templates/js/order.html:243 msgid "Creation Date" msgstr "" @@ -2178,7 +2196,8 @@ msgstr "" msgid "This part is a variant of" msgstr "" -#: part/templates/part/part_base.html:30 +#: part/templates/part/part_base.html:30 templates/js/company.html:125 +#: templates/js/part.html:158 msgid "Inactive" msgstr "" @@ -2206,7 +2225,7 @@ msgstr "" msgid "Allocated to Sales Orders" msgstr "" -#: part/templates/part/part_base.html:128 +#: part/templates/part/part_base.html:128 templates/js/part.html:210 msgid "On Order" msgstr "" @@ -2250,7 +2269,8 @@ msgstr "" msgid "Create New Part" msgstr "" -#: part/templates/part/stock_count.html:7 +#: part/templates/part/stock_count.html:7 templates/js/bom.html:203 +#: templates/js/part.html:218 msgid "No Stock" msgstr "" @@ -2958,6 +2978,106 @@ msgstr "" msgid "Submit Bug Report" msgstr "" +#: templates/js/bom.html:143 +msgid "Open subassembly" +msgstr "" + +#: templates/js/bom.html:194 templates/js/build.html:113 +msgid "Available" +msgstr "" + +#: templates/js/bom.html:219 +msgid "No pricing available" +msgstr "" + +#: templates/js/bom.html:239 +msgid "Validate BOM Item" +msgstr "" + +#: templates/js/bom.html:240 +msgid "This line has been validated" +msgstr "" + +#: templates/js/bom.html:242 +msgid "Edit BOM Item" +msgstr "" + +#: templates/js/bom.html:243 +msgid "Delete BOM Item" +msgstr "" + +#: templates/js/build.html:19 +msgid "No builds matching query" +msgstr "" + +#: templates/js/build.html:102 +msgid "No parts allocated for" +msgstr "" + +#: templates/js/company.html:29 +msgid "No company information found" +msgstr "" + +#: templates/js/company.html:101 +msgid "No supplier parts found" +msgstr "" + +#: templates/js/company.html:117 templates/js/part.html:136 +msgid "Template part" +msgstr "" + +#: templates/js/company.html:121 templates/js/part.html:140 +msgid "Assembled part" +msgstr "" + +#: templates/js/company.html:178 +msgid "Link" +msgstr "" + +#: templates/js/order.html:126 +msgid "No purchase orders found" +msgstr "" + +#: templates/js/order.html:170 +msgid "Date" +msgstr "" + +#: templates/js/order.html:199 +msgid "No sales orders found" +msgstr "" + +#: templates/js/order.html:248 +msgid "Shipment Date" +msgstr "" + +#: templates/js/part.html:104 +msgid "Select" +msgstr "" + +#: templates/js/part.html:144 +msgid "Starred part" +msgstr "" + +#: templates/js/part.html:148 +msgid "Salable part" +msgstr "" + +#: templates/js/part.html:187 +msgid "No category" +msgstr "" + +#: templates/js/part.html:205 templates/table_filters.html:95 +msgid "Low stock" +msgstr "" + +#: templates/js/part.html:214 +msgid "Building" +msgstr "" + +#: templates/js/part.html:232 +msgid "No parts found" +msgstr "" + #: templates/navbar.html:14 msgid "Buy" msgstr "" @@ -3078,10 +3198,6 @@ msgstr "" msgid "Stock available" msgstr "" -#: templates/table_filters.html:95 -msgid "Low stock" -msgstr "" - #: templates/table_filters.html:107 msgid "Starred" msgstr "" diff --git a/InvenTree/locale/es/LC_MESSAGES/django.po b/InvenTree/locale/es/LC_MESSAGES/django.po index 8bc436a43d..85ebc1e513 100644 --- a/InvenTree/locale/es/LC_MESSAGES/django.po +++ b/InvenTree/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-02 12:07+0000\n" +"POT-Creation-Date: 2020-05-02 12:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -153,7 +153,7 @@ msgstr "" #: InvenTree/status_codes.py:214 build/templates/build/allocate.html:349 #: order/templates/order/sales_order_detail.html:220 -#: part/templates/part/tabs.html:21 +#: part/templates/part/tabs.html:21 templates/js/build.html:120 msgid "Allocated" msgstr "" @@ -182,7 +182,7 @@ msgstr "" msgid "Overage must be an integer value or a percentage" msgstr "" -#: InvenTree/views.py:548 +#: InvenTree/views.py:547 msgid "Database Statistics" msgstr "" @@ -221,7 +221,9 @@ msgstr "" #: order/templates/order/order_wizard/select_parts.html:30 #: order/templates/order/purchase_order_detail.html:145 #: part/templates/part/part_app_base.html:7 -#: part/templates/part/set_category.html:13 +#: part/templates/part/set_category.html:13 templates/js/bom.html:135 +#: templates/js/build.html:41 templates/js/company.html:109 +#: templates/js/part.html:111 msgid "Part" msgstr "" @@ -288,6 +290,7 @@ msgstr "" #: order/templates/order/purchase_order_detail.html:200 #: order/templates/order/so_tabs.html:23 part/templates/part/tabs.html:63 #: stock/models.py:439 stock/templates/stock/tabs.html:17 +#: templates/js/bom.html:229 msgid "Notes" msgstr "" @@ -371,7 +374,8 @@ msgstr "" #: stock/templates/stock/item_base.html:20 #: stock/templates/stock/item_base.html:26 #: stock/templates/stock/item_base.html:154 -#: stock/templates/stock/stock_adjust.html:18 +#: stock/templates/stock/stock_adjust.html:18 templates/js/bom.html:172 +#: templates/js/build.html:52 msgid "Quantity" msgstr "" @@ -383,16 +387,16 @@ msgid "Location" msgstr "" #: build/templates/build/allocate.html:201 -#: order/templates/order/sales_order_detail.html:92 +#: order/templates/order/sales_order_detail.html:92 templates/js/build.html:124 msgid "Edit stock allocation" msgstr "" #: build/templates/build/allocate.html:202 -#: order/templates/order/sales_order_detail.html:93 +#: order/templates/order/sales_order_detail.html:93 templates/js/build.html:125 msgid "Delete stock allocation" msgstr "" -#: build/templates/build/allocate.html:229 +#: build/templates/build/allocate.html:229 templates/js/bom.html:288 msgid "No BOM items found" msgstr "" @@ -401,11 +405,15 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:27 #: order/templates/order/purchase_order_detail.html:157 #: part/templates/part/detail.html:38 part/templates/part/set_category.html:14 +#: templates/js/bom.html:157 templates/js/company.html:60 +#: templates/js/order.html:157 templates/js/order.html:230 +#: templates/js/part.html:167 msgid "Description" msgstr "" #: build/templates/build/allocate.html:333 #: order/templates/order/purchase_order_detail.html:170 +#: templates/js/bom.html:164 msgid "Reference" msgstr "" @@ -452,7 +460,8 @@ msgstr "" #: build/templates/build/build_base.html:8 #: build/templates/build/build_base.html:34 #: build/templates/build/complete.html:6 -#: stock/templates/stock/item_base.html:168 templates/navbar.html:12 +#: stock/templates/stock/item_base.html:168 templates/js/build.html:33 +#: templates/navbar.html:12 msgid "Build" msgstr "" @@ -470,7 +479,8 @@ msgstr "" #: build/templates/build/build_base.html:80 #: build/templates/build/detail.html:42 -#: stock/templates/stock/item_base.html:221 +#: stock/templates/stock/item_base.html:221 templates/js/build.html:57 +#: templates/js/order.html:162 templates/js/order.html:235 msgid "Status" msgstr "" @@ -480,7 +490,7 @@ msgstr "" #: order/templates/order/sales_order_notes.html:10 #: order/templates/order/sales_order_ship.html:25 #: part/templates/part/allocation.html:27 -#: stock/templates/stock/item_base.html:122 +#: stock/templates/stock/item_base.html:122 templates/js/order.html:209 msgid "Sales Order" msgstr "" @@ -553,7 +563,7 @@ msgstr "" #: build/templates/build/detail.html:61 #: order/templates/order/order_base.html:93 -#: order/templates/order/sales_order_base.html:92 +#: order/templates/order/sales_order_base.html:92 templates/js/build.html:65 msgid "Created" msgstr "" @@ -569,7 +579,7 @@ msgstr "" msgid "No" msgstr "" -#: build/templates/build/detail.html:80 +#: build/templates/build/detail.html:80 templates/js/build.html:70 msgid "Completed" msgstr "" @@ -840,7 +850,7 @@ msgid "Part packaging" msgstr "" #: company/templates/company/company_base.html:7 -#: company/templates/company/company_base.html:22 +#: company/templates/company/company_base.html:22 templates/js/company.html:38 msgid "Company" msgstr "" @@ -849,7 +859,7 @@ msgstr "" msgid "Company Details" msgstr "" -#: company/templates/company/company_base.html:48 +#: company/templates/company/company_base.html:48 templates/js/company.html:65 msgid "Website" msgstr "" @@ -872,6 +882,7 @@ msgstr "" #: company/templates/company/detail.html:16 #: company/templates/company/supplier_part_base.html:76 #: company/templates/company/supplier_part_detail.html:30 +#: templates/js/company.html:48 templates/js/company.html:158 msgid "Manufacturer" msgstr "" @@ -880,12 +891,14 @@ msgstr "" #: company/templates/company/supplier_part_detail.html:21 order/models.py:111 #: order/templates/order/order_base.html:74 #: order/templates/order/order_wizard/select_pos.html:30 -#: stock/templates/stock/item_base.html:196 +#: stock/templates/stock/item_base.html:196 templates/js/company.html:52 +#: templates/js/company.html:134 templates/js/order.html:144 msgid "Supplier" msgstr "" #: company/templates/company/detail.html:26 order/models.py:275 -#: order/templates/order/sales_order_base.html:73 +#: order/templates/order/sales_order_base.html:73 templates/js/company.html:44 +#: templates/js/order.html:217 msgid "Customer" msgstr "" @@ -995,7 +1008,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:6 #: company/templates/company/supplier_part_base.html:19 stock/models.py:344 -#: stock/templates/stock/item_base.html:201 +#: stock/templates/stock/item_base.html:201 templates/js/company.html:150 msgid "Supplier Part" msgstr "" @@ -1029,6 +1042,7 @@ msgstr "" #: company/templates/company/supplier_part_base.html:80 #: company/templates/company/supplier_part_detail.html:31 +#: templates/js/company.html:174 msgid "MPN" msgstr "" @@ -1062,6 +1076,7 @@ msgid "New Price Break" msgstr "" #: company/templates/company/supplier_part_pricing.html:28 +#: templates/js/bom.html:213 msgid "Price" msgstr "" @@ -1091,7 +1106,8 @@ msgstr "" #: company/templates/company/supplier_part_tabs.html:8 #: company/templates/company/tabs.html:12 part/templates/part/tabs.html:17 -#: stock/templates/stock/location.html:12 templates/navbar.html:11 +#: stock/templates/stock/location.html:12 templates/js/part.html:194 +#: templates/navbar.html:11 msgid "Stock" msgstr "" @@ -1265,7 +1281,7 @@ msgstr "" #: order/models.py:427 order/templates/order/order_base.html:9 #: order/templates/order/order_base.html:23 -#: stock/templates/stock/item_base.html:175 +#: stock/templates/stock/item_base.html:175 templates/js/order.html:136 msgid "Purchase Order" msgstr "" @@ -1320,7 +1336,7 @@ msgstr "" msgid "Order Status" msgstr "" -#: order/templates/order/order_base.html:80 +#: order/templates/order/order_base.html:80 templates/js/order.html:151 msgid "Supplier Reference" msgstr "" @@ -1375,7 +1391,8 @@ msgid "Select existing purchase orders, or create new orders." msgstr "" #: order/templates/order/order_wizard/select_pos.html:31 -#: order/templates/order/po_tabs.html:5 +#: order/templates/order/po_tabs.html:5 templates/js/order.html:175 +#: templates/js/order.html:253 msgid "Items" msgstr "" @@ -1479,7 +1496,7 @@ msgstr "" msgid "Sales Order Details" msgstr "" -#: order/templates/order/sales_order_base.html:79 +#: order/templates/order/sales_order_base.html:79 templates/js/order.html:224 msgid "Customer Reference" msgstr "" @@ -1928,7 +1945,7 @@ msgstr "" #: stock/templates/stock/item_base.html:8 #: stock/templates/stock/item_base.html:52 #: stock/templates/stock/item_base.html:183 -#: stock/templates/stock/stock_adjust.html:16 +#: stock/templates/stock/stock_adjust.html:16 templates/js/build.html:106 msgid "Stock Item" msgstr "" @@ -2027,6 +2044,7 @@ msgid "Variant Of" msgstr "" #: part/templates/part/detail.html:57 part/templates/part/set_category.html:15 +#: templates/js/part.html:181 msgid "Category" msgstr "" @@ -2042,7 +2060,7 @@ msgstr "" msgid "Minimum Stock" msgstr "" -#: part/templates/part/detail.html:101 +#: part/templates/part/detail.html:101 templates/js/order.html:243 msgid "Creation Date" msgstr "" @@ -2178,7 +2196,8 @@ msgstr "" msgid "This part is a variant of" msgstr "" -#: part/templates/part/part_base.html:30 +#: part/templates/part/part_base.html:30 templates/js/company.html:125 +#: templates/js/part.html:158 msgid "Inactive" msgstr "" @@ -2206,7 +2225,7 @@ msgstr "" msgid "Allocated to Sales Orders" msgstr "" -#: part/templates/part/part_base.html:128 +#: part/templates/part/part_base.html:128 templates/js/part.html:210 msgid "On Order" msgstr "" @@ -2250,7 +2269,8 @@ msgstr "" msgid "Create New Part" msgstr "" -#: part/templates/part/stock_count.html:7 +#: part/templates/part/stock_count.html:7 templates/js/bom.html:203 +#: templates/js/part.html:218 msgid "No Stock" msgstr "" @@ -2958,6 +2978,106 @@ msgstr "" msgid "Submit Bug Report" msgstr "" +#: templates/js/bom.html:143 +msgid "Open subassembly" +msgstr "" + +#: templates/js/bom.html:194 templates/js/build.html:113 +msgid "Available" +msgstr "" + +#: templates/js/bom.html:219 +msgid "No pricing available" +msgstr "" + +#: templates/js/bom.html:239 +msgid "Validate BOM Item" +msgstr "" + +#: templates/js/bom.html:240 +msgid "This line has been validated" +msgstr "" + +#: templates/js/bom.html:242 +msgid "Edit BOM Item" +msgstr "" + +#: templates/js/bom.html:243 +msgid "Delete BOM Item" +msgstr "" + +#: templates/js/build.html:19 +msgid "No builds matching query" +msgstr "" + +#: templates/js/build.html:102 +msgid "No parts allocated for" +msgstr "" + +#: templates/js/company.html:29 +msgid "No company information found" +msgstr "" + +#: templates/js/company.html:101 +msgid "No supplier parts found" +msgstr "" + +#: templates/js/company.html:117 templates/js/part.html:136 +msgid "Template part" +msgstr "" + +#: templates/js/company.html:121 templates/js/part.html:140 +msgid "Assembled part" +msgstr "" + +#: templates/js/company.html:178 +msgid "Link" +msgstr "" + +#: templates/js/order.html:126 +msgid "No purchase orders found" +msgstr "" + +#: templates/js/order.html:170 +msgid "Date" +msgstr "" + +#: templates/js/order.html:199 +msgid "No sales orders found" +msgstr "" + +#: templates/js/order.html:248 +msgid "Shipment Date" +msgstr "" + +#: templates/js/part.html:104 +msgid "Select" +msgstr "" + +#: templates/js/part.html:144 +msgid "Starred part" +msgstr "" + +#: templates/js/part.html:148 +msgid "Salable part" +msgstr "" + +#: templates/js/part.html:187 +msgid "No category" +msgstr "" + +#: templates/js/part.html:205 templates/table_filters.html:95 +msgid "Low stock" +msgstr "" + +#: templates/js/part.html:214 +msgid "Building" +msgstr "" + +#: templates/js/part.html:232 +msgid "No parts found" +msgstr "" + #: templates/navbar.html:14 msgid "Buy" msgstr "" @@ -3078,10 +3198,6 @@ msgstr "" msgid "Stock available" msgstr "" -#: templates/table_filters.html:95 -msgid "Low stock" -msgstr "" - #: templates/table_filters.html:107 msgid "Starred" msgstr "" diff --git a/InvenTree/templates/js/bom.js b/InvenTree/templates/js/bom.html similarity index 100% rename from InvenTree/templates/js/bom.js rename to InvenTree/templates/js/bom.html diff --git a/InvenTree/templates/js/build.js b/InvenTree/templates/js/build.html similarity index 100% rename from InvenTree/templates/js/build.js rename to InvenTree/templates/js/build.html diff --git a/InvenTree/templates/js/company.js b/InvenTree/templates/js/company.html similarity index 100% rename from InvenTree/templates/js/company.js rename to InvenTree/templates/js/company.html diff --git a/InvenTree/templates/js/order.js b/InvenTree/templates/js/order.html similarity index 100% rename from InvenTree/templates/js/order.js rename to InvenTree/templates/js/order.html diff --git a/InvenTree/templates/js/part.js b/InvenTree/templates/js/part.html similarity index 100% rename from InvenTree/templates/js/part.js rename to InvenTree/templates/js/part.html