Return false when modified is not saved and not created
The return of modified_save method is used to decide to execute an action or not. When a new record is cancelled, the client select the previous record so we must not run the action on this one. issue9881 review337111002
This commit is contained in:
+7
-1
@@ -734,7 +734,13 @@
|
||||
case 'ok':
|
||||
return this.save();
|
||||
case 'ko':
|
||||
return this.reload(false);
|
||||
var record_id = this.screen.current_record.id;
|
||||
return this.reload(false).then(function() {
|
||||
if (record_id !=
|
||||
this.screen.current_record.id) {
|
||||
return jQuery.Deferred().reject();
|
||||
}
|
||||
}.bind(this));
|
||||
default:
|
||||
return jQuery.Deferred().reject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user