From 18e0800aa768ca0f8bd68205342f02529fd3f978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 18 Mar 2015 11:14:58 +0100 Subject: [PATCH] Clear record timestamp after save Since changeset f63036a91c9f, the timestamp is sent also on button calls but if the record is saved just before this generate an concurrency exception. Indeed the _timestamp must be cleared just after the save (because the record is not reloaded before the button call). issue4644 review9151002 --- src/model.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/model.js b/src/model.js index 7df28d00b7..8e97b6dc7a 100644 --- a/src/model.js +++ b/src/model.js @@ -397,6 +397,7 @@ } } prm.done(function() { + this.cancel(); this.reload(); }.bind(this)); // TODO group written @@ -920,6 +921,7 @@ cancel: function() { this._loaded = {}; this._changed = {}; + this._timestamp = null; }, get_loaded: function(fields) { if (!jQuery.isEmptyObject(fields)) {