mirror of
https://github.com/OCA/knowledge.git
synced 2025-07-27 02:48:41 -06:00
[IMP] attachment_preview: Disable base Odoo sidebar
Odoo's default attachment sidebar can show up in views with `<div class="o_attachment_preview" />`. Our attachment sidebar would show up on top of it, making the base Odoo sidebar obsolete. ➔ We disable it.
This commit is contained in:
parent
80717b4ad6
commit
8e6a26c424
@ -20,6 +20,7 @@
|
||||
"attachment_preview/static/src/js/mail_models/attachment_card.esm.js",
|
||||
"attachment_preview/static/src/js/mail_models/attachment_list.esm.js",
|
||||
"attachment_preview/static/src/js/web_views/binary_field.esm.js",
|
||||
"attachment_preview/static/src/js/web_views/form_controller.esm.js",
|
||||
"attachment_preview/static/src/js/web_views/form_renderer.esm.js",
|
||||
"attachment_preview/static/src/scss/attachment_preview.scss",
|
||||
"attachment_preview/static/src/xml/attachment_preview.xml",
|
||||
|
@ -0,0 +1,12 @@
|
||||
/** @odoo-module **/
|
||||
import {FormController} from "@web/views/form/form_controller";
|
||||
import {patch} from "@web/core/utils/patch";
|
||||
|
||||
patch(FormController.prototype, "attachment_preview.FormController", {
|
||||
/* Defined in addons/mail/static/src/views/form/form_controller.js.
|
||||
* This method controls Odoo's default attachment sidebar, which only shows
|
||||
* up based on screen size. ➔ Superseded by this module; we disable it. */
|
||||
hasAttachmentViewer() {
|
||||
return false;
|
||||
},
|
||||
});
|
Loading…
Reference in New Issue
Block a user