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.

2

Barcode or reference lookup for POS OpenERP 7

By
Johan
on 8/30/13, 1:25 AM 6,602 views

HI there,

I want to implement POS OpenERP 7 in the retail store. The store have more then 1000 items to sold, so I use barcode reader to ease cashier operation.

Unfortunately not all Item have EAN13 barcode, some of them use different barcode format. My barcode reader still can read the code, but can not be used by OpenERP 7 (because OpenERP7 only implement EAN13, right?).

I try to manage this problem by fill the "internal reference" field with existing barcode printed on items (EAN13 or other barcode format). The question is : "How to make the OpenERP7 also use the "internal reference" field (instead of only EAN13 field) as their look-up to input automatically the purchased item? " I have saw some where it can be done in OpenERP 6.1, CMIIW

If it can be done, we can use all barcode type (not only EAN-13) that can be read by our barcode reader as the item identifier in internal reference field.

May be some of you have successfully implement it to address the same problem. Please advise.

Your earliest respond will be highly appreciated.

Thanks + regards, Johan

Is this link https://www.openerp.com/apps/trunk/chricar_product_gtin/ is an solution for my problem? How to use it? Please advise. Thanks

Johan
on 9/23/13, 9:15 PM
2

Frédéric Van Der Essen (fva)

--Frédéric Van Der Essen (fva)--
903
| 6 7 5
--Frédéric Van Der Essen (fva)--

Frédéric worked on different core projects at Odoo since 2012. He is a core developer of the Odoo R&D department. He worked on several projects including the design of the current website and the UI of the open chatter communication tool.

Frédéric is also the owner of the PosBox project and the latest versions of the point of sale frontend.

Frédéric Van Der Essen (fva)
On 10/3/13, 8:31 AM

This feature is now supported in trunk and saas , the relevant patches are

http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/8922 http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/8924

Now as long as your barcode scanner support a barcode encoding, those can be used to scan products by matching the internal reference. The reference can be any string of more than two characters, as long as it s supported by the barcode encoding.

Note that the matching is case sensitive, and some barcode encoding change the case. Also note that the ean13 barcodes have priority over internal references.

Can we load product quantity in product image in POS interface?

Remya
on 10/4/13, 3:10 AM

Hi Frederic, Now I use OpenERP7. When I use the patches should I change it to trunk one? On this link : http://nightly.openerp.com/trunk/nightly/exe/ the latest file is on 6 May 2013. Is it OK to use this one with the patches? Where to find the recent one? Please advise

Johan
on 10/5/13, 12:09 AM

Hi, I have not enough skill in java or py. How to use the patches on my OpenERP7.0? Please advise.

Johan
on 10/7/13, 6:16 AM

I just update (replace) my fresh installed OpenERP 7.0 with 7 files on http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/8922 and 1 file on http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/revision/8924. After restart the computer, I can not access openerp from browser. The error is "No Handler Found". What when wrong? Is it the wright way to use the patch (just copy & paste)? How to solve it? Please help. Thanks.

Johan
on 11/1/13, 4:53 AM
1

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 8/30/13, 5:29 AM

If you want the consider the internal reference in the barcode handling, you have to adapt/modify the following files:

  • point_of_sale/static/src/js/devices.js: update the methods where the barcode checksum is checked
  • point_of_sale/static/src/js/db.js: copy the internal reference of all products from the backend to the frontend. the you have to update function scan_product or get_product_by_ean13

(no guarantee for completion for the list of files)

I think that there is currently no other clean solution. Hope this help you somehow.

Hi Andreas, Thanks for your sharing solution. Unfortunately I am newbie and leak of java script. Is there any community ready made solution?

Johan
on 8/30/13, 5:55 AM

I found some solution in https://code.launchpad.net/~mmakonnen/openobject-addons/point_of_sale_enhanced-70, but not solve all the feature I need. If we use item barcode as an input in reference field, we can use barcode reader input (on search box) to add the item to the transaction, but it is too slow (take about 3-4 seconds in my case). Any one can solve this? Please advise.

