Merge lp:~openerp-dev/openerp-web/7.0-opw-586093-msh into lp:openerp-web/7.0

Proposed by Mohammed Shekha(Open ERP)
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-opw-586093-msh
Merge into: lp:openerp-web/7.0
Diff against target: 12 lines (+1/-1)
1 file modified
addons/web/static/src/js/search.js (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-opw-586093-msh
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Disapprove
Review via email: mp+148111@code.launchpad.net

Description of the change

Hello,

Fixed the issue of domain in save filter, domain should be Jsonify, curretnly if you create filter with domain which contains accent characters then it will not work.

Demo :- Create advance filter by searching for the record which contains accent characters, say for example go to Customers -> and search for the customer Followers contains Frédéric Gilson, and save that filter with default=True, Now again go to customer so by default that filter is applied but you will not get any record, because because domain is saved as [['message_follower_ids', 'ilike', u'Fr\xe9d\xe9ric Gilson']] instead of [["message_follower_ids","ilike","Frédéric Gilson"]].

Thanks.

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

Stored domains are python literals, not json, current behavior is incorrect in web client when reading domain back (probably python evaluator in javascript)

review: Disapprove

Unmerged revisions

3752. By Mohammed Shekha<email address hidden>

[FIX]Fixed the issue of domain in save filter, domain should be Jsonify, curretnly if you create filter with domain which contains accent characters then it will not work.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'addons/web/static/src/js/search.js'
2--- addons/web/static/src/js/search.js 2013-01-31 13:51:25 +0000
3+++ addons/web/static/src/js/search.js 2013-02-13 09:03:48 +0000
4@@ -1679,7 +1679,7 @@
5 user_id: private_filter ? instance.session.uid : false,
6 model_id: self.view.model,
7 context: results.context,
8- domain: results.domain,
9+ domain: JSON.stringify(results.domain),
10 is_default: set_as_default
11 };
12 // FIXME: current context?