diff --git a/addons/account/views/account_move_views.xml b/addons/account/views/account_move_views.xml index 2340892218c..6b3b9768a01 100644 --- a/addons/account/views/account_move_views.xml +++ b/addons/account/views/account_move_views.xml @@ -189,6 +189,7 @@ + diff --git a/addons/mail/static/src/models/thread.js b/addons/mail/static/src/models/thread.js index 99fa52d3b0c..bb7a76c3748 100644 --- a/addons/mail/static/src/models/thread.js +++ b/addons/mail/static/src/models/thread.js @@ -949,10 +949,6 @@ registerModel({ */ async setMainAttachment(attachment) { this.update({ mainAttachment: attachment }); - if (this.model === 'account.move.line') { - // account.move.line is not actually a thread in python - return; - } await this.messaging.rpc({ model: 'ir.attachment', method: 'register_as_main_attachment', diff --git a/addons/mail/static/src/models/web_client_view_attachment_view.js b/addons/mail/static/src/models/web_client_view_attachment_view.js index 0c6db5f6aa9..41deb1f9b2a 100644 --- a/addons/mail/static/src/models/web_client_view_attachment_view.js +++ b/addons/mail/static/src/models/web_client_view_attachment_view.js @@ -37,11 +37,6 @@ registerModel({ * @private */ _onChangeThreadAttachmentsInWebClientView() { - if (this.thread.model === 'account.move.line') { - // account.move.line is not actually a thread in python - this.setMainAttachmentFromIndex(0); - return; - } if ( this.thread.areAttachmentsLoaded && !this.thread.isLoadingAttachments &&