Priyesh (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/6.1-opw-575341-pso into 
lp:openobject-addons/6.1.

Requested reviews:
  Olivier Dony (OpenERP) (odo-openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575341-pso/+merge/108313

Hello,

It should be possible to search on the reference and EAN field via the search 
field of the POS.
For now, its only possible with product name.

Kindly review the branch and let me know your inputs on it.

Regards,
Priyesh
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/6.1-opw-575341-pso/+merge/108313
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/6.1-opw-575341-pso.
=== modified file 'point_of_sale/static/src/js/pos.js'
--- point_of_sale/static/src/js/pos.js	2012-05-05 16:09:02 +0000
+++ point_of_sale/static/src/js/pos.js	2012-06-01 10:55:22 +0000
@@ -69,7 +69,7 @@
                 }, this));
             }, this));
             $.when(this.fetch('pos.category', ['name', 'parent_id', 'child_id']),
-                this.fetch('product.product', ['name', 'list_price', 'pos_categ_id', 'taxes_id', 'product_image_small', 'ean13', 'id'], [['pos_categ_id', '!=', false]]),
+                this.fetch('product.product', ['name', 'list_price', 'pos_categ_id', 'taxes_id', 'product_image_small', 'code', 'ean13', 'id'], [['pos_categ_id', '!=', false]]),
                 this.fetch('product.packaging', ['product_id', 'ean']),
                 this.fetch('account.bank.statement', ['account_id', 'currency', 'journal_id', 'state', 'name'],
                     [['state', '=', 'open'], ['user_id', '=', this.session.uid]]),
@@ -1333,7 +1333,7 @@
                 s = $(this).val().toLowerCase();
                 if (s) {
                     m = products.filter( function(p) {
-                        return p.name.toLowerCase().indexOf(s) != -1;
+                        return (String(p.code).toLowerCase().indexOf(s) != -1) || (String(p.ean13).toLowerCase().indexOf(s) != -1) || (p.name.toLowerCase().indexOf(s) != -1);
                     });
                     $('.search-clear').fadeIn();
                 } else {

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to