在odoo 13中添加文件CSS自定义时,我有一个非宽度的问题,请帮助我。
文件custom.css
.o_main_navbar .o_menu_apps .dropdown-menu .dropdown-item{
display: none;
}
文件资产web。后端XML
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="assets_backend_common" name="Common Assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/Maintain_Custom_Common/static/src/css/form-view-custom.css"/>
<link rel="stylesheet" href="/Maintain_Custom_Common/static/src/css/layout.css"/>
<script type="text/javascript" src="/Maintain_Custom_Common/static/src/js/show_lines.js"/>
</xpath>
</template>
</odoo>
网页Bug
- https://i.stack.imgur.com/0p9b9.png
确保将'custom.css'文件添加到自定义模块中。它在xml文件中丢失了。检查这些以正确导入您的自定义代码:https://odoo-development.readthedocs.io/en/latest/dev/css/main.htmlhttps://www.cybrosys.com/blog/how-to-add-css-javascript-in-odoo