Merge lp:~openerp-dev/openobject-client/6.0-bug-749574-xrg into lp:openobject-client/6.0

Proposed by xrg
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-client/6.0-bug-749574-xrg
Merge into: lp:openobject-client/6.0
Diff against target: 12 lines (+1/-1)
1 file modified
bin/widget_search/custom_filter.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-client/6.0-bug-749574-xrg
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+57146@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

1834. By xrg

widget_search: Custom Filter condition "in", "not in" don't remove whitespace

[Bug 749574]
Reported by: Paulius Sladkevičius - inovera.lt

> GTK client v5.0.15

> I see some usability problems in "in" and "not in" filter condition's.
> When I wanted add custom filter condition for the modules list, "name in
> project, sale" I got only project module in filtered list. Only when I
> looked to gtk code I saw that nobody remove spaces, so the query goes
> like ['project', ' sale']. So lets add replace(' ',''), before strip and
> and nobody don't bother with whitespace.
>
> p.s. I think it is same with the web client.

Committed an alternative way to write your patch, thanks.
(cherry picked from commit fd22cd9ec78927e02b6028208ac5ae39f86904e6)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/widget_search/custom_filter.py'
2--- bin/widget_search/custom_filter.py 2011-01-25 10:58:55 +0000
3+++ bin/widget_search/custom_filter.py 2011-04-11 11:55:40 +0000
4@@ -131,7 +131,7 @@
5 operator = '='
6
7 if operator in ['in','not in']:
8- right_text = right_text.split(',')
9+ right_text = map(str.strip, right_text.split(','))
10
11 # Cannot use the active_text as it will be translated!
12 # So as a workaround we use the index: 0 == AND, 1 == OR