Hi, thank you for the bug report !
I Have trouble reproducing it tough, Can you be more precise in what version of 
OpenERP, what os and what browser (and wich version) are you using ?

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1060087

Title:
  Problem reading barcodes from POS

Status in OpenERP Addons (modules):
  Incomplete

Bug description:
  Hello,
  I have encountered a problem while reading barcodes with the barcode scanner 
in POS module. Here I attach the explanation and the workaround I adopted:

  While you are in the main screen of the POS, all works ok, the codes are 
readed correctly, but when you begin to navigate through the categories and use 
the scanner to read another code, it returns error messages of unrecognized 
product.
  In my research work, I have see that the problem resides in the keyup capture 
event from jQuery:

  $('body').delegate('','keyup', function (e){

  This function is executed every time you navigate through categories, and 
repeat the keyup event as categories "clicks" you have entered. I.E.: if you 
navigate with the categories buttons, and have a category tree with a 3 level 
depth, when you are in the third level and read a barcode, it's readed for 
three times, causing an unrecognized product error.
  I can't solve with the event.stopPropagation() or event.preventDefault() 
directives. The workaround that I have applied is changing the jQuery event 
with the onkeyup JavaScript event, which don't inherit the capture event for 
more than one time:

       $("input#barras")[0].onkeyup = function(e) {

  With the [0] tag we only select the first of all captured keyups at the same 
time.
  I need to include an input textbox where write the barcode. It helps to the 
clerks to show the barcode readed, and they can write the code by hand.
  Also, I reduced the filter to catch the keycodes by the following line:

  if (e.keyCode >= 48 && e.keyCode <= 58) {

  It's a simple method cleaner than the earlier. With this filter the 13
  (enter) code sended by the scanner.

  And this is the line in pos.xml to generate the textbox:

  <td>Product<a> EAN: <input id='barras' type='text' style='text-
  align:center; height:20px; width:95px; font-size:12px' /></a></td>

  
  Regards
  Fran

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1060087/+subscriptions

_______________________________________________
Mailing list: https://launchpad.net/~openerp-india
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-india
More help   : https://help.launchpad.net/ListHelp

Reply via email to