diff --git a/InvenTree/common/files.py b/InvenTree/common/files.py index f805ceaace..45b6c80050 100644 --- a/InvenTree/common/files.py +++ b/InvenTree/common/files.py @@ -99,13 +99,18 @@ class FileManager: self.update_headers() def guess_header(self, header, threshold=80): - """ Try to match a header (from the file) to a list of known headers + """ + Try to match a header (from the file) to a list of known headers Args: header - Header name to look for threshold - Match threshold for fuzzy search """ + # Replace null values with empty string + if header is None: + header = '' + # Try for an exact match for h in self.HEADERS: if h == header: diff --git a/InvenTree/order/templates/order/order_base.html b/InvenTree/order/templates/order/order_base.html index 85d8fd5c51..f1146d8b01 100644 --- a/InvenTree/order/templates/order/order_base.html +++ b/InvenTree/order/templates/order/order_base.html @@ -145,10 +145,6 @@ src="{% static 'img/blank_image.png' %}" {% block js_ready %} {{ block.super }} -enableNavbar({ - label: 'po', - toggleId: '#po-menu-toggle', -}); {% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %} $("#place-order").click(function() { diff --git a/InvenTree/order/templates/order/order_wizard/po_upload.html b/InvenTree/order/templates/order/order_wizard/po_upload.html index a281725173..4357bce2c6 100644 --- a/InvenTree/order/templates/order/order_wizard/po_upload.html +++ b/InvenTree/order/templates/order/order_wizard/po_upload.html @@ -3,10 +3,6 @@ {% load i18n %} {% load static %} -{% block menubar %} -{% include 'order/po_navbar.html' with tab='upload' %} -{% endblock %} - {% block heading %} {% trans "Upload File for Purchase Order" %} {{ wizard.form.media }} diff --git a/InvenTree/order/templates/order/purchase_order_detail.html b/InvenTree/order/templates/order/purchase_order_detail.html index cbff1b2d1c..97a4ffb78e 100644 --- a/InvenTree/order/templates/order/purchase_order_detail.html +++ b/InvenTree/order/templates/order/purchase_order_detail.html @@ -77,6 +77,11 @@ {{ block.super }} + enableNavbar({ + label: 'po', + toggleId: '#po-menu-toggle', + }); + $('#edit-notes').click(function() { constructForm('{% url "api-po-detail" order.pk %}', { fields: {