看板视图样式还原

This commit is contained in:
WEB许何哲\xuhez
2023-08-11 10:19:00 +08:00
parent 35ef00a8cd
commit 4b34335963
2 changed files with 26 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
/** @odoo-module */ /** @odoo-module */
import { KanbanController } from "@web/views/kanban/kanban_controller"; import {KanbanController} from "@web/views/kanban/kanban_controller";
import { kanbanView } from "@web/views/kanban/kanban_view"; import {kanbanView} from "@web/views/kanban/kanban_view";
import { registry } from "@web/core/registry"; import {registry} from "@web/core/registry";
// the controller usually contains the Layout and the renderer. // the controller usually contains the Layout and the renderer.
class CustomKanbanController extends KanbanController { class CustomKanbanController extends KanbanController {
@@ -14,7 +14,13 @@ class CustomKanbanController extends KanbanController {
console.log('99999999111'); console.log('99999999111');
this.workOrders = await this.getAllWorkOrders(); this.workOrders = await this.getAllWorkOrders();
console.log('lines', this.workOrders); console.log('lines', this.workOrders);
} var aDiv = document.getElementsByClassName('o_kanban_record')
// for (var i = 0; i < aDiv.length; i++) {
// console.log(aDiv[i])
// }
console.log(aDiv)
}
buttonClick(ev) { buttonClick(ev) {
const button = ev.currentTarget; const button = ev.currentTarget;
const id = button.getAttribute('data-id'); const id = button.getAttribute('data-id');
@@ -37,23 +43,23 @@ class CustomKanbanController extends KanbanController {
kwargs: {} kwargs: {}
}).then((response) => { }).then((response) => {
console.log('response', response); console.log('response', response);
setTimeout(function () { location.reload();
location.reload(); window.onload = function () {
},2000) button.classList.add('choose')
}
}); });
}); });
} }
async getAllWorkOrders() {
const response = await this.env.services.rpc('/web/dataset/call_kw',{ async getAllWorkOrders() {
const response = await this.env.services.rpc('/web/dataset/call_kw', {
model: 'sf.production.line', model: 'sf.production.line',
method: 'search_read', method: 'search_read',
args: [], args: [],
kwargs: {}, kwargs: {},
}); });
// const response1 = await this.env.services.rpc('/web/dataset/call_kw',{ // const response1 = await this.env.services.rpc('/web/dataset/call_kw',{
// model: 'mrp.workcenter', // model: 'mrp.workcenter',
// method: 'search_read', // method: 'search_read',
// args: [], // args: [],
// kwargs: {}, // kwargs: {},

View File

@@ -16,7 +16,12 @@
font-weight: bold; font-weight: bold;
} }
.o_content > .d-flex { //.o_content > .d-flex {
display: block !important; // display: block !important;
} //}