From 53b57cfa705e6c383d5ebee112f6ee11bc6eeb72 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 1 Dec 2021 22:31:16 +0100 Subject: [PATCH 1/5] laod minified fontawesome js --- InvenTree/templates/base.html | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 262a749bfa..448d06b23f 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -121,6 +121,7 @@ {% include 'modals.html' %} {% include 'about.html' %} + {% include "notifications.html" %} @@ -180,9 +181,9 @@ - - - + + + {% block js_load %} {% endblock %} From 4683672d91d73586110d9b9ab5b3b46945f7aa0d Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 1 Dec 2021 22:32:40 +0100 Subject: [PATCH 2/5] load minified fontawesome css --- InvenTree/templates/base.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 448d06b23f..0a0b62f5f0 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -40,8 +40,8 @@ - - + + From 7273ed74c6dacddf444a5c0dee4b67b659cfc935 Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 1 Dec 2021 23:38:24 +0100 Subject: [PATCH 3/5] clean up PR --- InvenTree/templates/base.html | 1 - 1 file changed, 1 deletion(-) diff --git a/InvenTree/templates/base.html b/InvenTree/templates/base.html index 0a0b62f5f0..2843264243 100644 --- a/InvenTree/templates/base.html +++ b/InvenTree/templates/base.html @@ -121,7 +121,6 @@ {% include 'modals.html' %} {% include 'about.html' %} - {% include "notifications.html" %} From 9ca6204d4b22c3b95acae2a1b4cf5f1338945b71 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Dec 2021 00:05:55 +1100 Subject: [PATCH 4/5] Add option for creating initial stock quantity when duplicating a part Fixes https://github.com/inventree/InvenTree/issues/2407 --- InvenTree/templates/js/translated/part.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/InvenTree/templates/js/translated/part.js b/InvenTree/templates/js/translated/part.js index 1bf025b629..0a27f2ba2f 100644 --- a/InvenTree/templates/js/translated/part.js +++ b/InvenTree/templates/js/translated/part.js @@ -153,12 +153,7 @@ function partFields(options={}) { delete fields['default_expiry']; } - // Additional fields when "creating" a new part - if (options.create) { - - // No supplier parts available yet - delete fields['default_supplier']; - + if (options.create || options.duplicate) { if (global_settings.PART_CREATE_INITIAL) { fields.initial_stock = { @@ -187,6 +182,13 @@ function partFields(options={}) { group: 'create', }; } + } + + // Additional fields when "creating" a new part + if (options.create) { + + // No supplier parts available yet + delete fields['default_supplier']; fields.copy_category_parameters = { type: 'boolean', @@ -349,6 +351,10 @@ function duplicatePart(pk, options={}) { duplicate: pk, }); + if (fields.initial_stock_location) { + fields.initial_stock_location.value = data.default_location; + } + // Remove "default_supplier" field delete fields['default_supplier']; From 7362162764d9853169a12b2196860a8338105f82 Mon Sep 17 00:00:00 2001 From: Oliver Date: Fri, 3 Dec 2021 15:20:49 +1100 Subject: [PATCH 5/5] Use different colors for "pending" orders status --- InvenTree/InvenTree/status_codes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/InvenTree/InvenTree/status_codes.py b/InvenTree/InvenTree/status_codes.py index 4de0b7ced9..656c1d6e51 100644 --- a/InvenTree/InvenTree/status_codes.py +++ b/InvenTree/InvenTree/status_codes.py @@ -107,7 +107,7 @@ class PurchaseOrderStatus(StatusCode): } colors = { - PENDING: 'primary', + PENDING: 'secondary', PLACED: 'primary', COMPLETE: 'success', CANCELLED: 'danger', @@ -147,7 +147,7 @@ class SalesOrderStatus(StatusCode): } colors = { - PENDING: 'primary', + PENDING: 'secondary', SHIPPED: 'success', CANCELLED: 'danger', LOST: 'warning',