[FIX] mail: marking activity done from form view
Before this commit: When editing the activity, traceback while processing with buttons "Done & Schedule Next", "Mark as Done" from the form view. This is happening because when we process with these buttons it complete the action of respective buttons and then the trigger will go on the close window. Hence, we don't have activity data as "mark as done" remove the activity. After this commit: Footer buttons will be processed as expected without any traceback. Task-2357681 closes odoo/odoo#60174 X-original-commit: 623c5176a37ae5fd048d6bb10e742fac5caa6cf2 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -160,8 +160,13 @@ function factory(dependencies) {
|
||||
method: 'activity_format',
|
||||
args: [this.id],
|
||||
}, { shadow: true }));
|
||||
this.update(this.constructor.convertData(data));
|
||||
this.thread.refresh();
|
||||
if (data) {
|
||||
this.update(this.constructor.convertData(data));
|
||||
this.thread.refresh();
|
||||
} else {
|
||||
this.thread.refresh();
|
||||
this.delete();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user