summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-08-28 12:28:06 +0200
committerAaron Bohy <aab@odoo.com>2017-08-29 10:38:36 +0200
commitf24c83efcc47b24ac8fc7a8add8d2ce39a89ebdf (patch)
tree3ca8de677f73b314f39745fcfb2c374517e26ef7 /addons/web/static/src
parente1cbaf7af7b1a52c6cb10a8f162bb10aa7016c95 (diff)
[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.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js5
1 files changed, 4 insertions, 1 deletions
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,
+ });
}
},
/**