隐藏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");
    }
});
相关推荐
花酒锄作田5 小时前
[python]argparse 包在聊天机器人中的应用
python
NiceCloud喜云8 小时前
Opus 4.8 的 Effort Control 怎么选:Low 到 Max 五档策略
android·java·大数据·前端·c++·python·spring
AI玫瑰助手8 小时前
Python函数:默认参数的定义与注意事项
开发语言·python·信息可视化
weixin_468466858 小时前
全局与局部注意力机制新手实战指南
人工智能·python·深度学习·算法·自然语言处理·transformer·注意力机制
小糖学代码9 小时前
LLM系列:环境搭建:5.Python-dotenv 环境变量管理
人工智能·python·深度学习·神经网络
智慧物业老杨9 小时前
智慧物业合同周期管理系统:从风险预警到智能交接的全流程数智化落地方案
java·人工智能·python
橙橙笔记9 小时前
Python的学习第一部分
python·学习
voidmort10 小时前
3. 微调(Fine-tuning)与强化学习(RL)的核心思想
python·深度学习·算法
biter down11 小时前
基于 Pywinauto 的 QQ 音乐 GUI 自动化测试实践
python
人道领域11 小时前
【LeetCode刷题日记】669.修剪二叉搜索树
开发语言·python·算法