Browse Source

only switch to readonly if save is successful

pull/295/head
NetItUp-CarloToso 2 years ago
parent
commit
e61ad9edce
  1. 4
      edit_save_button/static/src/views/form/form_controller.js

4
edit_save_button/static/src/views/form/form_controller.js

@ -31,9 +31,11 @@ patch(FormController.prototype, "save", {
await this.model.root.switchMode("edit");
},
async saveButtonClicked(params = {}) {
this._super();
let saved = await this._super();
data = false;
if (saved) {
await this.model.root.switchMode("readonly");
}
},
async discard() {
this._super();

Loading…
Cancel
Save