Johan
on 9/1/13, 11:52 PM
0
Luis Leiva
On 9/13/13, 3:20 PM

Hi, I just used the 6.1 bug solution and worked well. https://bugs.launchpad.net/openobject-addons/+bug/949664

Just two changes:

1- In file 'point_of_sale/static/src/js/db.js' Search this if(product.ean13){ str += '|' + product.ean13; } Add this + if(product.default_code){ + str += '|' + product.default_code; + }

2- In the file 'point_of_sale/static/src/js/models.js'

Search this lines return self.fetch( 'product.product', - ['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'to_weight', 'uom_id', 'uos_id', 'uos_coeff', 'mes_type', 'description_sale', 'description'], [['sale_ok','=',true],['available_in_pos','=',true]],

Add default_code + ['name', 'list_price','price','pos_categ_id', 'taxes_id', 'ean13', 'default_code',

Then update the point_of_sale module stopping the server and running with: -update=point_of_sale

(I suppose the correct way should be to create a module with this change.)

If anyone knows how to make this change through a module it would be great. I just don't know.

Luis Leiva
on 9/13/13, 3:35 PM

I just wander anyone can share the similar patch for OpenERP7?

Johan
on 9/14/13, 12:55 AM

Hmmm, I try to edit the same file (db.js and models.js) in OpenERP7 with reference to upper information. Unfortunately it does not work. Any one can help?

Johan
on 9/18/13, 1:56 AM

Hi, I made the change in a very simple module that just replaces the whole files. Probably not the correct way but it works. I don't know how to upload it. Maybe if you give your email I can send it.

Luis Leiva
on 11/15/13, 5:25 PM

Dear Luis Leiva, please send to johan_tr2000@yahoo.com. BTW is it can be also used for OpenERP7? Thanks

Johan
on 11/16/13, 9:47 AM

Yes, I am using v7. I'll send it right now.

Luis Leiva
on 11/16/13, 1:10 PM
0
Johan
On 9/30/13, 5:06 AM

Hi,

I find some time to play with the code yesterday, but I am not an js programmer. I use source code from : launchpad.net/~mmakonnen/openobject-addons/point_of_sale_enhanced-70 and made some modification. Now it can read the EAN-8 code that I store at product reference field, but not the EAN-13 or UPC code that I place on product reference field. I want it to read EAN-8, EAN-13 and UPC code on product reference field. Please HELP

Thanks anyway.....

The modification I made :

  1. point_of_sale/static/src/js/devices.js  
   ORIGINAL CODE : 

   if (code.length !==13){  
    //if(code.length !== 13){
            return -1;
    }

    ..........

    ............

   if (codeNumbers.length === 13){
                    //We have found what seems to be a valid codebar
                    self.on_ean(codeNumbers.join(''));
                    codeNumbers = [];
    }

   MODIFIED CODE:

   if (code.length !==8 && code.length !==12 && code.length !==13){  
    //if(code.length !== 13){
            return -1;
    }
    ........
    ........

   if ((codeNumbers.length === 13)||(codeNumbers.length === 8)||(codeNumbers.length === 12)){
                    //We have found what seems to be a valid codebar
                    self.on_ean(codeNumbers.join(''));
                    codeNumbers = [];
   }

  2. point_of_sale/static/src/js/db.js 

  ORIGINAL CODE :
   get_product_by_ean13: function(ean13){
        var products = this.load('products',{});
        for(var i in products){
            if( products[i] && products[i].ean13 === ean13){
                return products[i];
        }
    }

  MODIFIED CODE :
  get_product_by_ean13: function(ean13){
        var products = this.load('products',{});
        for(var i in products){
            if( (products[i] && products[i].ean13 === ean13) || (products[i] && products[i].default_code === ean13)){
                return products[i];
        }
    }

Hello i try to made the same change but the code for the db.js is different can you explain me the idea like this i wil try to made the modification

manset
on 2/6/14, 3:11 PM

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

2 follower(s)

Stats

Asked: 8/30/13, 1:25 AM
Seen: 6602 times
Last updated: 3/16/15, 8:10 AM