合并企业版代码(未测试,先提交到测试分支)

This commit is contained in:
qihao.gong@jikimo.com
2023-04-14 17:42:23 +08:00
parent 7a7b3d7126
commit d28525526a
1300 changed files with 513579 additions and 5426 deletions

View File

@@ -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);
}
}

View File

@@ -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);