[FIX] getParent() js error when clicking to fast on menu items that load a list view after loading a form view
bzr revid: cto@openerp.com-20140217104920-fu8hcqd51bh7qnrp
This commit is contained in:
parent
df0076c67d
commit
5ef7c4a6a1
|
@ -1623,9 +1623,12 @@ instance.web.ListView.Groups = instance.web.Class.extend( /** @lends instance.we
|
||||||
function synchronized(fn) {
|
function synchronized(fn) {
|
||||||
var fn_mutex = new $.Mutex();
|
var fn_mutex = new $.Mutex();
|
||||||
return function () {
|
return function () {
|
||||||
|
var obj = this;
|
||||||
var args = _.toArray(arguments);
|
var args = _.toArray(arguments);
|
||||||
args.unshift(this);
|
return fn_mutex.exec(function () {
|
||||||
return fn_mutex.exec(fn.bind.apply(fn, args));
|
if (obj.isDestroyed()) { return $.when(); }
|
||||||
|
return fn.apply(obj, args)
|
||||||
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
var DataGroup = instance.web.Class.extend({
|
var DataGroup = instance.web.Class.extend({
|
||||||
|
|
|
@ -1301,7 +1301,7 @@ instance.web.View = instance.web.Widget.extend({
|
||||||
"context": this.dataset.get_context(),
|
"context": this.dataset.get_context(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
return view_loaded_def.then(function(r) {
|
return this.alive(view_loaded_def).then(function(r) {
|
||||||
self.fields_view = r;
|
self.fields_view = r;
|
||||||
// add css classes that reflect the (absence of) access rights
|
// add css classes that reflect the (absence of) access rights
|
||||||
self.$el.addClass('oe_view')
|
self.$el.addClass('oe_view')
|
||||||
|
|
Loading…
Reference in New Issue