Chirag Patel (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-16399-cpa into 
lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-16399-cpa/+merge/69429

Hello,

In Warehouse > product > product

Extended Filters > stock location > select any location and search.

Search not work because context not pass in m2o field but it's work in m2o 
selection field.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-16399-cpa/+merge/69429
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-16399-cpa.
=== modified file 'addons/openerp/controllers/search.py'
--- addons/openerp/controllers/search.py	2011-06-08 05:35:56 +0000
+++ addons/openerp/controllers/search.py	2011-07-27 11:09:30 +0000
@@ -252,7 +252,7 @@
 
         c = search_context.get('context', {})
         v = search_context.get('value')
-        if v and '__' in v:
+        if v and isinstance(v, basestring) and '__' in v:
             value, operator = v.split('__')
             v = int(value)
         ctx = expr_eval(c, {'self':v})

=== modified file 'addons/openerp/static/javascript/search.js'
--- addons/openerp/static/javascript/search.js	2011-06-08 05:35:56 +0000
+++ addons/openerp/static/javascript/search.js	2011-07-27 11:09:30 +0000
@@ -566,6 +566,11 @@
             else {
             	fld_value = parseInt(jQuery(idSelector(fld_name)).val()) || fld_value;
             }
+            fld_context = jQuery(idSelector(fld_name)).attr('context');
+            if (fld_context) {
+                search_context['context'] = fld_context;
+                search_context['value'] = fld_value;
+            }
         }
         
         if(kind == 'boolean' && fld_value) {

_______________________________________________
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