[MIG] document_page: migration Browse Wiki Content to 17.0

This commit is contained in:
natuan9
2024-11-05 17:25:08 +07:00
committed by Justine Doutreloux
parent d0df693b95
commit 3482986272
7 changed files with 47 additions and 54 deletions

View File

@@ -0,0 +1,19 @@
/** @odoo-module **/
import {KanbanController} from "@web/views/kanban/kanban_controller";
export class DocumentPageKanbanController extends KanbanController {
/**
* @param {Object} record
*/
async openRecord(record) {
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);
}
}
}