This question has been flagged
3 Replies
10795 Views

Hi, Yesterday I had to find quick solution for using UPC barcodes in POS frontend. What i did first was to install the chricar_product_gtin module to be able to assing UPC barcodes to products. Bu then I needed to be able to scan them and recognize them in POS frontend. I am not really a developer and the first thing I could figure out watching at the code of devices.js was to add after if (codeNumbers.length === 13) { on line:485 the code:

else if (codeNumbers.length === 12) {

if (self.check_ean(codeNumbers.join(''))) {

self.on_ean(codeNumbers.join('')); codeNumbers = []; }}

and then change the line:316 to if(code.length !== 13 && code.length !== 12)

So basically it allows 12 number barcodes to be read and if after the 12-th digit it validates it continues as 12-digit (UPC) barcode if not than continues as usual.

It works great but there is one trap: if by chance the first 12 digits of EAN13 barcode make valid UPC code it doesn't work. Actually it happened that in our store we have quite a few products with EAN13 barcode which the first 12 digits by chance construct a valid UPC code.

Is there an easy way to go around this?

I see that devices.js looks at the time interval between the keys to recognize when we have a barcode reader. I was thinking that if we can check for a longer interval after the 12-th digit like this we'll know that it is a UPC barcode and not a part of EAN13 code. But I couldn't figure it out how to do that.

Any ideas?

Avatar
Discard
Best Answer

Hi, Some bar code readers like Honeywell allow for a setting that "converts" UPC barcodes to EAN13 ones, by transmitting a leading zero before the code...

See http://www.honeywellaidc.com/CatalogDocuments/00-02544%20Rev%20K%202-11.pdf on page 9-1

Then, you need to register the "new" code on OpenERP, and from there on you will be able to recognize them on POS terminal with no change to the code...

Regards,

Avatar
Discard
Author

Thanks a lot, it is exactly Honeywell!

Best Answer

It was patched at: https://blueprints.launchpad.net/openobject-addons/+spec/pos-7-custom-ean-barcode

You only replace file devices.js by this content

Avatar
Discard
Best Answer

Hello,
There are some customizations required in PY files and yes you are right, device.js file too.

We have created a module which allow to use any barcode machine.

Thanks,
Acespritech Solutions Pvt. Ltd.
Mail: info@acespritech.com
Skype: acespritech.

Avatar
Discard

Where can I find module ??