pos icon indicating copy to clipboard operation
pos copied to clipboard

[12.0] pos_multi_ean > We don't find ean13 in pos search

Open acrata29 opened this issue 3 years ago • 2 comments

Name: pos_multi_ean

We aren't able to find products with ean13 in pos search box. We have products with multiple ean13 field and when we go to pos interface, we put ean13 in the search box, and no product is added.

When we go to pos with debug mode on, we try in the debug window search box. And the product is added.

So the module is working well only in debug window.

We installed the module with product_multi_ean in two odoo servers and the result is the same. Both are from version 12.0

Steps to reproduce the behavior:

  1. Install product_multi_ean
  2. Install pos_multi_ean
  3. Add ean to product
  4. Go to POS and try to find the product by ean
  5. No product is added

Expected behavior 4. Go to POS and the product is added when you search the ean in POS search box.

acrata29 avatar Jan 19 '22 12:01 acrata29

I don't know if this is bug or if the module didn't have that feature.

But now I can search the ean directly in the pos search.

I let my solution in case it can help someone.

My solution was to add this function to the file db.js:

search_product_in_category: function(category_id, query){ var resultats = this._super(category_id, query); try { if(this.get_product_by_barcode(query)) { resultats.push(this.get_product_by_barcode(query)); } } catch(exc) { console.log('Error: ' + exc); } return resultats; },

Inside PosDB.include({ /* here*/ })

acrata29 avatar Feb 02 '22 13:02 acrata29

There hasn't been any activity on this issue in the past 6 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this issue to never become stale, please ask a PSC member to apply the "no stale" label.

github-actions[bot] avatar Aug 07 '22 12:08 github-actions[bot]