`;
}
html += partGridTile(row);
@@ -1252,7 +1252,43 @@ function loadPartTestTemplateTable(table, options) {
}
}
}
- ]
+ ],
+ onPostBody: function() {
+
+ table.find('.button-test-edit').click(function() {
+ var pk = $(this).attr('pk');
+
+ var url = `/api/part/test-template/${pk}/`;
+
+ constructForm(url, {
+ fields: {
+ test_name: {},
+ description: {},
+ required: {},
+ requires_value: {},
+ requires_attachment: {},
+ },
+ title: '{% trans "Edit Test Result Template" %}',
+ onSuccess: function() {
+ table.bootstrapTable('refresh');
+ },
+ });
+ });
+
+ table.find('.button-test-delete').click(function() {
+ var pk = $(this).attr('pk');
+
+ var url = `/api/part/test-template/${pk}/`;
+
+ constructForm(url, {
+ method: 'DELETE',
+ title: '{% trans "Delete Test Result Template" %}',
+ onSuccess: function() {
+ table.bootstrapTable('refresh');
+ },
+ });
+ });
+ }
});
}
diff --git a/InvenTree/templates/navbar.html b/InvenTree/templates/navbar.html
index 4d33d0129c..3fae5cf0a0 100644
--- a/InvenTree/templates/navbar.html
+++ b/InvenTree/templates/navbar.html
@@ -71,11 +71,7 @@
{% if user.is_staff %}
{% if not system_healthy %}
- {% if not django_q_running %}
- {% else %}
-
- {% endif %}
{% elif not up_to_date %}
{% endif %}
@@ -96,11 +92,7 @@
{% if system_healthy or not user.is_staff %}
{% else %}
- {% if not django_q_running %}
-
- {% else %}
-
- {% endif %}
+
{% endif %}
{% trans "System Information" %}
diff --git a/InvenTree/templates/stock_table.html b/InvenTree/templates/stock_table.html
index 583f4db893..ae1f7c1a9b 100644
--- a/InvenTree/templates/stock_table.html
+++ b/InvenTree/templates/stock_table.html
@@ -16,7 +16,7 @@
{% if owner_control.value == "True" and user in owners or user.is_superuser or owner_control.value == "False" %}
- {% if not read_only and roles.stock.add %}
+ {% if not read_only and not prevent_new_stock and roles.stock.add %}
diff --git a/README.md b/README.md
index 7ace518175..e0b21f7e61 100644
--- a/README.md
+++ b/README.md
@@ -28,9 +28,9 @@ InvenTree is [available via Docker](https://hub.docker.com/r/inventree/inventree
InvenTree is supported by a [companion mobile app](https://inventree.readthedocs.io/en/latest/app/app/) which allows users access to stock control information and functionality.
-[**Download InvenTree from the Android Play Store**](https://play.google.com/store/apps/details?id=inventree.inventree_app)
+- [**Download InvenTree from the Android Play Store**](https://play.google.com/store/apps/details?id=inventree.inventree_app)
-*Currently the mobile app is only availble for Android*
+- [**Download InvenTree from the Apple App Store**](https://apps.apple.com/au/app/inventree/id1581731101#?platform=iphone)
# Translation
diff --git a/ci/check_version_number.py b/ci/check_version_number.py
index 55a42e2484..ca2dbd71c7 100644
--- a/ci/check_version_number.py
+++ b/ci/check_version_number.py
@@ -27,12 +27,61 @@ if __name__ == '__main__':
version = results[0]
parser = argparse.ArgumentParser()
- parser.add_argument('tag', help='Version tag', action='store')
+ parser.add_argument('-t', '--tag', help='Compare against specified version tag', action='store')
+ parser.add_argument('-r', '--release', help='Check that this is a release version', action='store_true')
+ parser.add_argument('-d', '--dev', help='Check that this is a development version', action='store_true')
+ parser.add_argument('-b', '--branch', help='Check against a particular branch', action='store')
args = parser.parse_args()
- if not args.tag == version:
- print(f"Release tag '{args.tag}' does not match INVENTREE_SW_VERSION '{version}'")
- sys.exit(1)
+ if args.branch:
+ """
+ Version number requirement depends on format of branch
+
+ 'master': development branch
+ 'stable': release branch
+ """
+
+ print(f"Checking version number for branch '{args.branch}'")
+
+ if args.branch == 'master':
+ print("- This is a development branch")
+ args.dev = True
+ elif args.branch == 'stable':
+ print("- This is a stable release branch")
+ args.release = True
+
+ if args.dev:
+ """
+ Check that the current verrsion number matches the "development" format
+ e.g. "0.5 dev"
+ """
+
+ pattern = "^\d+(\.\d+)+ dev$"
+
+ result = re.match(pattern, version)
+
+ if result is None:
+ print(f"Version number '{version}' does not match required pattern for development branch")
+ sys.exit(1)
+
+ elif args.release:
+ """
+ Check that the current version number matches the "release" format
+ e.g. "0.5.1"
+ """
+
+ pattern = "^\d+(\.\d+)+$"
+
+ result = re.match(pattern, version)
+
+ if result is None:
+ print(f"Version number '{version}' does not match required pattern for stable branch")
+ sys.exit(1)
+
+ if args.tag:
+ if not args.tag == version:
+ print(f"Release tag '{args.tag}' does not match INVENTREE_SW_VERSION '{version}'")
+ sys.exit(1)
sys.exit(0)
\ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index ff0d84703a..24786cbd7a 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,7 +1,8 @@
# Django framework
-Django==3.2.4 # Django package
+Django==3.2.5 # Django package
+gunicorn>=20.1.0 # Gunicorn web server
-pillow==8.2.0 # Image manipulation
+pillow==8.3.2 # Image manipulation
djangorestframework==3.12.4 # DRF framework
django-cors-headers==3.2.0 # CORS headers extension for DRF
django-filter==2.4.0 # Extended filtering options