Odoo Help


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.


Disable EAN13 Validation at the POS frontend

on 1/13/14, 7:14 AM 2,088 views

I have disabled EAN13 validation in OpenERP product page. I have comment the line from /addons/products/product.py:

_constraints = [(_check_ean_key, 'You provided an invalid "EAN13 Barcode" reference.

Now I can enter any type of barcode and associate it with a product.

The problem is: when I use the barcode scanner to scan a non EAN13 barcode, the system doesn't recognize at the POS frontend. I understand it might has something to do with the device.js file, however, I'm not sure from where I start.

As a note, it has been reported that several scanners take care of the conversion from a certain barcode type to another barcode type (eg. from UPC to EAN13) themselves. It is then much easier to configure a scanner to convert a type into another one than to modify the source of OpenERP to get a new barcode type to be recognized and handled.

Fabrice Henrion (fhe)
on 1/14/14, 1:31 AM
Martin T
On 1/13/14, 6:57 PM

The problem is not only disabling the EAN13 validation in OpenERP but also the scanner.

The EAN13 validation method is a way of decoding a barcode. Because the barcode itself is not correctly formatted it will not scan.

Maybe you can use a different barcode configuration in the barcode scanner (e.g. code 39)

If the barcode produce the same output as you do, when you manually entered the information it should work.

Thanks for your answer. It wouldn't be practical as we already have over 2000+ product entered to the system. The bar codes are a mix of UPC, EAN13, EAN8, UPC-E, UPC-A, ...etc. I'm looking into some direction to modify the device.js and perhaps the db.js and remove the EAN13 validation. There are certain ean checksum rules in file that somehow discard all type of barcode except the EAN13.

on 1/14/14, 2:43 AM
Sreedath Namangalam
On 2/17/14, 7:37 AM

There is a function check_ean in devices.js in point_of_sale/static/src/js folder. Try customizing it and related functions.

On 2/19/14, 9:56 PM

Hi there EAN-13 barcode is no so familiar with me.I want to know that if there is an advanced EAN-13 barcode recognition which supports to help me have a better understanding of how this barcode reading & scanning control decode and recognize EAN-13 barcode from document image files, we provide fully-featured demos and working examples written in C# code.Thanks a lot.

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

3 follower(s)


Asked: 1/13/14, 7:14 AM
Seen: 2088 times
Last updated: 3/16/15, 8:10 AM