i want to be able to remove or add the controlpanel to some kanban view ,how can i do that?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
By using patching method, we can modify the control panel in Odoo.Use the following code to add or remove the control panel in Odoo:/** @odoo-module */
import { ControlPanel } from "@web/search/control_panel/control_panel";
import { patch } from "@web/core/utils/patch";
import { useRef, onPatched, onMounted, useState } from "@odoo/owl";
patch(ControlPanel.prototype,{
setup() {
super.setup();
onMounted(() => { #you can specify the condition where we need to hide the control panel
if (this.env.searchModel && this.env.searchModel.resModel == 'your_model') {
this.root.el.style.setProperty("display", "none", "important");
}
});
},
});
Hope it helps.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký