diff --git a/InvenTree/order/models.py b/InvenTree/order/models.py index e4ad0b881f..3871ba38a1 100644 --- a/InvenTree/order/models.py +++ b/InvenTree/order/models.py @@ -22,8 +22,8 @@ from django.dispatch.dispatcher import receiver from django.urls import reverse from django.utils.translation import gettext_lazy as _ -from djmoney.contrib.exchange.models import convert_money from djmoney.contrib.exchange.exceptions import MissingRate +from djmoney.contrib.exchange.models import convert_money from djmoney.money import Money from error_report.models import Error from markdownx.models import MarkdownxField @@ -43,7 +43,6 @@ from plugin.models import MetadataMixin from stock import models as stock_models from users import models as UserModels - logger = logging.getLogger('inventree') diff --git a/InvenTree/stock/templates/stock/item_base.html b/InvenTree/stock/templates/stock/item_base.html index 42c5df622d..9ae43c1c4b 100644 --- a/InvenTree/stock/templates/stock/item_base.html +++ b/InvenTree/stock/templates/stock/item_base.html @@ -156,7 +156,7 @@ {% endif %} - + {% if item.uid %} @@ -452,7 +452,7 @@ {% endif %} - + {% endblock details_right %} diff --git a/InvenTree/templates/js/translated/build.js b/InvenTree/templates/js/translated/build.js index 7d7cb59240..b17c6282a0 100644 --- a/InvenTree/templates/js/translated/build.js +++ b/InvenTree/templates/js/translated/build.js @@ -2582,7 +2582,7 @@ function loadBuildTable(table, options) { loaded_calendar = true; var el = document.getElementById('build-order-calendar'); - + calendar = new FullCalendar.Calendar(el, { initialView: 'dayGridMonth', nowIndicator: true, @@ -2592,7 +2592,7 @@ function loadBuildTable(table, options) { buildEvents(calendar); } }); - + calendar.render(); } else { calendar.render(); diff --git a/InvenTree/templates/js/translated/order.js b/InvenTree/templates/js/translated/order.js index 4b39f11ee8..9b4903b22b 100644 --- a/InvenTree/templates/js/translated/order.js +++ b/InvenTree/templates/js/translated/order.js @@ -1522,7 +1522,7 @@ function loadPurchaseOrderTable(table, options) { setupFilterList('purchaseorder', $(table), target, {download: true}); var display_mode = inventreeLoad('purchaseorder-table-display-mode', 'list'); - + // Function for rendering PurchaseOrder calendar display function buildEvents(calendar) { @@ -1538,7 +1538,7 @@ function loadPurchaseOrderTable(table, options) { filters.supplier_detail = true; filters.min_date = start; filters.max_date = end; - + // Request purchase orders from the server within specified date range inventreeGet( '{% url "api-po-list" %}', @@ -1718,7 +1718,7 @@ function loadPurchaseOrderTable(table, options) { if (display_mode == 'calendar') { var el = document.getElementById('purchase-order-calendar'); - + calendar = new FullCalendar.Calendar(el, { initialView: 'dayGridMonth', nowIndicator: true, @@ -1728,7 +1728,7 @@ function loadPurchaseOrderTable(table, options) { buildEvents(calendar); } }); - + calendar.render(); } } @@ -2409,7 +2409,7 @@ function loadSalesOrderTable(table, options) { if (display_mode == 'calendar') { var el = document.getElementById('purchase-order-calendar'); - + calendar = new FullCalendar.Calendar(el, { initialView: 'dayGridMonth', nowIndicator: true, @@ -2419,7 +2419,7 @@ function loadSalesOrderTable(table, options) { buildEvents(calendar); } }); - + calendar.render(); } }, @@ -2881,7 +2881,7 @@ function allocateStockToSalesOrder(order_id, line_items, options={}) { fields.reference.value = ref; fields.reference.prefix = global_settings.SALESORDER_REFERENCE_PREFIX + options.reference; - + return fields; } } diff --git a/InvenTree/templates/js/translated/tables.js b/InvenTree/templates/js/translated/tables.js index 7525620bb3..fcbaba7336 100644 --- a/InvenTree/templates/js/translated/tables.js +++ b/InvenTree/templates/js/translated/tables.js @@ -27,16 +27,16 @@ function reloadtable(table) { /* * Construct a set of extra buttons to display against a list of orders, * allowing the orders to be displayed in various 'view' modes: - * + * * - Calendar view * - List view * - Tree view - * + * * Options: * - callback: Callback function to be called when one of the buttons is pressed * - prefix: The prefix to use when saving display data to user session * - display: Which button to set as 'active' by default - * + * */ function constructOrderTableButtons(options={}) { @@ -51,10 +51,10 @@ function constructOrderTableButtons(options={}) { var idx = 0; var buttons = []; - + function buttonCallback(view_mode) { inventreeSave(key, view_mode); - + if (options.callback) { options.callback(view_mode); } diff --git a/tasks.py b/tasks.py index a5d1ac0e5b..9fa55c4513 100644 --- a/tasks.py +++ b/tasks.py @@ -554,9 +554,9 @@ def test_translations(c): # complie regex reg = re.compile( - r"[a-zA-Z0-9]{1}"+ # match any single letter and number - r"(?![^{\(\<]*[}\)\>])"+ # that is not inside curly brackets, brackets or a tag - r"(?])" + # that is not inside curly brackets, brackets or a tag # noqa: W504 + r"(?