From c6b665bccf7de75dd83101c4ac1249017b441c6a Mon Sep 17 00:00:00 2001 From: wolflu05 <76838159+wolflu05@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:22:01 +0200 Subject: [PATCH] use barcode generation for CUI show barcode modal --- src/backend/InvenTree/build/templates/build/build_base.html | 2 +- .../InvenTree/company/templates/company/supplier_part.html | 2 +- src/backend/InvenTree/order/templates/order/order_base.html | 2 +- .../InvenTree/order/templates/order/return_order_base.html | 2 +- .../InvenTree/order/templates/order/sales_order_base.html | 2 +- src/backend/InvenTree/part/templates/part/part_base.html | 2 +- src/backend/InvenTree/stock/templates/stock/item_base.html | 2 +- src/backend/InvenTree/stock/templates/stock/location.html | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/backend/InvenTree/build/templates/build/build_base.html b/src/backend/InvenTree/build/templates/build/build_base.html index 8254673fc7..5a40b32e7b 100644 --- a/src/backend/InvenTree/build/templates/build/build_base.html +++ b/src/backend/InvenTree/build/templates/build/build_base.html @@ -277,7 +277,7 @@ src="{% static 'img/blank_image.png' %}" $('#show-qr-code').click(function() { showQRDialog( '{% trans "Build Order QR Code" escape %}', - '{"build": {{ build.pk }} }' + '{{ build.barcode }}' ); }); diff --git a/src/backend/InvenTree/company/templates/company/supplier_part.html b/src/backend/InvenTree/company/templates/company/supplier_part.html index 2949926cb7..c1b4451bd9 100644 --- a/src/backend/InvenTree/company/templates/company/supplier_part.html +++ b/src/backend/InvenTree/company/templates/company/supplier_part.html @@ -274,7 +274,7 @@ src="{% static 'img/blank_image.png' %}" $("#show-qr-code").click(function() { showQRDialog( '{% trans "Supplier Part QR Code" escape %}', - '{"supplierpart": {{ part.pk }} }' + '{{ part.barcode }}' ); }); diff --git a/src/backend/InvenTree/order/templates/order/order_base.html b/src/backend/InvenTree/order/templates/order/order_base.html index af422e6794..ce9bc02fad 100644 --- a/src/backend/InvenTree/order/templates/order/order_base.html +++ b/src/backend/InvenTree/order/templates/order/order_base.html @@ -312,7 +312,7 @@ $("#export-order").click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Purchase Order QR Code" escape %}', - '{"purchaseorder": {{ order.pk }} }' + '{{ order.barcode }}' ); }); diff --git a/src/backend/InvenTree/order/templates/order/return_order_base.html b/src/backend/InvenTree/order/templates/order/return_order_base.html index 32ccd23f85..f4590c71eb 100644 --- a/src/backend/InvenTree/order/templates/order/return_order_base.html +++ b/src/backend/InvenTree/order/templates/order/return_order_base.html @@ -257,7 +257,7 @@ $('#print-order-report').click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Return Order QR Code" escape %}', - '{"returnorder": {{ order.pk }} }' + '{{ order.barcode }}' ); }); diff --git a/src/backend/InvenTree/order/templates/order/sales_order_base.html b/src/backend/InvenTree/order/templates/order/sales_order_base.html index bc306502a7..2a3e676e95 100644 --- a/src/backend/InvenTree/order/templates/order/sales_order_base.html +++ b/src/backend/InvenTree/order/templates/order/sales_order_base.html @@ -319,7 +319,7 @@ $('#print-order-report').click(function() { $('#show-qr-code').click(function() { showQRDialog( '{% trans "Sales Order QR Code" escape %}', - '{"salesorder": {{ order.pk }} }' + '{{ order.barcode }}' ); }); diff --git a/src/backend/InvenTree/part/templates/part/part_base.html b/src/backend/InvenTree/part/templates/part/part_base.html index 835258c8ea..b29f40f751 100644 --- a/src/backend/InvenTree/part/templates/part/part_base.html +++ b/src/backend/InvenTree/part/templates/part/part_base.html @@ -451,7 +451,7 @@ $("#show-qr-code").click(function() { showQRDialog( '{% trans "Part QR Code" escape %}', - '{"part": {{ part.pk }} }', + '{{ part.barcode }}', ); }); diff --git a/src/backend/InvenTree/stock/templates/stock/item_base.html b/src/backend/InvenTree/stock/templates/stock/item_base.html index 05107cac28..1a7f0fe5cf 100644 --- a/src/backend/InvenTree/stock/templates/stock/item_base.html +++ b/src/backend/InvenTree/stock/templates/stock/item_base.html @@ -534,7 +534,7 @@ $('#stock-edit-status').click(function () { $("#show-qr-code").click(function() { showQRDialog( '{% trans "Stock Item QR Code" escape %}', - '{"stockitem": {{ item.pk }} }', + '{{ item.barcode }}', ); }); diff --git a/src/backend/InvenTree/stock/templates/stock/location.html b/src/backend/InvenTree/stock/templates/stock/location.html index 6c052e517b..37039dd017 100644 --- a/src/backend/InvenTree/stock/templates/stock/location.html +++ b/src/backend/InvenTree/stock/templates/stock/location.html @@ -392,7 +392,7 @@ $('#show-qr-code').click(function() { showQRDialog( '{% trans "Stock Location QR Code" escape %}', - '{"stocklocation": {{ location.pk }} }' + '{{ location.barcode }}' ); });