合并企业版代码(未测试,先提交到测试分支)
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { useService } from "@web/core/utils/hooks";
|
||||
import { KanbanController } from '@web/views/kanban/kanban_controller';
|
||||
|
||||
export class MrpWorkorderKanbanController extends KanbanController {
|
||||
|
||||
setup() {
|
||||
super.setup();
|
||||
this.context = {};
|
||||
this.orm = useService('orm');
|
||||
}
|
||||
|
||||
actionBack() {
|
||||
this.actionService.doAction('mrp.mrp_workcenter_kanban_action', {
|
||||
clearBreadcrumbs: true,
|
||||
});
|
||||
}
|
||||
|
||||
async openRecord(record, mode) {
|
||||
const action = await this.orm.call(
|
||||
'mrp.workorder',
|
||||
'open_tablet_view',
|
||||
[record.resId],
|
||||
);
|
||||
Object.assign(action.context, this.context);
|
||||
this.actionService.doAction(action);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
/** @odoo-module */
|
||||
|
||||
import { kanbanView } from "@web/views/kanban/kanban_view";
|
||||
import { MrpWorkorderKanbanController } from "./mrp_workorder_kanban_controller";
|
||||
import { registry } from "@web/core/registry";
|
||||
|
||||
export const MrpWorkorderKanbanView = {
|
||||
...kanbanView,
|
||||
Controller: MrpWorkorderKanbanController,
|
||||
buttonTemplate: 'mrp_workorder.overviewButtonsKanban',
|
||||
};
|
||||
|
||||
registry.category("views").add('tablet_kanban_view', MrpWorkorderKanbanView);
|
||||
Reference in New Issue
Block a user