/** @odoo-module */ import { ListController } from "@web/views/list/list_controller"; import { registry } from '@web/core/registry'; import { listView } from '@web/views/list/list_view'; export class CustomTaskListController extends ListController { setup() { super.setup(); } openTaskForm() { this.actionService.doAction({ type: 'ir.actions.act_window', res_model: 'yuthon.will.task', name: '日程会议', view_mode: 'form', view_type: 'form', views: [[false, 'form']], target: 'current', context: {'task_state': 'will'}, }); } openMeetForm() { this.actionService.doAction({ type: 'ir.actions.act_window', res_model: 'room.booking', name: '通知公告', view_mode: 'form', view_type: 'form', views: [[false, 'form']], target: 'current', context: {}, }); } } registry.category("views").add("custom_task_tree_button", { ...listView, Controller: CustomTaskListController, buttonTemplate: "yuthon_task.ListView.Buttons", });