隐藏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");
    }
});
相关推荐
阿童木写作2 小时前
TikTok Shop视频翻译工具实战测评
人工智能·python·音视频
circuitsosk2 小时前
大模型驱动的AI产品后端架构设计与实践
人工智能·python
JackSparrow4142 小时前
前端安全之JS混淆+请求加密+请求签名以提升爬虫难度
前端·javascript·后端·爬虫·python·安全
软糖姐姐3 小时前
python eureka服务发现_python与consul 实现gRPC服务注册-发现
python·consul·grpc·服务注册·发现
听雨入夜3 小时前
zero.zhang
开发语言·python
叶 落4 小时前
Mac 通过 Miniconda 安装 Python
python·macos·conda·miniconda
就改了10 小时前
Java8 日期处理(详细版)
java·python·算法
威联通安全存储13 小时前
TS-h1887XU-RP在汽车发动机热试与NVH在线质检网中的部署
python·汽车
qq_3164110314 小时前
腹腔镜模拟手术训练数字化管理平台构建
人工智能·python·深度学习·机器学习
卷无止境14 小时前
PageIndex:把RAG的检索逻辑从"找相似"改成了"讲道理"
后端·python