[FIX] web: double click on save button was trying to save the data two times if there is some latency
bzr revid: dle@openerp.com-20140417101000-6gtyxntkm5d7zcoy
This commit is contained in:
parent
7b93809fb4
commit
f928ba4f10
|
@ -719,8 +719,9 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_button_save: function() {
|
on_button_save: function(e) {
|
||||||
var self = this;
|
var self = this;
|
||||||
|
$(e.delegateTarget).attr("disabled", true);
|
||||||
return this.save().done(function(result) {
|
return this.save().done(function(result) {
|
||||||
self.trigger("save", result);
|
self.trigger("save", result);
|
||||||
self.reload().then(function() {
|
self.reload().then(function() {
|
||||||
|
@ -730,6 +731,8 @@ instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
|
||||||
parent.menu.do_reload_needaction();
|
parent.menu.do_reload_needaction();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}).always(function(){
|
||||||
|
$(e.delegateTarget).attr("disabled", false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
on_button_cancel: function(event) {
|
on_button_cancel: function(event) {
|
||||||
|
|
Loading…
Reference in New Issue