Clear record timestamp after save
Since changeset 28a09c279d67, 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 review8021002
This commit is contained in:
1 parent
25050ae683
commit
fee59e2b2b
1 file changed
+2
-2
@@ -270,6 +270,7 @@ class Record(SignalEvent):
|
||||
def cancel(self):
|
||||
self._loaded.clear()
|
||||
self.modified_fields.clear()
|
||||
self._timestamp = None
|
||||
|
||||
def get_timestamp(self):
|
||||
result = {self.model_name + ',' + str(self.id): self._timestamp}
|
||||
@@ -311,8 +312,7 @@ class Record(SignalEvent):
|
||||
[self.id], value, context=context)
|
||||
except RPCException:
|
||||
return False
|
||||
self._loaded.clear()
|
||||
self.modified_fields = {}
|
||||
self.cancel()
|
||||
if force_reload:
|
||||
self.reload()
|
||||
if self.group:
|
||||
|
||||
Reference in new issue
Block a user