mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-21 04:42:18 -06:00
20 lines
583 B
JavaScript
20 lines
583 B
JavaScript
import {KanbanController} from "@web/views/kanban/kanban_controller";
|
|
|
|
export class DocumentPageKanbanController extends KanbanController {
|
|
/**
|
|
* @param {Object} record
|
|
*/
|
|
async openRecord(record) {
|
|
// eslint-disable-next-line no-undef
|
|
const element = document.querySelector(
|
|
`.o_kanban_record[data-id="${record.id}"] .o_document_page_kanban_boxes a`
|
|
);
|
|
|
|
if (this.props.resModel === "document.page" && element) {
|
|
element.click();
|
|
} else {
|
|
await super.openRecord(record);
|
|
}
|
|
}
|
|
}
|