Odoo Help


how to work with multiple ean in product of Point of Sale?

Sairam Bandaru
on 2/7/14, 8:15 AM 1,897 views

I am in situation have to create many2one ean13 field in product when we use any one at barcode reader of POS it should fetch the all the data related to the product

Sairam Bandaru
On 6/20/14, 11:38 AM

I have created one2may field in product.product to assign the ean13 and got the data at point of sale then update the code

point_of_sale in db.js

        _product_search_string: function(product){
            var str = '' + product.id + ':' + product.name;
                str += '|' + product.ean13;
                 str += '|' + product.code;

            // added customised for multiple bar codes for single product
                for (i in product.bar_code_ids){
                    for (j in this.bar_codes){
                        if (this.bar_codes[j].id === product.bar_code_ids[i]){
                            str += '|' + this.bar_codes[j].name;
            // end
            var packagings = this.packagings_by_product_id[product.id] || [];
            for(var i = 0; i < packagings.length; i++){
                str += '|' + packagings[i].ean;
            return str + '\n';

Where do i get this.bar_codes in this function ?

Can you please tell me ? I have go t the id of barcodes in one2many field but hoe can i make it searchable with the name of barcodes ?

Shivam Mahajan
on 12/13/16, 4:48 AM
On 6/16/14, 5:25 AM

There are modules to handle multiple ean13 per product. But i dont think it can work on pos front end.why not duplicate the product and just change the ean13 field

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 2/7/14, 8:15 AM
Seen: 1897 times
Last updated: 10/22/15, 12:05 AM