-
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] document_page: migration Browse Wiki Content to 17.0
- Loading branch information
1 parent
d0df693
commit 3482986
Showing
7 changed files
with
47 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
document_page/static/src/js/document_page_kanban_controller.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
document_page/static/src/js/document_page_kanban_view.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** @odoo-module **/ | ||
import {registry} from "@web/core/registry"; | ||
import {kanbanView} from "@web/views/kanban/kanban_view"; | ||
import {DocumentPageKanbanController} from "./document_page_kanban_controller.esm"; | ||
|
||
export const documentPageKanbanView = { | ||
...kanbanView, | ||
Controller: DocumentPageKanbanController, | ||
}; | ||
|
||
registry.category("views").add("document_page_kanban_view", documentPageKanbanView); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters