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.

1

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

By
Sairam Bandaru
on 2/7/14, 8:15 AM 1,285 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

2
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){
            1000
            var str = '' + product.id + ':' + product.name;
            if(product.ean13){
                str += '|' + product.ean13;
            }
            //added
            if(product.code){
                 str += '|' + product.code;

                }   
            //end
            // added customised for multiple bar codes for single product
            if(product.bar_code_ids){
                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';
        },

1
ahmad
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

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

0 follower(s)

Stats

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