Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

UPC barcodes in POS frontend

By
Branimir
on 4/22/13, 2:58 PM 4,499 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?

2
Mario Arias Badila
On 8/4/13, 1:36 PM

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,

Thanks a lot, it is exactly Honeywell!

Branimir
on 8/5/13, 8:23 AM
0
OpenERP Vietnam
On 7/25/14, 4:54 AM

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

-4

Acespritech

--Acespritech--
839
| 3 2 6
India
--Acespritech--

Having 8+ years of OpenERP Experience. We are Specialized in OpenERP/CRM Solutions, software development, Web development, E commerce solutions & other open source solutions.


Skype : acespritech

Email : info@acespritech.com

Acespritech
On 4/24/13, 6:56 AM

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.

Where can I find module ??

Jagdish Panchal
on 7/25/14, 5:14 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/22/13, 2:58 PM
Seen: 4499 times
Last updated: 3/16/15, 8:10 AM