mirror of
https://github.com/bringout/oca-ocb-technical.git
synced 2026-04-23 07:31:59 +02:00
19.0 vanilla
This commit is contained in:
parent
5faf7397c5
commit
2696f14ed7
721 changed files with 220375 additions and 91221 deletions
|
|
@ -0,0 +1,26 @@
|
|||
import { Activity } from "@mail/core/web/activity";
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { patch } from "@web/core/utils/patch";
|
||||
|
||||
patch(Activity.prototype, {
|
||||
setup() {
|
||||
super.setup();
|
||||
this.orm = useService("orm");
|
||||
},
|
||||
async onClickReschedule() {
|
||||
await this.props.activity.rescheduleMeeting();
|
||||
},
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
async unlink() {
|
||||
if (this.props.activity.calendar_event_id) {
|
||||
const thread = this.thread;
|
||||
this.props.activity.remove();
|
||||
await this.orm.call("mail.activity", "unlink_w_meeting", [[this.props.activity.id]]);
|
||||
this.props.onActivityChanged(thread);
|
||||
} else {
|
||||
super.unlink();
|
||||
}
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue