mirror of
https://github.com/bringout/oca-ocb-project.git
synced 2026-04-20 07:22:02 +02:00
19.0 vanilla
This commit is contained in:
parent
a2f74aefd8
commit
4a4d12c333
844 changed files with 212348 additions and 270090 deletions
|
|
@ -0,0 +1,41 @@
|
|||
import { Composer } from "@mail/core/common/composer";
|
||||
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
import { onWillStart } from "@odoo/owl";
|
||||
|
||||
patch(Composer.prototype, {
|
||||
setup() {
|
||||
super.setup();
|
||||
onWillStart(() => {
|
||||
if (!this.thread.id) {
|
||||
this.state.active = false;
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
get extraData() {
|
||||
const extraData = super.extraData;
|
||||
if (this.env.projectSharingId) {
|
||||
extraData.project_sharing_id = this.env.projectSharingId;
|
||||
}
|
||||
return extraData;
|
||||
},
|
||||
|
||||
get isSendButtonDisabled() {
|
||||
if (this.thread && !this.thread.id) {
|
||||
return true;
|
||||
}
|
||||
return super.isSendButtonDisabled;
|
||||
},
|
||||
|
||||
get allowUpload() {
|
||||
if (this.thread && !this.thread.id) {
|
||||
return false;
|
||||
}
|
||||
return super.allowUpload;
|
||||
},
|
||||
|
||||
get shouldHideFromMessageListOnDelete() {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue