[IMP] Remove add() in on_search method

bzr revid: ggh@tinyerp.com-20121011053907-tykje6i145fmjrl3
This commit is contained in:
ggh-openerp 2012-10-11 11:09:07 +05:30
parent 6454fd1590
commit 1a476fed69
3 changed files with 4 additions and 20 deletions

View File

@ -785,22 +785,6 @@ instance.web.SearchView = instance.web.Widget.extend(/** @lends instance.web.Sea
}
return this.trigger('data_search', search.domains, search.contexts, search.groupbys);
},
/**
* Triggered after the SearchView has collected all relevant domains and
* contexts.
*
* It is provided with an Array of domains and an Array of contexts, which
* may or may not be evaluated (each item can be either a valid domain or
* context, or a string to evaluate in order in the sequence)
*
* It is also passed an array of contexts used for group_by (they are in
* the correct order for group_by evaluation, which contexts may not be)
*
* @event
* @param {Array} domains an array of literal domains or domain references
* @param {Array} contexts an array of literal contexts or context refs
* @param {Array} groupbys ordered contexts which may or may not have group_by keys
*/
/**
* Triggered after a validation error in the SearchView fields.
*

View File

@ -652,7 +652,7 @@ $(document).ready(function () {
}
});
var ds, cs, gs;
view.on_search.add(function (d, c, g) {
view.on('data_search', this, function (d, c, g) {
ds = d, cs = c, gs = g;
});
view.appendTo($fix)
@ -690,7 +690,7 @@ $(document).ready(function () {
}
}, {dummy: 42});
var ds, cs, gs;
view.on_search.add(function (d, c, g) {
view.on('data_search', this, function (d, c, g) {
ds = d, cs = c, gs = g;
});
view.appendTo($fix)
@ -718,7 +718,7 @@ $(document).ready(function () {
}
}, {dummy: 42});
var ds;
view.on_search.add(function (d) { ds = d; });
view.on('data_search', this, function (d) { ds = d; });
view.appendTo($fix)
.always(start)
.fail(function (error) { ok(false, error.message); })

View File

@ -7,7 +7,7 @@ openerp.web_hello = function(instance) {
instance.web.SearchView = instance.web.SearchView.extend({
init:function() {
this._super.apply(this,arguments);
this.on_search.add(function(){console.log('hello');});
this.on('data_search', this, function(){console.log('hello');});
}
});