增加js_class类对看板视图进行布局修改

This commit is contained in:
mgw
2023-07-11 15:43:03 +08:00
parent b72c3ce08a
commit 94ffec20db
5 changed files with 60 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
/** @odoo-module */
import { KanbanController } from "@web/views/kanban/kanban_controller";
import { kanbanView } from "@web/views/kanban/kanban_view";
import { registry } from "@web/core/registry";
// the controller usually contains the Layout and the renderer.
class CustomKanbanController extends KanbanController {
// Your logic here, override or insert new methods...
// if you override setup(), don't forget to call super.setup()
}
CustomKanbanController.template = "sf_warehouse.CustomKanbanView";
export const customKanbanView = {
...kanbanView, // contains the default Renderer/Controller/Model
Controller: CustomKanbanController,
};
// Register it to the views registry
registry.category("views").add("custom_kanban", customKanbanView);