mirror of
https://github.com/OCA/knowledge.git
synced 2025-12-21 12:52:18 -06:00
[MIG] document_page: migration Browse Wiki Content to 17.0
This commit is contained in:
committed by
Justine Doutreloux
parent
d0df693b95
commit
3482986272
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user