Files
odoo_source/addons/barcodes/models/ir_http.py
T
Philippe Wauthy d7e0760ce8 [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#101331

X-original-commit: 9eda9679bd51b63bbc7b796419b3efdec4ba99bb
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: phwa-odoo <phwa@odoo.com>
2022-09-27 18:15:00 +02:00

16 lines
499 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class IrHttp(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
res = super(IrHttp, self).session_info()
if self.env.user._is_internal():
res['max_time_between_keys_in_ms'] = int(
self.env['ir.config_parameter'].sudo().get_param('barcode.max_time_between_keys_in_ms', default='100'))
return res