From 398945636b3318ed02749f63028f8f76d2d2060d Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 20 Aug 2025 16:19:08 +0700 Subject: Fix Check Product Speed --- indoteknik_custom/static/src/js/check_product_barcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/static/src') diff --git a/indoteknik_custom/static/src/js/check_product_barcode.js b/indoteknik_custom/static/src/js/check_product_barcode.js index f7a1bb75..593b8a5b 100644 --- a/indoteknik_custom/static/src/js/check_product_barcode.js +++ b/indoteknik_custom/static/src/js/check_product_barcode.js @@ -4,7 +4,7 @@ odoo.define('indoteknik_custom.prevent_manual_typing', function (require) { console.log("✅ Custom JS from indoteknik_custom loaded!"); - const THRESHOLD_MS = 40; // jeda antar karakter dianggap scanner kalau <40ms + const THRESHOLD_MS = 100; let lastTime = 0; let burstCount = 0; @@ -16,7 +16,7 @@ odoo.define('indoteknik_custom.prevent_manual_typing', function (require) { } else { burstCount = 1; } - return burstCount >= 3; // setelah 3 char cepat, dianggap scanner + return burstCount >= 2; // setelah 3 char cepat, dianggap scanner } document.addEventListener('keydown', function (e) { -- cgit v1.2.3 From 6d62c215f1c9bd3b76715d4de0367bf4dd2b4363 Mon Sep 17 00:00:00 2001 From: Miqdad Date: Wed, 20 Aug 2025 17:06:59 +0700 Subject: Fix check product barcode --- indoteknik_custom/static/src/js/check_product_barcode.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indoteknik_custom/static/src') diff --git a/indoteknik_custom/static/src/js/check_product_barcode.js b/indoteknik_custom/static/src/js/check_product_barcode.js index 593b8a5b..aedba34d 100644 --- a/indoteknik_custom/static/src/js/check_product_barcode.js +++ b/indoteknik_custom/static/src/js/check_product_barcode.js @@ -4,7 +4,7 @@ odoo.define('indoteknik_custom.prevent_manual_typing', function (require) { console.log("✅ Custom JS from indoteknik_custom loaded!"); - const THRESHOLD_MS = 100; + const THRESHOLD_MS = 250; let lastTime = 0; let burstCount = 0; -- cgit v1.2.3 From 919af07c186c43f2e9f41c005d2ba16aa5e8596d Mon Sep 17 00:00:00 2001 From: Miqdad Date: Thu, 21 Aug 2025 08:49:46 +0700 Subject: Unblock --- indoteknik_custom/static/src/js/check_product_barcode.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/static/src') diff --git a/indoteknik_custom/static/src/js/check_product_barcode.js b/indoteknik_custom/static/src/js/check_product_barcode.js index aedba34d..9da41479 100644 --- a/indoteknik_custom/static/src/js/check_product_barcode.js +++ b/indoteknik_custom/static/src/js/check_product_barcode.js @@ -4,7 +4,7 @@ odoo.define('indoteknik_custom.prevent_manual_typing', function (require) { console.log("✅ Custom JS from indoteknik_custom loaded!"); - const THRESHOLD_MS = 250; + const THRESHOLD_MS = 300; let lastTime = 0; let burstCount = 0; @@ -16,7 +16,7 @@ odoo.define('indoteknik_custom.prevent_manual_typing', function (require) { } else { burstCount = 1; } - return burstCount >= 2; // setelah 3 char cepat, dianggap scanner + return burstCount >= 2; } document.addEventListener('keydown', function (e) { -- cgit v1.2.3