projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b93809
)
[FIX] web: double click on save button was trying to save the data two times if there...
author
Denis Ledoux
<dle@openerp.com>
Thu, 17 Apr 2014 10:10:00 +0000
(12:10 +0200)
committer
Denis Ledoux
<dle@openerp.com>
Thu, 17 Apr 2014 10:10:00 +0000
(12:10 +0200)
bzr revid: dle@openerp.com-
20140417101000
-6gtyxntkm5d7zcoy
addons/web/static/src/js/view_form.js
patch
|
blob
|
history
diff --git
a/addons/web/static/src/js/view_form.js
b/addons/web/static/src/js/view_form.js
index
c5cc498
..
debda63
100644
(file)
--- a/
addons/web/static/src/js/view_form.js
+++ b/
addons/web/static/src/js/view_form.js
@@
-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;
+ $(e.delegateTarget).attr("disabled", true);
return this.save().done(function(result) {
self.trigger("save", result);
self.reload().then(function() {
@@
-730,6
+731,8
@@
instance.web.FormView = instance.web.View.extend(instance.web.form.FieldManagerM
parent.menu.do_reload_needaction();
}
});
+ }).always(function(){
+ $(e.delegateTarget).attr("disabled", false);
});
},
on_button_cancel: function(event) {