合并企业版代码(未测试,先提交到测试分支)

This commit is contained in:
qihao.gong@jikimo.com
2023-04-14 17:42:23 +08:00
parent 7a7b3d7126
commit d28525526a
1300 changed files with 513579 additions and 5426 deletions

View File

@@ -0,0 +1,29 @@
/** @odoo-module */
import { patch } from "@web/core/utils/patch";
import { PivotRenderer } from "@web/views/pivot/pivot_renderer";
const { useEffect, useRef } = owl;
patch(PivotRenderer.prototype, "web_enterprise.PivotRendererMobile", {
setup() {
this._super();
this.root = useRef("root");
if (this.env.isSmall) {
useEffect(() => {
const tooltipElems = this.root.el.querySelectorAll("*[data-tooltip]");
for (const el of tooltipElems) {
el.removeAttribute("data-tooltip");
el.removeAttribute("data-tooltip-position");
}
});
}
},
getPadding(cell) {
if (this.env.isSmall) {
return 5 + cell.indent * 5;
}
return this._super(...arguments);
},
});

View File

@@ -0,0 +1,27 @@
@include media-breakpoint-down(md) {
.o_pivot {
height: 100%;
.dropdown.show {
> .dropdown-toggle::after {
@include o-caret-down;
}
}
th > .o_group_by_menu > .dropdown-menu {
.dropdown-item {
// caret centered vertically
.dropdown-toggle::after{
top: 12px;
}
// nested dropdown should be *under* the parent, not on its side
.dropdown-menu {
top: initial !important;
left: 5% !important;
width: 95%;
}
}
}
}
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<templates xml:space="preserve">
<t t-inherit="web.PivotRenderer" t-inherit-mode="extension">
<xpath expr="//div[hasclass('o_pivot')]" position="attributes">
<attribute name="t-ref">root</attribute>
</xpath>
</t>
</templates>