summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_list_editable.js
diff options
context:
space:
mode:
authorFabien Meghazi <fme@openerp.com>2012-11-08 12:14:48 +0100
committerFabien Meghazi <fme@openerp.com>2012-11-08 12:14:48 +0100
commit0b4b1cf52df01bd0861db30a8eea5a9c787bc252 (patch)
treee55f6fe69a5425d8dcd7c2674ba71f0434509296 /addons/web/static/src/js/view_list_editable.js
parente2766b669067aaecf356842bd603ef9f0ee6b46f (diff)
parent7c3d2a37b50adefca82829fb2705aad0499e8257 (diff)
[MERGE] trunk
bzr revid: fme@openerp.com-20121108111222-cetz6q6s47iwxnm2 bzr revid: fme@openerp.com-20121108111448-2rzx9moaqloc5lpc
Diffstat (limited to 'addons/web/static/src/js/view_list_editable.js')
-rw-r--r--addons/web/static/src/js/view_list_editable.js13
1 files changed, 9 insertions, 4 deletions
diff --git a/addons/web/static/src/js/view_list_editable.js b/addons/web/static/src/js/view_list_editable.js
index aec480502fa..3711bba16c1 100644
--- a/addons/web/static/src/js/view_list_editable.js
+++ b/addons/web/static/src/js/view_list_editable.js
@@ -12,6 +12,8 @@ openerp.web.list_editable = function (instance) {
var self = this;
this._super.apply(this, arguments);
+ this.saving_mutex = new $.Mutex();
+
this._force_editability = null;
this._context_editable = false;
this.editor = this.make_editor();
@@ -162,10 +164,13 @@ openerp.web.list_editable = function (instance) {
* @returns {$.Deferred}
*/
ensure_saved: function () {
- if (!this.editor.is_editing()) {
- return $.when();
- }
- return this.save_edition();
+ var self = this;
+ return this.saving_mutex.exec(function() {
+ if (!self.editor.is_editing()) {
+ return $.when();
+ }
+ return self.save_edition();
+ });
},
/**
* Set up the edition of a record of the list view "inline"