Skip to content
Snippets Groups Projects
Commit df4f5a81 authored by Philippe Wauthy's avatar Philippe Wauthy
Browse files

[FIX] barcode: set the max_time_between_keys_in_ms to 100 by default


The default value of max_time_between_keys_in_ms in barcode is 55 ms.
The default value of 55 ms is too low and creates an issue for RFID readers.

The default value of max_time_between_keys_in_ms is increased to 100 ms.

task-2996072

closes odoo/odoo#101128

Signed-off-by: default avatarKevin Baptiste <kba@odoo.com>
parent a68fe720
No related branches found
No related tags found
No related merge requests found
......@@ -11,5 +11,5 @@ class IrHttp(models.AbstractModel):
res = super(IrHttp, self).session_info()
if self.env.user.has_group('base.group_user'):
res['max_time_between_keys_in_ms'] = int(
self.env['ir.config_parameter'].sudo().get_param('barcode.max_time_between_keys_in_ms', default='55'))
self.env['ir.config_parameter'].sudo().get_param('barcode.max_time_between_keys_in_ms', default='100'))
return res
......@@ -27,7 +27,7 @@ var BarcodeEvents = core.Class.extend(mixins.PropertiesMixin, {
suffix: /[\n\r\t]+/,
// Keys from a barcode scanner are usually processed as quick as possible,
// but some scanners can use an intercharacter delay (we support <= 50 ms)
max_time_between_keys_in_ms: session.max_time_between_keys_in_ms || 55,
max_time_between_keys_in_ms: session.max_time_between_keys_in_ms || 100,
// To be able to receive the barcode value, an input must be focused.
// On mobile devices, this causes the virtual keyboard to open.
// Unfortunately it is not possible to avoid this behavior...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment