search_defaults move inside anonymous function and declare variable with var

bzr revid: tta@openerp.com-20111124055521-1il265hvfdvfihx1
This commit is contained in:
Tejas (OpenERP) 2011-11-24 11:25:21 +05:30
parent 11a967f38e
commit c671dfb9f1
1 changed files with 2 additions and 2 deletions

View File

@ -2533,8 +2533,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
},
start: function() {
this._super();
var self = this;
search_defaults = {};
var self = this;
this.dataset = new openerp.web.ProxyDataSet(this, this.model,
this.context);
this.dataset.create_function = function() {
@ -2553,6 +2552,7 @@ openerp.web.form.SelectCreatePopup = openerp.web.OldWidget.extend(/** @lends ope
domains: [] ,
contexts: [this.context],
}, function (results) {
var search_defaults = {};
_.each(results.context, function (value, key) {
var match = /^search_default_(.*)$/.exec(key);
if (match) {