Merge lp:~openerp-dev/openerp-web/7.0-bug-1095251-pan into lp:openerp-web/7.0

Proposed by Anand
Status: Rejected
Rejected by: Xavier (Open ERP)
Proposed branch: lp:~openerp-dev/openerp-web/7.0-bug-1095251-pan
Merge into: lp:openerp-web/7.0
Diff against target: 50 lines (+17/-2)
1 file modified
addons/web/static/src/js/search.js (+17/-2)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/7.0-bug-1095251-pan
Reviewer Review Type Date Requested Status
Xavier (Open ERP) (community) Disapprove
Review via email: mp+144244@code.launchpad.net

Description of the change

Hello,

fixed the issue of "Impossible to look for a user whose language is none".

-Here if user select blank in language then it stores as null.
-And the advanced search looks for only not null values.
-So, Added domain for the null values.
-And also added a blank option in drop-down to select blank if required.

Thanks,
PAN

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

Reimplemented 6.1's generic "is set"/"is not set" operators.

review: Disapprove

Unmerged revisions

3709. By Anand

[FIX][7.0]Impossible to look for a user whose language is none (inexistant)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/static/src/js/search.js'
--- addons/web/static/src/js/search.js 2013-01-14 13:51:45 +0000
+++ addons/web/static/src/js/search.js 2013-01-22 08:59:23 +0000
@@ -1745,6 +1745,13 @@
1745 var children = this.getChildren();1745 var children = this.getChildren();
1746 var propositions = _.invoke(children, 'get_proposition');1746 var propositions = _.invoke(children, 'get_proposition');
1747 var domain = _(propositions).pluck('value');1747 var domain = _(propositions).pluck('value');
1748
1749 // if operator is '!=' then add another domain for null value
1750 var field = children[0].attrs.selected.name;
1751 if ((domain[domain.length - 1][1] == '!=') && (domain[domain.length - 1][2] != null )) {
1752 domain[domain.length] = [field, '=', null]
1753 }
1754
1748 for (var i = domain.length; --i;) {1755 for (var i = domain.length; --i;) {
1749 domain.unshift('|');1756 domain.unshift('|');
1750 }1757 }
@@ -1882,7 +1889,7 @@
1882 {value: "!=", text: _lt("is not equal to")}1889 {value: "!=", text: _lt("is not equal to")}
1883 ],1890 ],
1884 get_value: function() {1891 get_value: function() {
1885 return this.$el.val();1892 return this.$el.val() || null;
1886 }1893 }
1887});1894});
1888instance.web.search.ExtendedSearchProposition.DateTime = instance.web.search.ExtendedSearchProposition.Field.extend({1895instance.web.search.ExtendedSearchProposition.DateTime = instance.web.search.ExtendedSearchProposition.Field.extend({
@@ -1968,6 +1975,14 @@
1968});1975});
1969instance.web.search.ExtendedSearchProposition.Selection = instance.web.search.ExtendedSearchProposition.Field.extend({1976instance.web.search.ExtendedSearchProposition.Selection = instance.web.search.ExtendedSearchProposition.Field.extend({
1970 template: 'SearchView.extended_search.proposition.selection',1977 template: 'SearchView.extended_search.proposition.selection',
1978 init: function (parent ,field) {
1979 this._super.apply(this, arguments);
1980 this.field = field;
1981 this.field.selection = _(this.field.selection).chain()
1982 .reject(function (v) { return v[0] === false && v[1] === ''; })
1983 .unshift([null, ''])
1984 .value();
1985 },
1971 operators: [1986 operators: [
1972 {value: "=", text: _lt("is")},1987 {value: "=", text: _lt("is")},
1973 {value: "!=", text: _lt("is not")}1988 {value: "!=", text: _lt("is not")}
@@ -1978,7 +1993,7 @@
1978 return option.label || option.text;1993 return option.label || option.text;
1979 },1994 },
1980 get_value: function() {1995 get_value: function() {
1981 return this.$el.val();1996 return this.$el.val() || null;
1982 }1997 }
1983});1998});
1984instance.web.search.ExtendedSearchProposition.Boolean = instance.web.search.ExtendedSearchProposition.Field.extend({1999instance.web.search.ExtendedSearchProposition.Boolean = instance.web.search.ExtendedSearchProposition.Field.extend({