From ef23ab1abc075be8149ff9f2884a565e582c76ff Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 18 Feb 2021 17:59:04 +1100 Subject: [PATCH 01/22] Adds functionality for traversing "through" installed items to extract test results --- InvenTree/stock/models.py | 47 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 84cc696593..5d7cce5132 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -699,6 +699,36 @@ class StockItem(MPTTModel): return True + def get_installed_items(self, cascade=False): + """ + Return all stock items which are *installed* in this one! + + Args: + cascade - Include items which are installed in items which are installed in items + + Note: This function is recursive, and may result in a number of database hits! + """ + + installed = set() + + items = StockItem.objects.filter(belongs_to=self) + + for item in items: + + # Prevent recursion + if item not in installed: + installed.add(item) + + if cascade: + sub_items = item.get_installed_items(cascade=True) + + for sub_item in sub_items: + # Prevent recursion + if sub_item not in installed: + installed.add(sub_item) + + return installed + def installedItemCount(self): """ Return the number of stock items installed inside this one. @@ -1286,6 +1316,23 @@ class StockItem(MPTTModel): key = helpers.generateTestKey(result.test) result_map[key] = result + # Do we wish to include test results from installed items? + include_installed = kwargs.get('include_installed', False) + + # Do we wish to "cascade" and include test results from installed stock items? + cascade = kwargs.get('cascade', False) + + if include_installed: + installed_items = get_installed_items(cascade=cascade) + + for item in installed_items: + item_results = item.testResultMap + + for key in item_results.keys(): + # Results from sub items should not override master ones + if key not in result_map.keys(): + result_map[key] = item_results[key] + return result_map def testResultList(self, **kwargs): From a9f255be853fcc355a061db6e52b4483eff9607c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Thu, 18 Feb 2021 18:01:41 +1100 Subject: [PATCH 02/22] Prevent stock item being added as an installed item inside itself --- InvenTree/stock/models.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 5d7cce5132..2cfaf2ce68 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -714,18 +714,23 @@ class StockItem(MPTTModel): items = StockItem.objects.filter(belongs_to=self) for item in items: + + # Prevent duplication or recursion + if item == self or item in installed: + continue - # Prevent recursion - if item not in installed: - installed.add(item) + installed.add(item) if cascade: sub_items = item.get_installed_items(cascade=True) for sub_item in sub_items: + # Prevent recursion - if sub_item not in installed: - installed.add(sub_item) + if sub_item == self or sub_item in installed: + continue + + installed.add(sub_item) return installed From 556d6455e8dff440e58e74f5787a81a009c6083d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 11:08:58 +1100 Subject: [PATCH 03/22] Add "packaging" field for StockItem --- .../migrations/0058_stockitem_packaging.py | 18 ++++++++++++++++++ InvenTree/stock/models.py | 8 ++++++++ 2 files changed, 26 insertions(+) create mode 100644 InvenTree/stock/migrations/0058_stockitem_packaging.py diff --git a/InvenTree/stock/migrations/0058_stockitem_packaging.py b/InvenTree/stock/migrations/0058_stockitem_packaging.py new file mode 100644 index 0000000000..ee33724588 --- /dev/null +++ b/InvenTree/stock/migrations/0058_stockitem_packaging.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2021-02-19 00:04 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('stock', '0057_stock_location_item_owner'), + ] + + operations = [ + migrations.AddField( + model_name='stockitem', + name='packaging', + field=models.CharField(blank=True, help_text='Packaging this stock item is stored in', max_length=50, null=True, verbose_name='Packaging'), + ), + ] diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 84cc696593..5088a314b5 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -155,6 +155,7 @@ class StockItem(MPTTModel): infinite: If True this StockItem can never be exhausted sales_order: Link to a SalesOrder object (if the StockItem has been assigned to a SalesOrder) purchase_price: The unit purchase price for this StockItem - this is the unit price at time of purchase (if this item was purchased from an external supplier) + packaging: Description of how the StockItem is packaged (e.g. "reel", "loose", "tape" etc) """ # A Query filter which will be re-used in multiple places to determine if a StockItem is actually "in stock" @@ -387,6 +388,13 @@ class StockItem(MPTTModel): help_text=_('Where is this stock item located?') ) + packaging = models.CharField( + max_length=50, + blank=True, null=True, + verbose_name=_('Packaging'), + help_text=_('Packaging this stock item is stored in') + ) + belongs_to = models.ForeignKey( 'self', verbose_name=_('Installed In'), From 644583f6368883460645207bfb23ece330c505a3 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 11:09:24 +1100 Subject: [PATCH 04/22] Display packaging info in stock table --- InvenTree/stock/serializers.py | 1 + InvenTree/templates/js/stock.js | 31 ++++++++++++++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/InvenTree/stock/serializers.py b/InvenTree/stock/serializers.py index b8e71ff58c..9cb2538ba7 100644 --- a/InvenTree/stock/serializers.py +++ b/InvenTree/stock/serializers.py @@ -198,6 +198,7 @@ class StockItemSerializer(InvenTreeModelSerializer): 'location', 'location_detail', 'notes', + 'packaging', 'part', 'part_detail', 'pk', diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 3e6fee43e4..4ffcc2aee4 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -359,6 +359,29 @@ function loadStockTable(table, options) { else if (field == 'part_detail.description') { return row.part_detail.description; } + else if (field == 'packaging') { + var packaging = []; + + data.forEach(function(item) { + var pkg = String(item.packaging); + + if (!pkg || pkg == '') { + pkg = '-'; + } + + if (!packaging.includes(pkg)) { + packaging.push(pkg); + } + }); + + if (packaging.length > 1) { + return "..."; + } else if (packaging.length == 1) { + return packaging[0]; + } else { + return "-"; + } + } else if (field == 'quantity') { var stock = 0; var items = 0; @@ -388,7 +411,7 @@ function loadStockTable(table, options) { // Multiple status codes if (statii.length > 1) { - return "-"; + return "..."; } else if (statii.length == 1) { return stockStatusDisplay(statii[0]); } else { @@ -619,6 +642,12 @@ function loadStockTable(table, options) { title: '{% trans "Last Updated" %}', sortable: true, }, + { + field: 'packaging', + title: '{% trans "Packaging" %}', + sortable: true, + searchable: true, + }, { field: 'notes', title: '{% trans "Notes" %}', From e8bacbe45f366bd4bc03dddfa1da4efd6a6308af Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 11:11:22 +1100 Subject: [PATCH 05/22] Edit packaging field --- InvenTree/stock/forms.py | 2 ++ InvenTree/stock/templates/stock/item_base.html | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/InvenTree/stock/forms.py b/InvenTree/stock/forms.py index 7659981ecd..0bec20a3e8 100644 --- a/InvenTree/stock/forms.py +++ b/InvenTree/stock/forms.py @@ -134,6 +134,7 @@ class CreateStockItemForm(HelperForm): 'quantity', 'batch', 'serial_numbers', + 'packaging', 'purchase_price', 'expiry_date', 'link', @@ -414,6 +415,7 @@ class EditStockItemForm(HelperForm): 'status', 'expiry_date', 'purchase_price', + 'packaging', 'link', 'delete_on_deplete', 'owner', diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index 93d60fb3d1..aa33412ab3 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -283,6 +283,13 @@ InvenTree | {% trans "Stock Item" %} - {{ item }} {{ item.batch }} {% endif %} + {% if item.packaging %} + + + {% trans "Packaging" %} + {{ item.packaging }} + + {% endif %} {% if item.build %} From 098b494047e786b9555dfc920cf435fe19cfb760 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 11:31:38 +1100 Subject: [PATCH 06/22] Add option to disable stock item grouping --- InvenTree/common/models.py | 7 +++++++ InvenTree/templates/InvenTree/settings/stock.html | 11 ++++++----- InvenTree/templates/js/stock.js | 9 ++++++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/InvenTree/common/models.py b/InvenTree/common/models.py index d893206126..52f38bea18 100644 --- a/InvenTree/common/models.py +++ b/InvenTree/common/models.py @@ -242,6 +242,13 @@ class InvenTreeSetting(models.Model): 'validator': bool, }, + 'STOCK_GROUP_BY_PART': { + 'name': _('Group by Part'), + 'description': _('Group stock items by part reference in table views'), + 'default': True, + 'validator': bool, + }, + 'BUILDORDER_REFERENCE_PREFIX': { 'name': _('Build Order Reference Prefix'), 'description': _('Prefix value for build order reference'), diff --git a/InvenTree/templates/InvenTree/settings/stock.html b/InvenTree/templates/InvenTree/settings/stock.html index 588f01e0e9..9c82202a02 100644 --- a/InvenTree/templates/InvenTree/settings/stock.html +++ b/InvenTree/templates/InvenTree/settings/stock.html @@ -15,11 +15,12 @@ {% include "InvenTree/settings/header.html" %} - {% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" %} - {% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" %} - {% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" %} - {% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_BUILD" %} - {% include "InvenTree/settings/setting.html" with key="STOCK_OWNERSHIP_CONTROL" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_GROUP_BY_PART" icon="fa-layer-group" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_ENABLE_EXPIRY" icon="fa-stopwatch" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_STALE_DAYS" icon="fa-calendar" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_SALE" icon="fa-truck" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_ALLOW_EXPIRED_BUILD" icon="fa-tools" %} + {% include "InvenTree/settings/setting.html" with key="STOCK_OWNERSHIP_CONTROL" icon="fa-users" %}
{% endblock %} diff --git a/InvenTree/templates/js/stock.js b/InvenTree/templates/js/stock.js index 4ffcc2aee4..f1794f3664 100644 --- a/InvenTree/templates/js/stock.js +++ b/InvenTree/templates/js/stock.js @@ -327,11 +327,13 @@ function loadStockTable(table, options) { url: options.url || "{% url 'api-stock-list' %}", queryParams: filters, customSort: customGroupSorter, - groupBy: true, name: 'stock', original: original, showColumns: true, + {% settings_value 'STOCK_GROUP_BY_PART' as group_by_part %} + {% if group_by_part %} groupByField: options.groupByField || 'part', + groupBy: true, groupByFormatter: function(field, id, data) { var row = data[0]; @@ -363,9 +365,9 @@ function loadStockTable(table, options) { var packaging = []; data.forEach(function(item) { - var pkg = String(item.packaging); + var pkg = item.packaging; - if (!pkg || pkg == '') { + if (!pkg) { pkg = '-'; } @@ -491,6 +493,7 @@ function loadStockTable(table, options) { return ''; } }, + {% endif %} columns: [ { checkbox: true, From ba71ce941f2a439f8f47dc44f35e22ce43af552f Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 14:34:21 +1100 Subject: [PATCH 07/22] Display supplier part packaging --- .../company/templates/company/supplier_part_base.html | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/InvenTree/company/templates/company/supplier_part_base.html b/InvenTree/company/templates/company/supplier_part_base.html index 7476a7c606..fde4e745d5 100644 --- a/InvenTree/company/templates/company/supplier_part_base.html +++ b/InvenTree/company/templates/company/supplier_part_base.html @@ -83,12 +83,21 @@ src="{% static 'img/blank_image.png' %}" {% trans "Manufacturer" %} {{ part.manufacturer.name }} + {% endif %} + {% if part.MPN %} {% trans "MPN" %} {{ part.MPN }} {% endif %} + {% if part.packaging %} + + + {% trans "Packaging" %} + {{ part.packaging }} + + {% endif %} {% if part.note %} From ea4b713eedf51b2d64b1d37e3951324264db022e Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Fri, 19 Feb 2021 15:13:56 +1100 Subject: [PATCH 08/22] Allow adjustment for destroyed (or lost) stock --- InvenTree/stock/models.py | 21 +++++++++++++++++++ .../stock/templates/stock/item_base.html | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/InvenTree/stock/models.py b/InvenTree/stock/models.py index 5088a314b5..ef934f73d0 100644 --- a/InvenTree/stock/models.py +++ b/InvenTree/stock/models.py @@ -832,6 +832,27 @@ class StockItem(MPTTModel): return query.exists() + @property + def can_adjust_location(self): + """ + Returns True if the stock location can be "adjusted" for this part + + Cannot be adjusted if: + - Has been delivered to a customer + - Has been installed inside another StockItem + """ + + if self.customer is not None: + return False + + if self.belongs_to is not None: + return False + + if self.sales_order is not None: + return False + + return True + @property def tracking_info_count(self): return self.tracking_info.count() diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index aa33412ab3..a9c8337b57 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -155,7 +155,7 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
{% endblock %} @@ -68,7 +36,7 @@ function addHeaderTitle(title) { ); } -function addHeaderAction(label, title, icon) { +function addHeaderAction(label, title, icon, options) { // Add an action block to the action list $("#action-item-list").append( `
  • @@ -86,7 +54,7 @@ function addHeaderAction(label, title, icon) { $("#detail-item-list").append( `
  • ${title}

    -
    +
  • ` ); @@ -102,6 +70,13 @@ function addHeaderAction(label, title, icon) { // Show the one we want $(`#detail-${label}`).show(); }); + + // Connect a callback to the table + $(`#table-${label}`).on('load-success.bs.table', function() { + var count = $(`#table-${label}`).bootstrapTable('getData').length; + + $(`#badge-${label}`).html(count); + }); } {% if roles.part.view %} @@ -109,6 +84,30 @@ addHeaderTitle('{% trans "Parts" %}'); addHeaderAction('starred-parts', '{% trans "Starred Parts" %}', 'fa-star'); addHeaderAction('latest-parts', '{% trans "Latest Parts" %}', 'fa-newspaper'); addHeaderAction('bom-validation', '{% trans "BOM Waiting Validation" %}', 'fa-times-circle'); + + +loadSimplePartTable("#table-latest-parts", "{% url 'api-part-list' %}", { + params: { + ordering: "-creation_date", + limit: 10, + }, + name: 'latest_parts', +}); + +loadSimplePartTable("#table-starred-parts", "{% url 'api-part-list' %}", { + params: { + "starred": true, + }, + name: 'starred_parts', +}); + +loadSimplePartTable("#table-bom-validation", "{% url 'api-part-list' %}", { + params: { + "bom_valid": false, + }, + name: 'bom_invalid_parts', +}); + {% endif %} {% if roles.stock.view %} @@ -119,50 +118,47 @@ addHeaderAction('stock-to-build', '{% trans "Required for Build Orders" %}', 'fa {% if expiry %} addHeaderAction('expired-stock', '{% trans "Expired Stock" %}', 'fa-calendar-times'); addHeaderAction('stale-stock', '{% trans "Stale Stock" %}', 'fa-stopwatch'); + +loadStockTable($("#table-expired-stock"), { + params: { + expired: true, + location_detail: true, + part_detail: true, + }, +}); + +loadStockTable($("#table-stale-stock"), { + params: { + stale: true, + expired: false, + location_detail: true, + part_detail: true, + }, +}); {% endif %} + +loadSimplePartTable("#table-low-stock", "{% url 'api-part-list' %}", { + params: { + low_stock: true, + }, + name: "low_stock_parts", +}); + +loadSimplePartTable("#table-stock-to-build", "{% url 'api-part-list' %}", { + params: { + stock_to_build: true, + }, + name: "to_build_parts", +}); + {% endif %} {% if roles.build.view %} addHeaderTitle('{% trans "Build Orders" %}'); -addHeaderAction('build-pending', '{% trans "In Progress" %}', 'fa-cogs'); -addHeaderAction('build-overdue', '{% trans "Overdue" %}', 'fa-calendar-times'); -{% endif %} +addHeaderAction('build-pending', '{% trans "Build Orders In Progress" %}', 'fa-cogs'); +addHeaderAction('build-overdue', '{% trans "Overdue Build Orders" %}', 'fa-calendar-times'); -{% if roles.purchase_order.view %} -addHeaderTitle('{% trans "Purchase Orders" %}'); -addHeaderAction('po-outstanding', '{% trans "Outstanding" %}', 'fa-sign-in-alt'); -addHeaderAction('po-overdue', '{% trans "Overdue" %}', 'fa-calendar-times'); -{% endif %} - -{% if roles.sales_order.view %} -addHeaderTitle('{% trans "Sales Orders" %}'); -addHeaderAction('so-outstanding', '{% trans "Outstanding" %}', 'fa-sign-out-alt'); -addHeaderAction('so-overdue', '{% trans "Overdue" %}', 'fa-calendar-times'); -{% endif %} - -loadSimplePartTable("#latest-parts-table", "{% url 'api-part-list' %}", { - params: { - ordering: "-creation_date", - limit: 10, - }, - name: 'latest_parts', -}); - -loadSimplePartTable("#starred-parts-table", "{% url 'api-part-list' %}", { - params: { - "starred": true, - }, - name: 'starred_parts', -}); - -loadSimplePartTable("#bom-invalid-table", "{% url 'api-part-list' %}", { - params: { - "bom_valid": false, - }, - name: 'bom_invalid_parts', -}); - -loadBuildTable("#build-pending-table", { +loadBuildTable("#table-build-pending", { url: "{% url 'api-build-list' %}", params: { part_detail: true, @@ -171,7 +167,7 @@ loadBuildTable("#build-pending-table", { disableFilters: true, }); -loadBuildTable("#build-overdue-table", { +loadBuildTable("#table-build-overdue", { url: "{% url 'api-build-list' %}", params: { part_detail: true, @@ -179,39 +175,14 @@ loadBuildTable("#build-overdue-table", { }, disableFilters: true, }); +{% endif %} -loadStockTable($("#expired-stock-table"), { - params: { - expired: true, - location_detail: true, - part_detail: true, - }, -}); +{% if roles.purchase_order.view %} +addHeaderTitle('{% trans "Purchase Orders" %}'); +addHeaderAction('po-outstanding', '{% trans "Outstanding Purchase Orders" %}', 'fa-sign-in-alt'); +addHeaderAction('po-overdue', '{% trans "Overdue Purchase Orders" %}', 'fa-calendar-times'); -loadStockTable($("#stale-stock-table"), { - params: { - stale: true, - expired: false, - location_detail: true, - part_detail: true, - }, -}); - -loadSimplePartTable("#low-stock-table", "{% url 'api-part-list' %}", { - params: { - low_stock: true, - }, - name: "low_stock_parts", -}); - -loadSimplePartTable("#stock-to-build-table", "{% url 'api-part-list' %}", { - params: { - stock_to_build: true, - }, - name: "to_build_parts", -}); - -loadPurchaseOrderTable("#po-outstanding-table", { +loadPurchaseOrderTable("#table-po-outstanding", { url: "{% url 'api-po-list' %}", params: { supplier_detail: true, @@ -219,7 +190,7 @@ loadPurchaseOrderTable("#po-outstanding-table", { } }); -loadPurchaseOrderTable("#po-overdue-table", { +loadPurchaseOrderTable("#table-po-overdue", { url: "{% url 'api-po-list' %}", params: { supplier_detail: true, @@ -227,7 +198,14 @@ loadPurchaseOrderTable("#po-overdue-table", { } }); -loadSalesOrderTable("#so-outstanding-table", { +{% endif %} + +{% if roles.sales_order.view %} +addHeaderTitle('{% trans "Sales Orders" %}'); +addHeaderAction('so-outstanding', '{% trans "Outstanding Sales Orders" %}', 'fa-sign-out-alt'); +addHeaderAction('so-overdue', '{% trans "Overdue Sales Orders" %}', 'fa-calendar-times'); + +loadSalesOrderTable("#table-so-outstanding", { url: "{% url 'api-so-list' %}", params: { customer_detail: true, @@ -235,7 +213,7 @@ loadSalesOrderTable("#so-outstanding-table", { }, }); -loadSalesOrderTable("#so-overdue-table", { +loadSalesOrderTable("#table-so-overdue", { url: "{% url 'api-so-list' %}", params: { overdue: true, @@ -243,20 +221,6 @@ loadSalesOrderTable("#so-overdue-table", { } }); -{% include "InvenTree/index/on_load.html" with label="latest-parts" %} -{% include "InvenTree/index/on_load.html" with label="starred-parts" %} -{% include "InvenTree/index/on_load.html" with label="bom-invalid" %} -{% include "InvenTree/index/on_load.html" with label="build-pending" %} -{% include "InvenTree/index/on_load.html" with label="build-overdue" %} - -{% include "InvenTree/index/on_load.html" with label="expired-stock" %} -{% include "InvenTree/index/on_load.html" with label="stale-stock" %} -{% include "InvenTree/index/on_load.html" with label="low-stock" %} -{% include "InvenTree/index/on_load.html" with label="stock-to-build" %} - -{% include "InvenTree/index/on_load.html" with label="po-outstanding" %} -{% include "InvenTree/index/on_load.html" with label="po-overdue" %} -{% include "InvenTree/index/on_load.html" with label="so-outstanding" %} -{% include "InvenTree/index/on_load.html" with label="so-overdue" %} +{% endif %} {% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/index/on_load.html b/InvenTree/templates/InvenTree/index/on_load.html deleted file mode 100644 index a63479e60d..0000000000 --- a/InvenTree/templates/InvenTree/index/on_load.html +++ /dev/null @@ -1,5 +0,0 @@ -$("#{{ label }}-table").on('load-success.bs.table', function() { - var count = $("#{{ label }}-table").bootstrapTable('getData').length; - - $("#{{ label }}-count").html(count); -}); \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/latest_parts.html b/InvenTree/templates/InvenTree/latest_parts.html deleted file mode 100644 index e88ada9548..0000000000 --- a/InvenTree/templates/InvenTree/latest_parts.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Latest Parts" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/low_stock.html b/InvenTree/templates/InvenTree/low_stock.html deleted file mode 100644 index a4d2fb4e0f..0000000000 --- a/InvenTree/templates/InvenTree/low_stock.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Low Stock" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/po_outstanding.html b/InvenTree/templates/InvenTree/po_outstanding.html deleted file mode 100644 index 8393e36b97..0000000000 --- a/InvenTree/templates/InvenTree/po_outstanding.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Outstanding Purchase Orders" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/po_overdue.html b/InvenTree/templates/InvenTree/po_overdue.html deleted file mode 100644 index 99e3e7d40f..0000000000 --- a/InvenTree/templates/InvenTree/po_overdue.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Overdue Purchase Orders" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/required_stock_build.html b/InvenTree/templates/InvenTree/required_stock_build.html deleted file mode 100644 index 337ed289ba..0000000000 --- a/InvenTree/templates/InvenTree/required_stock_build.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Require Stock To Complete Build" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/so_outstanding.html b/InvenTree/templates/InvenTree/so_outstanding.html deleted file mode 100644 index a1c978264f..0000000000 --- a/InvenTree/templates/InvenTree/so_outstanding.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Outstanding Sales Orders" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/so_overdue.html b/InvenTree/templates/InvenTree/so_overdue.html deleted file mode 100644 index bf2b64a1e3..0000000000 --- a/InvenTree/templates/InvenTree/so_overdue.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Overdue Sales Orders" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/stale_stock.html b/InvenTree/templates/InvenTree/stale_stock.html deleted file mode 100644 index 3cbb74369c..0000000000 --- a/InvenTree/templates/InvenTree/stale_stock.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Stale Stock" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/starred_parts.html b/InvenTree/templates/InvenTree/starred_parts.html deleted file mode 100644 index ae8b9ecc1d..0000000000 --- a/InvenTree/templates/InvenTree/starred_parts.html +++ /dev/null @@ -1,15 +0,0 @@ -{% extends "collapse_index.html" %} - -{% load i18n %} - -{% block collapse_title %} - -{% trans "Starred Parts" %} -{% endblock %} - -{% block collapse_content %} - - -
    - -{% endblock %} \ No newline at end of file From dffff89e9d1e1d68591b953241a19dd260af372b Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 20:08:23 +1100 Subject: [PATCH 14/22] Add option to filter out variants in stock table --- InvenTree/stock/api.py | 13 ++++++++++--- InvenTree/templates/js/table_filters.js | 5 +++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/InvenTree/stock/api.py b/InvenTree/stock/api.py index 36ea8d453d..4e532b90b7 100644 --- a/InvenTree/stock/api.py +++ b/InvenTree/stock/api.py @@ -684,10 +684,17 @@ class StockList(generics.ListCreateAPIView): try: part = Part.objects.get(pk=part_id) - # Filter by any parts "under" the given part - parts = part.get_descendants(include_self=True) + # Do we wish to filter *just* for this part, or also for parts *under* this one? + include_variants = str2bool(params.get('include_variants', True)) - queryset = queryset.filter(part__in=parts) + if include_variants: + # Filter by any parts "under" the given part + parts = part.get_descendants(include_self=True) + + queryset = queryset.filter(part__in=parts) + + else: + queryset = queryset.filter(part=part) except (ValueError, Part.DoesNotExist): raise ValidationError({"part": "Invalid Part ID specified"}) diff --git a/InvenTree/templates/js/table_filters.js b/InvenTree/templates/js/table_filters.js index 4c802446fc..39224c4ffe 100644 --- a/InvenTree/templates/js/table_filters.js +++ b/InvenTree/templates/js/table_filters.js @@ -130,6 +130,11 @@ function getAvailableTableFilters(tableKey) { title: '{% trans "In Production" %}', description: '{% trans "Show items which are in production" %}', }, + include_variants: { + type: 'bool', + title: '{% trans "Include Variants" %}', + description: '{% trans "Include stock items for variant parts" %}', + }, installed: { type: 'bool', title: '{% trans "Installed" %}', From d11adf3b346feeeb08a62b60cd724794281d1412 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 20:18:14 +1100 Subject: [PATCH 15/22] fade in --- InvenTree/templates/InvenTree/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index c72dd5264a..bad3d3e9d7 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -68,7 +68,7 @@ function addHeaderAction(label, title, icon, options) { }); // Show the one we want - $(`#detail-${label}`).show(); + $(`#detail-${label}`).fadeIn(); }); // Connect a callback to the table From e53c6e9975cea9d7ca743a1659ff0ab0c7a0fce2 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 20:29:48 +1100 Subject: [PATCH 16/22] Fancy --- InvenTree/InvenTree/static/css/inventree.css | 10 ++++++++++ InvenTree/templates/InvenTree/index.html | 15 ++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index ac3d402c3b..2e044d3e6f 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -50,6 +50,16 @@ border-radius: 5px; } +.index-bg { + width: 100%; + object-fit: fill; + opacity: 5%; +} + +.index-action-selected { + background-color: #EEEEF5; +} + .markdownx .row { margin: 5px; padding: 5px; diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index bad3d3e9d7..ff69bf16d7 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -1,5 +1,6 @@ {% extends "base.html" %} {% load i18n %} +{% load static %} {% load inventree_extras %} {% block page_title %} InvenTree | {% trans "Index" %} @@ -15,7 +16,11 @@ InvenTree | {% trans "Index" %}
      - +
    • +
      + +
      +
    @@ -69,6 +74,14 @@ function addHeaderAction(label, title, icon, options) { // Show the one we want $(`#detail-${label}`).fadeIn(); + + // Remove css class from all action items + $("#action-item-list").children('li').each(function() { + $(this).removeClass('index-action-selected'); + }) + + // Add css class to the action we are interested in + $(`#action-${label}`).addClass('index-action-selected'); }); // Connect a callback to the table From 745188082b38fb5842be0d72d42674ce9d6193e1 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 21:06:44 +1100 Subject: [PATCH 17/22] Add more searchable fields to SupplierPart model --- InvenTree/company/api.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/InvenTree/company/api.py b/InvenTree/company/api.py index 731fd193fa..3398760d45 100644 --- a/InvenTree/company/api.py +++ b/InvenTree/company/api.py @@ -184,6 +184,8 @@ class SupplierPartList(generics.ListCreateAPIView): 'manufacturer__name', 'description', 'MPN', + 'part__name', + 'part__description', ] From afd7199a69a4ece29c2beddb99beae0b1c068c38 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 21:06:52 +1100 Subject: [PATCH 18/22] Cleanup search page too --- InvenTree/InvenTree/static/css/inventree.css | 8 + InvenTree/templates/InvenTree/index.html | 10 +- InvenTree/templates/InvenTree/search.html | 232 ++++++++++++------- 3 files changed, 159 insertions(+), 91 deletions(-) diff --git a/InvenTree/InvenTree/static/css/inventree.css b/InvenTree/InvenTree/static/css/inventree.css index 2e044d3e6f..a0053e5f53 100644 --- a/InvenTree/InvenTree/static/css/inventree.css +++ b/InvenTree/InvenTree/static/css/inventree.css @@ -497,6 +497,14 @@ background-color: #f33; } +.badge-orange { + background-color: #fcba03; +} + +.badge-green { + background-color: #1A1; +} + .part-thumb { width: 200px; height: 200px; diff --git a/InvenTree/templates/InvenTree/index.html b/InvenTree/templates/InvenTree/index.html index ff69bf16d7..687ceaf0ee 100644 --- a/InvenTree/templates/InvenTree/index.html +++ b/InvenTree/templates/InvenTree/index.html @@ -26,10 +26,6 @@ InvenTree | {% trans "Index" %} {% endblock %} -{% block js_load %} -{{ block.super }} -{% endblock %} - {% block js_ready %} {{ block.super }} @@ -78,7 +74,7 @@ function addHeaderAction(label, title, icon, options) { // Remove css class from all action items $("#action-item-list").children('li').each(function() { $(this).removeClass('index-action-selected'); - }) + }); // Add css class to the action we are interested in $(`#action-${label}`).addClass('index-action-selected'); @@ -89,6 +85,10 @@ function addHeaderAction(label, title, icon, options) { var count = $(`#table-${label}`).bootstrapTable('getData').length; $(`#badge-${label}`).html(count); + + if (count > 0) { + $(`#badge-${label}`).addClass('badge-orange'); + } }); } diff --git a/InvenTree/templates/InvenTree/search.html b/InvenTree/templates/InvenTree/search.html index d78204270a..4fc7442856 100644 --- a/InvenTree/templates/InvenTree/search.html +++ b/InvenTree/templates/InvenTree/search.html @@ -9,98 +9,123 @@ InvenTree | {% trans "Search Results" %} {% block content %} -

    {% trans "Search Results" %}

    +

    + {% trans "Search Results" %} +

    -
    -{% include "search_form.html" with query_text=query %} +
    + {% include "search_form.html" with query_text=query %}
    -

    -
    - {% if query %} - -
    -

    {% trans "No results found for " %}'{{ query }}'

    -
    - -{% include "InvenTree/search_part_category.html" with collapse_id="categories" %} - -{% include "InvenTree/search_parts.html" with collapse_id='parts' %} - -{% include "InvenTree/search_company.html" with collapse_id='companies' %} - -{% include "InvenTree/search_supplier_parts.html" with collapse_id='supplier_parts' %} - -{% include "InvenTree/search_stock_location.html" with collapse_id="locations" %} - -{% include "InvenTree/search_stock_items.html" with collapse_id="stock" %} - {% else %} -
    -

    {% trans "Enter a search query" %}

    +

    {% trans "Enter a search query" %}

    - {% endif %} -{% endblock %} +
    +
      +
    +
    +
    +
      +
    • +
      + +
      +
    • +
    +
    -{% block js_load %} -{{ block.super }} - {% endblock %} {% block js_ready %} {{ block.super }} - function onSearchResults(table, output) { + function addItemTitle(title) { + // Add header block to the results list + $('#search-item-list').append( + `
  • ${title}
  • ` + ); + } - $(table).on('load-success.bs.table', function() { + function addItem(label, title, icon, options) { + // Add a search itme to the action list + $('#search-item-list').append( + `
  • + + + ${title} + + + + +
  • ` + ); - var panel = $(output).closest('.panel-group'); + // Add a results table + $('#search-result-list').append( + `
  • +

    ${title}

    +
    +
  • ` + ); - var n = $(table).bootstrapTable('getData').length; + // Hide the results table + $(`#search-result-${label}`).hide(); - var text = ''; - if (n == 0) { - text = 'No results' + // Add callback when the action is clicked + $(`#search-item-${label}`).click(function() { - $(panel).hide(); + // Hide all childs + $('#search-result-list').children('li').each(function() { + $(this).hide(); + }); - } else { - text = n + ' result'; + // Show the one we want + $(`#search-result-${label}`).fadeIn(); - if (n > 1) { - text += 's'; - } + // Remove css class from all action items + $("#search-item-list").children('li').each(function() { + $(this).removeClass('index-action-selected'); + }); + + // Add css class to the action we are interested in + $(`#search-item-${label}`).addClass('index-action-selected'); + }); - $(panel).show(); + // Connect a callback to the table + $(`#table-${label}`).on('load-success.bs.table', function() { + var count = $(`#table-${label}`).bootstrapTable('getData').length; - var collapse = panel.find('.panel-collapse'); + $(`#badge-${label}`).html(count); - collapse.collapse('show'); - - $("#no-search-results").hide(); + if (count > 0) { + $(`#badge-${label}`).addClass('badge-orange'); } - - $(output).html(`${text}`); }); } - onSearchResults("#category-results-table", "#category-results-count"); - - onSearchResults("#location-results-table", "#location-results-count"); - - onSearchResults("#stock-results-table", "#stock-results-count"); - - onSearchResults('#part-results-table', '#part-result-count'); + {% if roles.part.view %} + addItemTitle('{% trans "Part" %}'); - onSearchResults('#company-results-table', '#company-result-count'); - - onSearchResults('#supplier-part-results-table', '#supplier-part-result-count'); + addItem('part', '{% trans "Parts" %}', 'fa-shapes'); - $("#category-results-table").inventreeTable({ + loadPartTable("#table-part", + "{% url 'api-part-list' %}", + { + params: { + search: "{{ query }}", + }, + checkbox: false, + disableFilters: true, + } + ); + + addItem('category', '{% trans "Part Categories" %}', 'fa-sitemap'); + + $("#table-category").inventreeTable({ url: "{% url 'api-part-category-list' %}", queryParams: { search: "{{ query }}", @@ -120,7 +145,29 @@ InvenTree | {% trans "Search Results" %} ], }); - $('#stock-results-table').inventreeTable({ + addItem('supplier-part', '{% trans "Supplier Parts" %}', 'fa-pallet'); + + loadSupplierPartTable( + "#table-supplier-part", + "{% url 'api-supplier-part-list' %}", + { + params: { + search: "{{ query }}", + part_detail: true, + supplier_detail: true, + manufacturer_detail: true + }, + } + ); + + {% endif %} + + {% if roles.stock.view %} + addItemTitle('{% trans "Stock" %}'); + + addItem('stock', '{% trans "Stock Items" %}', 'fa-boxes'); + + $('#table-stock').inventreeTable({ url: "{% url 'api-stock-list' %}", queryParams: { search: "{{ query }}", @@ -199,8 +246,9 @@ InvenTree | {% trans "Search Results" %} ] }); + addItem('location', '{% trans "Stock Locations" %}', 'fa-map-marker-alt'); - $("#location-results-table").inventreeTable({ + $("#table-location").inventreeTable({ url: "{% url 'api-location-list' %}", queryParams: { search: "{{ query }}", @@ -220,36 +268,48 @@ InvenTree | {% trans "Search Results" %} ], }); + {% endif %} - loadPartTable("#part-results-table", - "{% url 'api-part-list' %}", - { - params: { - search: "{{ query }}", - }, - checkbox: false, - disableFilters: true, - } - ); - + {% if roles.purchase_order.view or roles.sales_order.view %} + addItemTitle('{% trans "Company" %}'); - loadCompanyTable('#company-results-table', "{% url 'api-company-list' %}", { + {% if roles.purchase_order.view %} + addItem('supplier', '{% trans "Suppliers" %}', 'fa-building'); + + loadCompanyTable('#table-supplier', "{% url 'api-company-list' %}", { params: { search: "{{ query }}", + is_supplier: "true", } }); - loadSupplierPartTable( - "#supplier-part-results-table", - "{% url 'api-supplier-part-list' %}", - { - params: { - search: "{{ query }}", - part_detail: true, - supplier_detail: true, - manufacturer_detail: true - }, + addItem('manufacturer', '{% trans "Manufacturers" %}', 'fa-industry'); + + loadCompanyTable('#table-manufacturer', "{% url 'api-company-list' %}", { + params: { + search: "{{ query }}", + is_manufacturer: "true", } - ); + }); + + + {% endif %} + + {% if roles.sales_order.view %} + addItem('customer', '{% trans "Customers" %}', 'fa-user-tie'); + + loadCompanyTable('#table-customer', "{% url 'api-company-list' %}", { + params: { + search: "{{ query }}", + is_customer: "true", + } + }); + + {% endif %} + + {% endif %} + + + {% endblock %} \ No newline at end of file From 2b1101e165aabb6f4014e5c1f1fafc1639a6a24c Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 21 Feb 2021 21:09:55 +1100 Subject: [PATCH 19/22] remove unused files --- .../templates/InvenTree/search_company.html | 14 ------------- .../InvenTree/search_part_category.html | 14 ------------- .../templates/InvenTree/search_parts.html | 21 ------------------- .../InvenTree/search_stock_items.html | 16 -------------- .../InvenTree/search_stock_location.html | 16 -------------- .../InvenTree/search_supplier_parts.html | 14 ------------- InvenTree/templates/InvenTree/searching.html | 3 --- 7 files changed, 98 deletions(-) delete mode 100644 InvenTree/templates/InvenTree/search_company.html delete mode 100644 InvenTree/templates/InvenTree/search_part_category.html delete mode 100644 InvenTree/templates/InvenTree/search_parts.html delete mode 100644 InvenTree/templates/InvenTree/search_stock_items.html delete mode 100644 InvenTree/templates/InvenTree/search_stock_location.html delete mode 100644 InvenTree/templates/InvenTree/search_supplier_parts.html delete mode 100644 InvenTree/templates/InvenTree/searching.html diff --git a/InvenTree/templates/InvenTree/search_company.html b/InvenTree/templates/InvenTree/search_company.html deleted file mode 100644 index 776f661819..0000000000 --- a/InvenTree/templates/InvenTree/search_company.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "collapse.html" %} - -{% block collapse_title %} -

    Companies

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/search_part_category.html b/InvenTree/templates/InvenTree/search_part_category.html deleted file mode 100644 index 899aca094c..0000000000 --- a/InvenTree/templates/InvenTree/search_part_category.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "collapse.html" %} - -{% block collapse_title %} -

    Part Categories

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/search_parts.html b/InvenTree/templates/InvenTree/search_parts.html deleted file mode 100644 index ca75b096c2..0000000000 --- a/InvenTree/templates/InvenTree/search_parts.html +++ /dev/null @@ -1,21 +0,0 @@ -{% extends "collapse.html" %} - -{% block collapse_title %} -

    Parts

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} -
    -
    - -
    -
    -
    - - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/search_stock_items.html b/InvenTree/templates/InvenTree/search_stock_items.html deleted file mode 100644 index 16d1542d96..0000000000 --- a/InvenTree/templates/InvenTree/search_stock_items.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "collapse.html" %} - -{% load i18n %} - -{% block collapse_title %} -

    {% trans "Stock Items" %}

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/search_stock_location.html b/InvenTree/templates/InvenTree/search_stock_location.html deleted file mode 100644 index 1778e6256d..0000000000 --- a/InvenTree/templates/InvenTree/search_stock_location.html +++ /dev/null @@ -1,16 +0,0 @@ -{% extends "collapse.html" %} - -{% load i18n %} - -{% block collapse_title %} -

    {% trans "Stock Locations" %}

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/search_supplier_parts.html b/InvenTree/templates/InvenTree/search_supplier_parts.html deleted file mode 100644 index 04ee32cc5b..0000000000 --- a/InvenTree/templates/InvenTree/search_supplier_parts.html +++ /dev/null @@ -1,14 +0,0 @@ -{% extends "collapse.html" %} - -{% block collapse_title %} -

    Supplier Parts

    -{% endblock %} - -{% block collapse_heading %} -

    {% include "InvenTree/searching.html" %}

    -{% endblock %} - -{% block collapse_content %} - -
    -{% endblock %} \ No newline at end of file diff --git a/InvenTree/templates/InvenTree/searching.html b/InvenTree/templates/InvenTree/searching.html deleted file mode 100644 index d2c8dd0363..0000000000 --- a/InvenTree/templates/InvenTree/searching.html +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n %} - - {% trans "Searching" %} From 2ac9eadd13f46998611c7f617ad36dc6d05f1b0b Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 21 Feb 2021 21:49:38 +1100 Subject: [PATCH 20/22] Update version.py --- InvenTree/InvenTree/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py index 970b2ba92e..13fe6b62c9 100644 --- a/InvenTree/InvenTree/version.py +++ b/InvenTree/InvenTree/version.py @@ -7,7 +7,7 @@ import django import common.models -INVENTREE_SW_VERSION = "0.1.6 pre" +INVENTREE_SW_VERSION = "0.1.6" def inventreeInstanceName(): From beb155133a0c57c452011ec4366c3cb020801a25 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 21 Feb 2021 21:50:52 +1100 Subject: [PATCH 21/22] Update version.py --- InvenTree/InvenTree/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/version.py b/InvenTree/InvenTree/version.py index 13fe6b62c9..c51398e182 100644 --- a/InvenTree/InvenTree/version.py +++ b/InvenTree/InvenTree/version.py @@ -7,7 +7,7 @@ import django import common.models -INVENTREE_SW_VERSION = "0.1.6" +INVENTREE_SW_VERSION = "0.1.7 pre" def inventreeInstanceName(): From 89cdcda6143b254e1e6698600324039cbd6946fa Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 22 Feb 2021 01:10:11 +1100 Subject: [PATCH 22/22] Add app info to about dialog --- InvenTree/templates/about.html | 78 +++++++++++++++++++--------------- 1 file changed, 43 insertions(+), 35 deletions(-) diff --git a/InvenTree/templates/about.html b/InvenTree/templates/about.html index 80b29742ef..cedfb40ca1 100644 --- a/InvenTree/templates/about.html +++ b/InvenTree/templates/about.html @@ -12,42 +12,50 @@ Inventree Logo

    {% trans "InvenTree Version Information" %}

    -