[FIX] mail: fix the attachment traceback sync attachment

Currently, traceback occurs when same attachments are sync with
form view and bottom chatter and removed from chatter.

So in this commit, on click of remove attachment dialog wait
till the attachment id is removed from list of attachments.

closes odoo/odoo#65093

Taskid: 2431478
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
This commit is contained in:
Prakash Prajapati
2021-04-13 13:38:31 +00:00
parent 51399445a3
commit 9ec2f4cb44
@@ -70,9 +70,9 @@ class AttachmentDeleteConfirmDialog extends Component {
/**
* @private
*/
_onClickOk() {
async _onClickOk() {
await this.attachment.remove();
this._dialogRef.comp._close();
this.attachment.remove();
this.trigger('o-attachment-removed', { attachmentLocalId: this.props.attachmentLocalId });
}