From 10b57a06068e09a507fb22d2c1594e337eb65fe8 Mon Sep 17 00:00:00 2001 From: Prakash Prajapati Date: Fri, 13 Nov 2020 07:15:14 +0000 Subject: [PATCH] [FIX] mail: Fix traceback on immediate onchage after mark activity done Currently, there is traceback when we make the activity as done and directly fire the onchange. Reproduce step: 1) Create an appraisal 2) Create an activity 3) Refresh the Page 4) Done the activity 5) Unpublished the Manager Feedback The 'onchange' action receives the ID of the activity that was marked as done and thus the 'Missing record' error. So in this commit, on done of the activity trigger refesh to reload the activity ID. closes odoo/odoo#63034 Task-id: 2357760 X-original-commit: 23d9bd0b7e43dcb431450664172fbcd409c9d62c Signed-off-by: Yannick Tivisse (yti) --- .../activity_mark_done_popover/activity_mark_done_popover.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/mail/static/src/components/activity_mark_done_popover/activity_mark_done_popover.js b/addons/mail/static/src/components/activity_mark_done_popover/activity_mark_done_popover.js index 529d132ee2b..51a44ce5aa1 100644 --- a/addons/mail/static/src/components/activity_mark_done_popover/activity_mark_done_popover.js +++ b/addons/mail/static/src/components/activity_mark_done_popover/activity_mark_done_popover.js @@ -69,10 +69,11 @@ class ActivityMarkDonePopover extends Component { /** * @private */ - _onClickDone() { - this.activity.markAsDone({ + async _onClickDone() { + await this.activity.markAsDone({ feedback: this._feedbackTextareaRef.el.value, }); + this.trigger('reload'); } /**