隐藏odoo特有

隐藏导入数据时,多余的内容

xml 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
    <t t-inherit="base_import.ImportAction" t-inherit-mode="extension" owl="1">
        <xpath expr="//div[hasclass('mt16')]" position="replace"></xpath>
        <xpath expr="//div[@t-foreach]" position="replace"></xpath>
        <xpath expr="//a[@target='new']" position="replace"></xpath>
    </t>
    <t t-inherit="base_import.ImportDataSidepanel" t-inherit-mode="extension" owl="1">
        <xpath expr="//h4[text()='Help']/.." position="replace"></xpath>
    </t>
</templates>

隐藏右上角 ActivityMenu

xml 复制代码
<?xml version="1.0" encoding="UTF-8"?>
<templates id="template" xml:space="preserve">
    <t t-inherit="mail.ActivityMenu" t-inherit-mode="extension" owl="1">
        <xpath expr="//Dropdown[hasclass('discussSystray.class')]" position="replace"></xpath>
    </t>
    <t t-inherit="mail.MessagingMenu" t-inherit-mode="extension" owl="1">
        <xpath expr="//t[@ t-set-slot='toggler']" position="replace"></xpath>
    </t>
</templates>

隐藏字段伸缩展示、隐藏功能

当这里有值时,就显示,没有值时,就隐藏

隐藏 右上角 个人展开的一些菜单

javascript 复制代码
/** @odoo-module **/

import { UserMenu } from "@web/webclient/user_menu/user_menu";
import { patch } from "@web/core/utils/patch";
import { registry } from "@web/core/registry";
const userMenuRegistry = registry.category("user_menuitems");

patch(UserMenu.prototype, {
    setup() {
        super.setup();
        userMenuRegistry.remove("documentation");
        userMenuRegistry.remove("support");
        userMenuRegistry.remove("shortcuts");
        userMenuRegistry.remove("separator");
        userMenuRegistry.remove("odoo_account");
    }
});
相关推荐
cup112 小时前
[技术复盘] Windows Python 打包实战:Nuitka 环境踩坑总结与 CI 自动化构建全指南
python·ai·环境变量·ci·nuitka·skill
aqi004 小时前
15天学会AI应用开发(七)有了大模型为什么还要引入RAG
人工智能·python·大模型·ai编程·ai应用
金銀銅鐵6 小时前
用 Python 实现 Take-Away 游戏
python·游戏
copyer_xyf7 小时前
Agent 流程编排
后端·python·agent
copyer_xyf7 小时前
Agent RAG
后端·python·agent
copyer_xyf7 小时前
【RAG】向量数据库:milvus
后端·python·agent
copyer_xyf8 小时前
Agent 记忆管理
后端·python·agent
星云穿梭1 天前
用Python写一个带图形界面的学生管理系统——完整教程
python
金銀銅鐵1 天前
用 Pygame 实现 15 puzzle
python·数学·游戏