[REF] mail: move attachment deletable condition to discuss folder
Part of task-3265211 Part-of: odoo/odoo#125388
This commit is contained in:
@@ -31,9 +31,6 @@ export class Attachment {
|
||||
}
|
||||
|
||||
get isDeletable() {
|
||||
if (this.message && this.originThread?.model === "discuss.channel") {
|
||||
return this.message.editable;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,12 @@ import { Attachment } from "@mail/core/common/attachment_model";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Attachment.prototype, "discuss/core/common", {
|
||||
get isDeletable() {
|
||||
if (this.message && this.originThread?.model === "discuss.channel") {
|
||||
return this.message.editable;
|
||||
}
|
||||
return this._super();
|
||||
},
|
||||
get urlRoute() {
|
||||
if (!this.accessToken && this.originThread?.model === "discuss.channel") {
|
||||
return this.isImage
|
||||
|
||||
Reference in New Issue
Block a user