From f24c83efcc47b24ac8fc7a8add8d2ce39a89ebdf Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 28 Aug 2017 12:28:06 +0200 Subject: [FIX] web,mail: keep changes when scheduling an activity The problem occurred in form view, in edit mode, when the user did some changes in the form, and then clicked on 'Log or schedule an activity'. When validating the activity, the fields mail_activity and mail_thread were reloaded but all changes were discarded in the process. This rev. ensures to reload the requested field without discarding the changes. --- addons/web/static/src/js/views/basic/basic_controller.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic') diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js index cfdee6793dd..32570038987 100644 --- a/addons/web/static/src/js/views/basic/basic_controller.js +++ b/addons/web/static/src/js/views/basic/basic_controller.js @@ -546,7 +546,10 @@ var BasicController = AbstractController.extend(FieldManagerMixin, { this.model.reload(handle).then(this._confirmSave.bind(this, handle)); } else { // no db_id given, so reload the main record - this.reload({fieldNames: data.fieldNames}); + this.reload({ + fieldNames: data.fieldNames, + keepChanges: data.keepChanges || false, + }); } }, /** -- cgit v1.2.3