[FIX] mail: Onchange error after done & schedule next activity
Current behavior: In any chatter, if you schedule an activity then use the "Done & schedule next" options you had an error if you try to modify some fields of the record linked to the chatter. For example in CRM you couldn't modify the probability after using "Done & Schedule next" Steps to reproduce: -Go in CRM -Go on a lead page -In the chatter schedule an activity -Click on mark done and then on Done & Schedule next -Try to edit the probabilty field of the lead -You get an error : Record does not exist or has been deleted. (Record: mail.activity(x,), User: xx) opw-2648685 closes odoo/odoo#84841 X-original-commit: b45f024e96e17790427ad12e7f201567db0a249b Signed-off-by: Anh Thao PHAM <pta@odoo.com> Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Engels Robin (roen) <roen@odoo.com>
This commit is contained in:
+10
-4
@@ -26,21 +26,27 @@ registerModel({
|
||||
* Handles click on this "Done" button.
|
||||
*/
|
||||
async onClickDone() {
|
||||
const { chatter } = this.activityViewOwner.activityBoxView;
|
||||
await this.activityViewOwner.activity.markAsDone({
|
||||
feedback: this.feedbackTextareaRef.el.value,
|
||||
});
|
||||
if (!this.exists() || !this.component) {
|
||||
if (!chatter.exists() || !chatter.component) {
|
||||
return;
|
||||
}
|
||||
this.component.trigger('reload', { keepChanges: true });
|
||||
chatter.reloadParentView();
|
||||
},
|
||||
/**
|
||||
* Handles click on this "Done & Schedule Next" button.
|
||||
*/
|
||||
onClickDoneAndScheduleNext() {
|
||||
this.activityViewOwner.activity.markAsDoneAndScheduleNext({
|
||||
async onClickDoneAndScheduleNext() {
|
||||
const { chatter } = this.activityViewOwner.activityBoxView;
|
||||
await this.activityViewOwner.activity.markAsDoneAndScheduleNext({
|
||||
feedback: this.feedbackTextareaRef.el.value,
|
||||
});
|
||||
if (!chatter.exists() || !chatter.component) {
|
||||
return;
|
||||
}
|
||||
chatter.reloadParentView();
|
||||
},
|
||||
/**
|
||||
* Handles keydown on this activity mark done.
|
||||
|
||||
Reference in New Issue
Block a user