Sananaz (Open ERP) has proposed merging
lp:~openerp-dev/openobject-client-web/trunk-bug-715773-sma into
lp:openobject-client-web.
Requested reviews:
OpenERP SA's Web Client R&D (openerp-dev-web)
Related bugs:
Bug #715773 in OpenERP Web Client: "[6.0] web client should use exact match
search (=) for searching on fields.selection"
https://bugs.launchpad.net/openobject-client-web/+bug/715773
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-715773-sma/+merge/53004
Hello,
Fixed selection field domain for search view.
Problem create from here:
1. At openerp/widgets/form/_form.py
Selection widget line:516
we replace its kind `selection` to `char`.
2. So at the search.js we get the kind `char` for selection field. Then passed
domain with `ilike`.
3. To solve problem need to check its actual type `selection` and assign domain
with `=`.
Thank you.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-715773-sma/+merge/53004
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/trunk-bug-715773-sma.
=== modified file 'addons/openerp/controllers/search.py'
--- addons/openerp/controllers/search.py 2011-03-04 07:12:57 +0000
+++ addons/openerp/controllers/search.py 2011-03-11 11:57:19 +0000
@@ -323,9 +323,14 @@
val = int(value.split('selection_')[1])
except:
val = value.split('selection_')[1]
-
+
domain.append((field, '=', val))
search_data[field] = val
+
+ elif fld['type'] == 'selection':
+ domain.append((field, '=', value))
+ search_data[field] = value
+
else:
if not 'm2o_' in value:
operator = 'ilike'
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-web
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-web
More help : https://help.launchpad.net/ListHelp