@gisce/react-ooui 1.4.13-rc.0 → 1.4.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react-ooui.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import Xe, { useContext as Y, useState as I, useEffect as
|
|
2
|
-
import { Tooltip as ht, theme as
|
|
3
|
-
import { Label as At, Field as Dn, Tree as Lr, Reference as hi, Selection as Nn, Many2one as Nr, Boolean as pi, Container as gi, parseContext as wt, Form as Pr, Integer as Vn, SearchFieldTypes as ft, SearchFilter as yi, parseContextFields as Sn, parseDomainFields as cr, transformDomainForChildWidget as
|
|
1
|
+
import Xe, { useContext as Y, useState as I, useEffect as ge, useRef as fe, useCallback as Le, forwardRef as bt, useImperativeHandle as xt } from "react";
|
|
2
|
+
import { Tooltip as ht, theme as Be, Typography as an, Form as st, Row as Ce, Col as ce, Modal as qe, Button as _e, Dropdown as Kt, Menu as He, Spin as Me, Divider as ln, Space as Ye, Input as nt, Select as Ct, Checkbox as Bt, Alert as Qe, Timeline as sr, Statistic as oi, Card as ii, Tag as si, message as Cn, DatePicker as $n, TimePicker as Er, InputNumber as Ln, Progress as ai, Avatar as li, Badge as ci, Pagination as di, Tabs as $r, Popover as ui, Radio as ar, Switch as fi, Steps as lr, Layout as mi } from "antd";
|
|
3
|
+
import { Label as At, Field as Dn, Tree as Lr, Reference as hi, Selection as Nn, Many2one as Nr, Boolean as pi, Container as gi, parseContext as wt, Form as Pr, Integer as Vn, SearchFieldTypes as ft, SearchFilter as yi, parseContextFields as Sn, parseDomainFields as cr, transformDomainForChildWidget as Br, graphProcessor as Hr, parseGraph as Pn, graphFieldUtils as vi } from "@gisce/ooui";
|
|
4
4
|
import * as dr from "@ant-design/icons";
|
|
5
|
-
import jr, { QuestionCircleOutlined as Kr, ExclamationCircleOutlined as pt, LoadingOutlined as
|
|
5
|
+
import jr, { QuestionCircleOutlined as Kr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as Rt, WarningOutlined as Yr, CloseOutlined as Yt, CheckOutlined as kt, TranslationOutlined as Wr, FolderOpenOutlined as Bn, DownloadOutlined as Hn, ClearOutlined as jn, StarFilled as Ur, StarOutlined as Gr, UpOutlined as wi, SearchOutlined as Kn, RightCircleOutlined as bi, ThunderboltOutlined as Yn, PrinterOutlined as Wn, EnterOutlined as qr, PlusSquareOutlined as xi, MinusSquareOutlined as Ci, FileAddOutlined as cn, AlignLeftOutlined as Si, ApiOutlined as Ti, DeleteOutlined as Un, LeftOutlined as zr, RightOutlined as Jr, EyeOutlined as Fi, FormOutlined as Ht, TableOutlined as Gn, AreaChartOutlined as Oi, CalendarOutlined as Ii, LinkOutlined as Zr, SaveOutlined as _i, CopyOutlined as qn, InfoCircleOutlined as Xr, ReloadOutlined as dn, EditOutlined as Qr, FilterOutlined as eo, CloseCircleFilled as Di, BorderOuterOutlined as Vi, SettingOutlined as Ai, ExportOutlined as Ri } from "@ant-design/icons";
|
|
6
6
|
import { Interweave as zn } from "interweave";
|
|
7
7
|
import { jsxs as P, jsx as n, Fragment as ne } from "react/jsx-runtime";
|
|
8
8
|
import * as ur from "@tabler/icons-react";
|
|
@@ -14,8 +14,8 @@ import { Line as Mi, Column as Ei, Pie as $i } from "@ant-design/plots";
|
|
|
14
14
|
import St from "use-deep-compare-effect";
|
|
15
15
|
import { Table as Li } from "@gisce/react-formiga-table";
|
|
16
16
|
import { fileTypeFromBuffer as Ni } from "file-type-buffer-browser";
|
|
17
|
-
import { isPresetStatusColor as Pi, isPresetColor as
|
|
18
|
-
import { GridUi as
|
|
17
|
+
import { isPresetStatusColor as Pi, isPresetColor as Bi } from "antd/lib/_util/colors";
|
|
18
|
+
import { GridUi as Hi } from "@gisce/fiber-diagram";
|
|
19
19
|
import { FieldSet as ji, ExportModal as Ki } from "@gisce/react-formiga-components";
|
|
20
20
|
import Yi from "validator/lib/isURL";
|
|
21
21
|
import Wi from "validator/lib/isEmail";
|
|
@@ -30,7 +30,7 @@ const {
|
|
|
30
30
|
Title: Xi
|
|
31
31
|
} = an, {
|
|
32
32
|
useToken: Qi
|
|
33
|
-
} =
|
|
33
|
+
} = Be, es = {
|
|
34
34
|
left: "justify-start",
|
|
35
35
|
center: "justify-center",
|
|
36
36
|
right: "justify-end"
|
|
@@ -622,7 +622,7 @@ const no = (e) => {
|
|
|
622
622
|
}
|
|
623
623
|
function v() {
|
|
624
624
|
if (m)
|
|
625
|
-
return /* @__PURE__ */ n(
|
|
625
|
+
return /* @__PURE__ */ n(rt, {});
|
|
626
626
|
if (l) {
|
|
627
627
|
const O = at(l);
|
|
628
628
|
return O && /* @__PURE__ */ n(O, {});
|
|
@@ -668,7 +668,7 @@ const no = (e) => {
|
|
|
668
668
|
} = Y(we);
|
|
669
669
|
function V() {
|
|
670
670
|
if (g)
|
|
671
|
-
return /* @__PURE__ */ n(
|
|
671
|
+
return /* @__PURE__ */ n(rt, {});
|
|
672
672
|
if (d) {
|
|
673
673
|
const D = at(d);
|
|
674
674
|
return D && /* @__PURE__ */ n(D, {});
|
|
@@ -760,13 +760,13 @@ const no = (e) => {
|
|
|
760
760
|
}
|
|
761
761
|
function V() {
|
|
762
762
|
if (h)
|
|
763
|
-
return /* @__PURE__ */ n(
|
|
763
|
+
return /* @__PURE__ */ n(rt, {});
|
|
764
764
|
if (c) {
|
|
765
765
|
const b = at(c);
|
|
766
766
|
return b && /* @__PURE__ */ n(b, {});
|
|
767
767
|
}
|
|
768
768
|
}
|
|
769
|
-
return /* @__PURE__ */ n(
|
|
769
|
+
return /* @__PURE__ */ n(He.Item, {
|
|
770
770
|
disabled: !u || y,
|
|
771
771
|
onClick: O,
|
|
772
772
|
icon: V(),
|
|
@@ -774,7 +774,7 @@ const no = (e) => {
|
|
|
774
774
|
children: l
|
|
775
775
|
});
|
|
776
776
|
});
|
|
777
|
-
return /* @__PURE__ */ n(
|
|
777
|
+
return /* @__PURE__ */ n(He, {
|
|
778
778
|
children: o
|
|
779
779
|
});
|
|
780
780
|
}, us = 0.7;
|
|
@@ -789,7 +789,7 @@ function fn() {
|
|
|
789
789
|
const [e, t] = I(
|
|
790
790
|
hr()
|
|
791
791
|
);
|
|
792
|
-
return
|
|
792
|
+
return ge(() => {
|
|
793
793
|
function r() {
|
|
794
794
|
t(hr());
|
|
795
795
|
}
|
|
@@ -801,14 +801,14 @@ function fn() {
|
|
|
801
801
|
height: e.height
|
|
802
802
|
};
|
|
803
803
|
}
|
|
804
|
-
class
|
|
804
|
+
class B {
|
|
805
805
|
static init(t) {
|
|
806
|
-
|
|
806
|
+
B.handler = t;
|
|
807
807
|
}
|
|
808
808
|
static getHandler() {
|
|
809
|
-
if (!
|
|
809
|
+
if (!B.handler)
|
|
810
810
|
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
811
|
-
return
|
|
811
|
+
return B.handler;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
814
814
|
const ro = (e) => {
|
|
@@ -857,7 +857,7 @@ const ro = (e) => {
|
|
|
857
857
|
} = fn(), {
|
|
858
858
|
t: u
|
|
859
859
|
} = Y(we), [d, f] = I([]), [c, m] = I(!1), [y, p] = I(!1), [h, g] = I({}), v = fe();
|
|
860
|
-
|
|
860
|
+
ge(() => {
|
|
861
861
|
t ? O() : g({});
|
|
862
862
|
}, [t]);
|
|
863
863
|
async function O() {
|
|
@@ -871,7 +871,7 @@ const ro = (e) => {
|
|
|
871
871
|
m(!1);
|
|
872
872
|
}
|
|
873
873
|
async function V() {
|
|
874
|
-
const C = (await
|
|
874
|
+
const C = (await B.getHandler().search({
|
|
875
875
|
params: [["translatable", "=", "1"]],
|
|
876
876
|
fields: ["code", "name"],
|
|
877
877
|
model: "res.lang"
|
|
@@ -884,7 +884,7 @@ const ro = (e) => {
|
|
|
884
884
|
async function b(x) {
|
|
885
885
|
const C = {};
|
|
886
886
|
for (const w of x) {
|
|
887
|
-
const T = (await
|
|
887
|
+
const T = (await B.getHandler().readObjects({
|
|
888
888
|
model: i,
|
|
889
889
|
ids: [o],
|
|
890
890
|
fieldsToRetrieve: [s],
|
|
@@ -927,7 +927,7 @@ const ro = (e) => {
|
|
|
927
927
|
p(!0);
|
|
928
928
|
try {
|
|
929
929
|
for (const x of Object.keys(h))
|
|
930
|
-
h[x] !== v.current[x] && await
|
|
930
|
+
h[x] !== v.current[x] && await B.getHandler().update({
|
|
931
931
|
model: i,
|
|
932
932
|
id: o,
|
|
933
933
|
values: {
|
|
@@ -954,7 +954,7 @@ const ro = (e) => {
|
|
|
954
954
|
disabled: y,
|
|
955
955
|
children: u("cancel")
|
|
956
956
|
}), /* @__PURE__ */ n(_e, {
|
|
957
|
-
icon: y ? /* @__PURE__ */ n(
|
|
957
|
+
icon: y ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(kt, {}),
|
|
958
958
|
disabled: y,
|
|
959
959
|
onClick: D,
|
|
960
960
|
style: {
|
|
@@ -1002,7 +1002,7 @@ const {
|
|
|
1002
1002
|
});
|
|
1003
1003
|
}, {
|
|
1004
1004
|
useToken: ps
|
|
1005
|
-
} =
|
|
1005
|
+
} = Be, io = (e) => {
|
|
1006
1006
|
const {
|
|
1007
1007
|
ooui: t,
|
|
1008
1008
|
isSearchField: r = !1
|
|
@@ -1019,14 +1019,14 @@ const {
|
|
|
1019
1019
|
} : void 0, f = Y(Ne), {
|
|
1020
1020
|
elementHasLostFocus: c
|
|
1021
1021
|
} = f || {};
|
|
1022
|
-
let m = /* @__PURE__ */ n(
|
|
1022
|
+
let m = /* @__PURE__ */ n(nt, {
|
|
1023
1023
|
disabled: o || l && !r,
|
|
1024
1024
|
id: i,
|
|
1025
1025
|
style: d,
|
|
1026
1026
|
maxLength: t.size,
|
|
1027
1027
|
onBlur: c
|
|
1028
1028
|
});
|
|
1029
|
-
return s && (m = /* @__PURE__ */ n(
|
|
1029
|
+
return s && (m = /* @__PURE__ */ n(nt.Password, {
|
|
1030
1030
|
disabled: o,
|
|
1031
1031
|
id: i,
|
|
1032
1032
|
onBlur: c
|
|
@@ -1062,7 +1062,7 @@ const {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
f || c(!0);
|
|
1064
1064
|
},
|
|
1065
|
-
children: /* @__PURE__ */ n(
|
|
1065
|
+
children: /* @__PURE__ */ n(nt, {
|
|
1066
1066
|
value: e,
|
|
1067
1067
|
disabled: !0,
|
|
1068
1068
|
id: t,
|
|
@@ -1094,7 +1094,7 @@ const {
|
|
|
1094
1094
|
wrap: !1,
|
|
1095
1095
|
children: [/* @__PURE__ */ n(ce, {
|
|
1096
1096
|
flex: "auto",
|
|
1097
|
-
children: /* @__PURE__ */ n(
|
|
1097
|
+
children: /* @__PURE__ */ n(nt, {
|
|
1098
1098
|
value: e,
|
|
1099
1099
|
id: t,
|
|
1100
1100
|
style: r,
|
|
@@ -1119,7 +1119,7 @@ const {
|
|
|
1119
1119
|
}, {
|
|
1120
1120
|
defaultAlgorithm: ys,
|
|
1121
1121
|
defaultSeed: vs
|
|
1122
|
-
} =
|
|
1122
|
+
} = Be, ws = ys(vs), {
|
|
1123
1123
|
Option: bs
|
|
1124
1124
|
} = Ct, so = (e) => {
|
|
1125
1125
|
const {
|
|
@@ -1167,7 +1167,7 @@ const {
|
|
|
1167
1167
|
`, {
|
|
1168
1168
|
defaultAlgorithm: Cs,
|
|
1169
1169
|
defaultSeed: Ss
|
|
1170
|
-
} =
|
|
1170
|
+
} = Be, pr = Cs(Ss), Ts = (e) => {
|
|
1171
1171
|
const {
|
|
1172
1172
|
ooui: t
|
|
1173
1173
|
} = e, {
|
|
@@ -1192,12 +1192,12 @@ const {
|
|
|
1192
1192
|
} = e;
|
|
1193
1193
|
return /* @__PURE__ */ n("div", {
|
|
1194
1194
|
className: "flex flex-row",
|
|
1195
|
-
children: /* @__PURE__ */ n(t && !r ? Os :
|
|
1195
|
+
children: /* @__PURE__ */ n(t && !r ? Os : Bt, {
|
|
1196
1196
|
disabled: r,
|
|
1197
1197
|
...i
|
|
1198
1198
|
})
|
|
1199
1199
|
});
|
|
1200
|
-
}, Os = Wt(
|
|
1200
|
+
}, Os = Wt(Bt)`
|
|
1201
1201
|
.ant-checkbox-inner {
|
|
1202
1202
|
background-color: ${pr.colorPrimaryBg};
|
|
1203
1203
|
}
|
|
@@ -1219,11 +1219,11 @@ function Ls(e) {
|
|
|
1219
1219
|
;
|
|
1220
1220
|
return t;
|
|
1221
1221
|
}
|
|
1222
|
-
var Ns = Ls, Ps = Ns,
|
|
1223
|
-
function
|
|
1224
|
-
return e && e.slice(0, Ps(e) + 1).replace(
|
|
1222
|
+
var Ns = Ls, Ps = Ns, Bs = /^\s+/;
|
|
1223
|
+
function Hs(e) {
|
|
1224
|
+
return e && e.slice(0, Ps(e) + 1).replace(Bs, "");
|
|
1225
1225
|
}
|
|
1226
|
-
var js =
|
|
1226
|
+
var js = Hs, Ks = co, Ys = Ks.Symbol, uo = Ys, gr = uo, fo = Object.prototype, Ws = fo.hasOwnProperty, Us = fo.toString, Nt = gr ? gr.toStringTag : void 0;
|
|
1227
1227
|
function Gs(e) {
|
|
1228
1228
|
var t = Ws.call(e, Nt), r = e[Nt];
|
|
1229
1229
|
try {
|
|
@@ -1404,7 +1404,7 @@ const Ia = (e) => {
|
|
|
1404
1404
|
children: /* @__PURE__ */ P(Ye, {
|
|
1405
1405
|
children: [/* @__PURE__ */ n(Je, {
|
|
1406
1406
|
tooltip: a("uploadNewImage"),
|
|
1407
|
-
icon: /* @__PURE__ */ n(
|
|
1407
|
+
icon: /* @__PURE__ */ n(Bn, {}),
|
|
1408
1408
|
disabled: o,
|
|
1409
1409
|
onClick: () => {
|
|
1410
1410
|
s.current.click();
|
|
@@ -1413,7 +1413,7 @@ const Ia = (e) => {
|
|
|
1413
1413
|
tooltip: a("download"),
|
|
1414
1414
|
disabled: !r,
|
|
1415
1415
|
onClick: u,
|
|
1416
|
-
icon: /* @__PURE__ */ n(
|
|
1416
|
+
icon: /* @__PURE__ */ n(Hn, {})
|
|
1417
1417
|
}), /* @__PURE__ */ n(Je, {
|
|
1418
1418
|
tooltip: a("clear"),
|
|
1419
1419
|
disabled: o || !r,
|
|
@@ -1446,7 +1446,7 @@ const Ia = (e) => {
|
|
|
1446
1446
|
} catch (i) {
|
|
1447
1447
|
return console.log(i), null;
|
|
1448
1448
|
}
|
|
1449
|
-
return /* @__PURE__ */ n(
|
|
1449
|
+
return /* @__PURE__ */ n(Hi, {
|
|
1450
1450
|
inputJson: t,
|
|
1451
1451
|
onChange: (i) => {
|
|
1452
1452
|
r && r(i);
|
|
@@ -1535,7 +1535,7 @@ const Zn = async (e) => {
|
|
|
1535
1535
|
};
|
|
1536
1536
|
let f = [], c;
|
|
1537
1537
|
if (a === "tree" && (o == null ? void 0 : o.arch)) {
|
|
1538
|
-
const h = (p = It(o)) == null ? void 0 : p.colors, g = await
|
|
1538
|
+
const h = (p = It(o)) == null ? void 0 : p.colors, g = await B.getHandler().readEvalUiObjects({
|
|
1539
1539
|
model: r,
|
|
1540
1540
|
ids: u,
|
|
1541
1541
|
arch: o == null ? void 0 : o.arch,
|
|
@@ -1547,7 +1547,7 @@ const Zn = async (e) => {
|
|
|
1547
1547
|
});
|
|
1548
1548
|
f = g[0], c = Qt(g[1]);
|
|
1549
1549
|
} else
|
|
1550
|
-
f = await
|
|
1550
|
+
f = await B.getHandler().readObjects({
|
|
1551
1551
|
model: r,
|
|
1552
1552
|
ids: u,
|
|
1553
1553
|
fields: d[a],
|
|
@@ -1594,7 +1594,7 @@ const Zn = async (e) => {
|
|
|
1594
1594
|
St(() => {
|
|
1595
1595
|
p();
|
|
1596
1596
|
}, [t]);
|
|
1597
|
-
const y = async (h) => o && o[h] ? o[h] : await
|
|
1597
|
+
const y = async (h) => o && o[h] ? o[h] : await B.getHandler().getView({
|
|
1598
1598
|
model: r,
|
|
1599
1599
|
type: h,
|
|
1600
1600
|
context: {
|
|
@@ -1737,7 +1737,7 @@ const Zn = async (e) => {
|
|
|
1737
1737
|
});
|
|
1738
1738
|
}, {
|
|
1739
1739
|
useToken: La
|
|
1740
|
-
} =
|
|
1740
|
+
} = Be, Na = (e) => {
|
|
1741
1741
|
const {
|
|
1742
1742
|
ooui: t
|
|
1743
1743
|
} = e;
|
|
@@ -1777,7 +1777,7 @@ const Zn = async (e) => {
|
|
|
1777
1777
|
return r.card ? /* @__PURE__ */ n(ii, {
|
|
1778
1778
|
children: l
|
|
1779
1779
|
}) : l;
|
|
1780
|
-
},
|
|
1780
|
+
}, Ba = (e, t) => {
|
|
1781
1781
|
if (!t)
|
|
1782
1782
|
return e;
|
|
1783
1783
|
const r = {};
|
|
@@ -1791,7 +1791,7 @@ const Zn = async (e) => {
|
|
|
1791
1791
|
} else
|
|
1792
1792
|
r[i] = e[i];
|
|
1793
1793
|
}), r;
|
|
1794
|
-
}, Ot = (e, t) =>
|
|
1794
|
+
}, Ot = (e, t) => Ba(e, t), Fn = ({
|
|
1795
1795
|
source: e,
|
|
1796
1796
|
target: t,
|
|
1797
1797
|
fields: r
|
|
@@ -1824,7 +1824,7 @@ const Zn = async (e) => {
|
|
|
1824
1824
|
else
|
|
1825
1825
|
e[o] !== t[o] && (t[o] === void 0 ? i[o] = null : i[o] = t[o]);
|
|
1826
1826
|
}), i;
|
|
1827
|
-
},
|
|
1827
|
+
}, Ha = ({
|
|
1828
1828
|
changedFields: e,
|
|
1829
1829
|
formOoui: t,
|
|
1830
1830
|
types: r
|
|
@@ -1928,7 +1928,7 @@ const Mt = ({
|
|
|
1928
1928
|
let {
|
|
1929
1929
|
color: t
|
|
1930
1930
|
} = e, r = {};
|
|
1931
|
-
return !Pi(e.color) && !
|
|
1931
|
+
return !Pi(e.color) && !Bi(e.color) && (r = {
|
|
1932
1932
|
color: t,
|
|
1933
1933
|
borderColor: t,
|
|
1934
1934
|
borderStyle: "solid",
|
|
@@ -1978,7 +1978,7 @@ const Mt = ({
|
|
|
1978
1978
|
let D = [];
|
|
1979
1979
|
try {
|
|
1980
1980
|
if (p && (D = [["id", "in", s]]), r.domain) {
|
|
1981
|
-
const C = await
|
|
1981
|
+
const C = await B.getHandler().evalDomain({
|
|
1982
1982
|
domain: r.domain,
|
|
1983
1983
|
values: Mt({
|
|
1984
1984
|
fields: g == null ? void 0 : g.getFields(),
|
|
@@ -1989,7 +1989,7 @@ const Mt = ({
|
|
|
1989
1989
|
});
|
|
1990
1990
|
D = [...D, ...C];
|
|
1991
1991
|
}
|
|
1992
|
-
const x = (await
|
|
1992
|
+
const x = (await B.getHandler().search({
|
|
1993
1993
|
model: m,
|
|
1994
1994
|
params: D,
|
|
1995
1995
|
fields: [h],
|
|
@@ -2109,7 +2109,7 @@ const Mt = ({
|
|
|
2109
2109
|
case "one2many":
|
|
2110
2110
|
case "one2many_list":
|
|
2111
2111
|
case "many2many":
|
|
2112
|
-
return
|
|
2112
|
+
return Hc;
|
|
2113
2113
|
case "separator":
|
|
2114
2114
|
return Jc;
|
|
2115
2115
|
case "reference":
|
|
@@ -2387,20 +2387,20 @@ const Mt = ({
|
|
|
2387
2387
|
setLimit: A,
|
|
2388
2388
|
searchParams: D = [],
|
|
2389
2389
|
setSearchValues: E
|
|
2390
|
-
} = e, [x, C] = I(!1), [w, T] = I(!1), [$, M] = I(), [S, R] = I(1), [k, _] = I(0), [N, F] = I(), [j, q] = I([]), [U, J] = I(void 0), [W, L] = I(void 0),
|
|
2390
|
+
} = e, [x, C] = I(!1), [w, T] = I(!1), [$, M] = I(), [S, R] = I(1), [k, _] = I(0), [N, F] = I(), [j, q] = I([]), [U, J] = I(void 0), [W, L] = I(void 0), H = fe(b || jt), te = fe([]), Z = Le((ie) => {
|
|
2391
2391
|
g == null || g([...ie]), q([...ie]);
|
|
2392
2392
|
}, []), ae = Le(() => v || j, [v, j]), X = Le(async () => {
|
|
2393
|
-
const ie = await
|
|
2393
|
+
const ie = await B.getHandler().nameSearch({
|
|
2394
2394
|
model: t,
|
|
2395
2395
|
payload: l,
|
|
2396
|
-
limit:
|
|
2396
|
+
limit: H.current,
|
|
2397
2397
|
attrs: O,
|
|
2398
2398
|
context: d
|
|
2399
2399
|
});
|
|
2400
2400
|
if (F(ie.length), f == null || f(ie.length), ie.length > 0) {
|
|
2401
2401
|
const de = ie.map((ke) => ke == null ? void 0 : ke[0]), { colors: je, status: be } = It(c), Re = {};
|
|
2402
2402
|
je && (Re.colors = je), be && (Re.status = be);
|
|
2403
|
-
const Ze = await
|
|
2403
|
+
const Ze = await B.getHandler().readEvalUiObjects({
|
|
2404
2404
|
model: t,
|
|
2405
2405
|
ids: de,
|
|
2406
2406
|
arch: c == null ? void 0 : c.arch,
|
|
@@ -2434,9 +2434,9 @@ const Mt = ({
|
|
|
2434
2434
|
async (ie) => {
|
|
2435
2435
|
const { params: de, newOffset: je } = ie || {}, be = hn(de || D, O), { colors: Re, status: Ze } = It(c), ee = {};
|
|
2436
2436
|
Re && (ee.colors = Re), Ze && (ee.status = Ze);
|
|
2437
|
-
const { totalItems: De, results: Ae, attrsEvaluated: ke } = await
|
|
2437
|
+
const { totalItems: De, results: Ae, attrsEvaluated: ke } = await B.getHandler().searchForTree({
|
|
2438
2438
|
params: be,
|
|
2439
|
-
limit:
|
|
2439
|
+
limit: H.current,
|
|
2440
2440
|
offset: je || k,
|
|
2441
2441
|
model: t,
|
|
2442
2442
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
@@ -2523,7 +2523,7 @@ const Mt = ({
|
|
|
2523
2523
|
), $e = Le(
|
|
2524
2524
|
(ie) => {
|
|
2525
2525
|
const { params: de, searchValues: je, limit: be, offset: Re } = ie;
|
|
2526
|
-
x || (r == null || r(void 0), i == null || i([]), E == null || E(je), o == null || o(de), s == null || s(!1), T(!0), M(void 0), R(1), be && (
|
|
2526
|
+
x || (r == null || r(void 0), i == null || i([]), E == null || E(je), o == null || o(de), s == null || s(!1), T(!0), M(void 0), R(1), be && (H.current = be, A == null || A(be)), Re && _(Re), he({
|
|
2527
2527
|
params: de,
|
|
2528
2528
|
newOffset: Re
|
|
2529
2529
|
}));
|
|
@@ -2559,7 +2559,7 @@ const Mt = ({
|
|
|
2559
2559
|
b
|
|
2560
2560
|
]), We = Le(
|
|
2561
2561
|
async (ie) => {
|
|
2562
|
-
const de = ie[(c == null ? void 0 : c.field_parent) || "child_id"], je = await
|
|
2562
|
+
const de = ie[(c == null ? void 0 : c.field_parent) || "child_id"], je = await B.getHandler().readObjects({
|
|
2563
2563
|
model: t,
|
|
2564
2564
|
ids: de,
|
|
2565
2565
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
@@ -2587,7 +2587,7 @@ const Mt = ({
|
|
|
2587
2587
|
statusForResults: W,
|
|
2588
2588
|
totalItems: N
|
|
2589
2589
|
};
|
|
2590
|
-
},
|
|
2590
|
+
}, tt = Xe.createContext(null), gl = (e) => {
|
|
2591
2591
|
const {
|
|
2592
2592
|
children: t,
|
|
2593
2593
|
currentView: r,
|
|
@@ -2614,21 +2614,21 @@ const Mt = ({
|
|
|
2614
2614
|
setSearchTreeNameSearch: E,
|
|
2615
2615
|
goToResourceId: x,
|
|
2616
2616
|
limit: C
|
|
2617
|
-
} = e, [w, T] = I(!1), [$, M] = I(!1), [S, R] = I(!1), [k, _] = I(!0), [N, F] = I(!0), [j, q] = I([]), [U, J] = I(!1), [W, L] = I([]), [
|
|
2618
|
-
|
|
2617
|
+
} = e, [w, T] = I(!1), [$, M] = I(!1), [S, R] = I(!1), [k, _] = I(!0), [N, F] = I(!0), [j, q] = I([]), [U, J] = I(!1), [W, L] = I([]), [H, te] = I(!1), [Z, ae] = I(!0), [X, z] = I(), [he, xe] = I({}), [$e, Ve] = I(C !== void 0 ? C : jt), [Pe, We] = I(i);
|
|
2618
|
+
ge(() => {
|
|
2619
2619
|
m && m.length > 0 && !y && (p == null || p(0), f == null || f(m[0].id));
|
|
2620
|
-
}, [m]),
|
|
2620
|
+
}, [m]), ge(() => {
|
|
2621
2621
|
Ve(C !== void 0 ? C : jt);
|
|
2622
|
-
}, [C]),
|
|
2622
|
+
}, [C]), ge(() => {
|
|
2623
2623
|
s.length === 1 ? z(s[0]) : s.length > 1 && z(s.filter((de) => de.view_id !== r.view_id)[0]);
|
|
2624
|
-
}, [s]),
|
|
2624
|
+
}, [s]), ge(() => {
|
|
2625
2625
|
(X == null ? void 0 : X.view_id) === r.view_id && s.length > 1 && z(s.filter((de) => de.view_id !== r.view_id)[0]);
|
|
2626
2626
|
}, [r]);
|
|
2627
2627
|
const ie = async () => {
|
|
2628
2628
|
var de;
|
|
2629
2629
|
return await ((de = a.current) == null ? void 0 : de.submitForm());
|
|
2630
2630
|
};
|
|
2631
|
-
return /* @__PURE__ */ n(
|
|
2631
|
+
return /* @__PURE__ */ n(tt.Provider, {
|
|
2632
2632
|
value: {
|
|
2633
2633
|
title: Pe,
|
|
2634
2634
|
currentView: r,
|
|
@@ -2663,7 +2663,7 @@ const Mt = ({
|
|
|
2663
2663
|
setDuplicatingItem: J,
|
|
2664
2664
|
setSearchParams: L,
|
|
2665
2665
|
searchParams: W,
|
|
2666
|
-
searchVisible:
|
|
2666
|
+
searchVisible: H,
|
|
2667
2667
|
setSearchVisible: te,
|
|
2668
2668
|
sorter: g,
|
|
2669
2669
|
setSorter: v,
|
|
@@ -2759,7 +2759,7 @@ const Mt = ({
|
|
|
2759
2759
|
values: w
|
|
2760
2760
|
}) : $;
|
|
2761
2761
|
try {
|
|
2762
|
-
const j = await
|
|
2762
|
+
const j = await B.getHandler().createReport({
|
|
2763
2763
|
model: M,
|
|
2764
2764
|
name: R,
|
|
2765
2765
|
datas: S,
|
|
@@ -2779,7 +2779,7 @@ const Mt = ({
|
|
|
2779
2779
|
async function v(E) {
|
|
2780
2780
|
let x;
|
|
2781
2781
|
try {
|
|
2782
|
-
if (x = await
|
|
2782
|
+
if (x = await B.getHandler().getReport({
|
|
2783
2783
|
id: E
|
|
2784
2784
|
}), x.state && s.current === !0) {
|
|
2785
2785
|
s.current = !1, clearInterval(o.current), l(!1);
|
|
@@ -2830,7 +2830,7 @@ const Mt = ({
|
|
|
2830
2830
|
}) {
|
|
2831
2831
|
var R;
|
|
2832
2832
|
let T = E;
|
|
2833
|
-
E.res_model || (T = (await
|
|
2833
|
+
E.res_model || (T = (await B.getHandler().readObjects({
|
|
2834
2834
|
model: "ir.actions.act_window",
|
|
2835
2835
|
ids: [parseInt(E.id)],
|
|
2836
2836
|
context: w
|
|
@@ -2847,7 +2847,7 @@ const Mt = ({
|
|
|
2847
2847
|
...$
|
|
2848
2848
|
};
|
|
2849
2849
|
let S = [];
|
|
2850
|
-
if (T.domain && (S = await
|
|
2850
|
+
if (T.domain && (S = await B.getHandler().evalDomain({
|
|
2851
2851
|
domain: T.domain,
|
|
2852
2852
|
values: Mt({
|
|
2853
2853
|
fields: x,
|
|
@@ -2859,7 +2859,7 @@ const Mt = ({
|
|
|
2859
2859
|
fields: x,
|
|
2860
2860
|
context: M
|
|
2861
2861
|
})), T.target === "new") {
|
|
2862
|
-
const k = await
|
|
2862
|
+
const k = await B.getHandler().getView({
|
|
2863
2863
|
model: T.res_model,
|
|
2864
2864
|
type: "form",
|
|
2865
2865
|
id: ((R = T == null ? void 0 : T.view_id) == null ? void 0 : R[0]) || void 0,
|
|
@@ -2998,7 +2998,7 @@ async function wl({
|
|
|
2998
2998
|
let a;
|
|
2999
2999
|
if (e)
|
|
3000
3000
|
for (const l of e) {
|
|
3001
|
-
const u = await
|
|
3001
|
+
const u = await B.getHandler().getView({
|
|
3002
3002
|
model: r,
|
|
3003
3003
|
type: l[1],
|
|
3004
3004
|
id: l[0],
|
|
@@ -3009,7 +3009,7 @@ async function wl({
|
|
|
3009
3009
|
else {
|
|
3010
3010
|
const l = t.split(",");
|
|
3011
3011
|
for (const u of l) {
|
|
3012
|
-
const d = await
|
|
3012
|
+
const d = await B.getHandler().getView({
|
|
3013
3013
|
model: r,
|
|
3014
3014
|
type: u,
|
|
3015
3015
|
context: i
|
|
@@ -3092,10 +3092,10 @@ function Sl(e, t) {
|
|
|
3092
3092
|
} = e, {
|
|
3093
3093
|
t: x,
|
|
3094
3094
|
lang: C
|
|
3095
|
-
} = Y(we), [w, T] = I(!1), [$, M] = I(), [S, R] = I(), [k] = st.useForm(), [_, N] = I(), [F, j] = I(), q = Y(wo), [U, J] = I(), [W, L] = I(!1),
|
|
3095
|
+
} = Y(we), [w, T] = I(!1), [$, M] = I(), [S, R] = I(), [k] = st.useForm(), [_, N] = I(), [F, j] = I(), q = Y(wo), [U, J] = I(), [W, L] = I(!1), H = fe(), te = fe({}), Z = fe({}), ae = fe(!1), X = fe(!1), z = fe(!1), xe = (E !== void 0 ? E : U) < Cl, $e = Y(Ne), {
|
|
3096
3096
|
activeId: Ve,
|
|
3097
3097
|
getPlainValues: Pe
|
|
3098
|
-
} = $e || {}, We = Y(
|
|
3098
|
+
} = $e || {}, We = Y(tt), {
|
|
3099
3099
|
setFormIsSaving: ie = void 0,
|
|
3100
3100
|
setFormHasChanges: de = void 0,
|
|
3101
3101
|
setCurrentId: je = void 0,
|
|
@@ -3109,24 +3109,24 @@ function Sl(e, t) {
|
|
|
3109
3109
|
} = De || {};
|
|
3110
3110
|
xt(t, () => ({
|
|
3111
3111
|
submitForm: Jt,
|
|
3112
|
-
getFields:
|
|
3112
|
+
getFields: ot,
|
|
3113
3113
|
getValues: Ke,
|
|
3114
3114
|
getPlainValues: Q,
|
|
3115
3115
|
getContext: Se,
|
|
3116
3116
|
fetchValues: yt,
|
|
3117
3117
|
cancelUnsavedChanges: rr,
|
|
3118
3118
|
clearAndReload: () => {
|
|
3119
|
-
|
|
3119
|
+
H.current = void 0, R(void 0), nr();
|
|
3120
3120
|
}
|
|
3121
|
-
})),
|
|
3121
|
+
})), ge(() => {
|
|
3122
3122
|
if (M(void 0), !(!r && !p)) {
|
|
3123
3123
|
if (!V) {
|
|
3124
|
-
|
|
3124
|
+
H.current = void 0, R(void 0);
|
|
3125
3125
|
return;
|
|
3126
3126
|
}
|
|
3127
|
-
(i === void 0 && F || i !== void 0 && F && i < 0) && (
|
|
3127
|
+
(i === void 0 && F || i !== void 0 && F && i < 0) && (H.current = void 0, R(void 0)), nr();
|
|
3128
3128
|
}
|
|
3129
|
-
}, [i, r, y, p, V]),
|
|
3129
|
+
}, [i, r, y, p, V]), ge(() => {
|
|
3130
3130
|
W && (vn({
|
|
3131
3131
|
elementHasLostFocus: !0
|
|
3132
3132
|
}), L(!1));
|
|
@@ -3139,9 +3139,9 @@ function Sl(e, t) {
|
|
|
3139
3139
|
ie == null || ie(!1), d == null || d(K);
|
|
3140
3140
|
};
|
|
3141
3141
|
function ue() {
|
|
3142
|
-
return i ||
|
|
3142
|
+
return i || H.current;
|
|
3143
3143
|
}
|
|
3144
|
-
function
|
|
3144
|
+
function ot() {
|
|
3145
3145
|
return F;
|
|
3146
3146
|
}
|
|
3147
3147
|
function Ke() {
|
|
@@ -3154,11 +3154,11 @@ function Sl(e, t) {
|
|
|
3154
3154
|
return K;
|
|
3155
3155
|
}
|
|
3156
3156
|
function Q() {
|
|
3157
|
-
const K = Ke(), G =
|
|
3157
|
+
const K = Ke(), G = ot();
|
|
3158
3158
|
let re = {};
|
|
3159
3159
|
return Object.keys(K).forEach((oe) => {
|
|
3160
|
-
const
|
|
3161
|
-
G[oe] && G[oe].type === "many2one" &&
|
|
3160
|
+
const pe = K[oe];
|
|
3161
|
+
G[oe] && G[oe].type === "many2one" && pe && Array.isArray(pe) && pe.length === 2 ? re[oe] = pe[0] : G[oe] && (G[oe].type === "one2many" || G[oe].type === "many2many") && pe && pe.items ? re[oe] = pe.items.filter((et) => et.operation !== "pendingRemove").map((et) => et.id) : re[oe] = pe;
|
|
3162
3162
|
}), re;
|
|
3163
3163
|
}
|
|
3164
3164
|
function se() {
|
|
@@ -3192,7 +3192,7 @@ function Sl(e, t) {
|
|
|
3192
3192
|
}
|
|
3193
3193
|
const Fe = async (K) => {
|
|
3194
3194
|
const G = ue() ? S == null ? void 0 : S.context : {};
|
|
3195
|
-
return await
|
|
3195
|
+
return await B.getHandler().defaultGet({
|
|
3196
3196
|
model: r,
|
|
3197
3197
|
fields: K,
|
|
3198
3198
|
context: {
|
|
@@ -3208,7 +3208,7 @@ function Sl(e, t) {
|
|
|
3208
3208
|
})).length !== 0, Ee = (K) => {
|
|
3209
3209
|
const G = k.getFieldsValue(!0);
|
|
3210
3210
|
return Ot(G, K);
|
|
3211
|
-
},
|
|
3211
|
+
}, it = (K, G) => {
|
|
3212
3212
|
$t({
|
|
3213
3213
|
values: {
|
|
3214
3214
|
...Ot(k.getFieldsValue(!0), F),
|
|
@@ -3245,10 +3245,10 @@ function Sl(e, t) {
|
|
|
3245
3245
|
M(G != null && G.message ? G.message + G.stack : G), be == null || be(!1);
|
|
3246
3246
|
}
|
|
3247
3247
|
}, yt = async (K) => {
|
|
3248
|
-
let G, re, oe,
|
|
3248
|
+
let G, re, oe, pe;
|
|
3249
3249
|
be == null || be(!0), M(void 0), K != null && K.fields ? (re = K.fields, oe = K.arch) : (re = F, oe = _), y && (K == null ? void 0 : K.forceRefresh) !== !0 ? G = y : {
|
|
3250
3250
|
values: G,
|
|
3251
|
-
defaultGetCalled:
|
|
3251
|
+
defaultGetCalled: pe
|
|
3252
3252
|
} = await Yo({
|
|
3253
3253
|
fields: re,
|
|
3254
3254
|
arch: oe
|
|
@@ -3259,12 +3259,12 @@ function Sl(e, t) {
|
|
|
3259
3259
|
values: G,
|
|
3260
3260
|
fields: re,
|
|
3261
3261
|
reset: !0,
|
|
3262
|
-
isDefaultGet:
|
|
3262
|
+
isDefaultGet: pe
|
|
3263
3263
|
}), Lt({
|
|
3264
3264
|
fields: re,
|
|
3265
3265
|
arch: oe,
|
|
3266
3266
|
values: G
|
|
3267
|
-
}), be == null || be(!1), de == null || de(!1),
|
|
3267
|
+
}), be == null || be(!1), de == null || de(!1), pe && L(!0);
|
|
3268
3268
|
}, rr = async () => new Promise(async (K) => {
|
|
3269
3269
|
Oe() ? Gt({
|
|
3270
3270
|
lang: C,
|
|
@@ -3277,13 +3277,13 @@ function Sl(e, t) {
|
|
|
3277
3277
|
}) : (me == null || me(), K(!0));
|
|
3278
3278
|
}), Ko = async () => {
|
|
3279
3279
|
if (l) {
|
|
3280
|
-
const K = await
|
|
3281
|
-
return (await
|
|
3280
|
+
const K = await B.getHandler().getActionStringForModel(r);
|
|
3281
|
+
return (await B.getHandler().getViewsForAction({
|
|
3282
3282
|
action: K,
|
|
3283
3283
|
context: v
|
|
3284
3284
|
})).views.get("form");
|
|
3285
3285
|
}
|
|
3286
|
-
return await
|
|
3286
|
+
return await B.getHandler().getView({
|
|
3287
3287
|
model: r,
|
|
3288
3288
|
type: "form",
|
|
3289
3289
|
context: v
|
|
@@ -3294,10 +3294,10 @@ function Sl(e, t) {
|
|
|
3294
3294
|
reset: re,
|
|
3295
3295
|
isDefaultGet: oe = !1
|
|
3296
3296
|
}) => {
|
|
3297
|
-
const
|
|
3297
|
+
const et = {
|
|
3298
3298
|
...re ? {} : k.getFieldsValue(!0),
|
|
3299
3299
|
...K
|
|
3300
|
-
}, bn = Ot(
|
|
3300
|
+
}, bn = Ot(et, G), ni = Object.keys(G).map((xn) => {
|
|
3301
3301
|
const ri = bn[xn] !== void 0 ? bn[xn] : void 0;
|
|
3302
3302
|
return {
|
|
3303
3303
|
name: xn,
|
|
@@ -3312,19 +3312,19 @@ function Sl(e, t) {
|
|
|
3312
3312
|
}) => {
|
|
3313
3313
|
let re = {}, oe = !1;
|
|
3314
3314
|
if (ue()) {
|
|
3315
|
-
re = (await
|
|
3315
|
+
re = (await B.getHandler().readObjects({
|
|
3316
3316
|
model: r,
|
|
3317
3317
|
ids: [ue()],
|
|
3318
3318
|
fields: K,
|
|
3319
3319
|
context: v
|
|
3320
3320
|
}))[0];
|
|
3321
|
-
const
|
|
3321
|
+
const pe = await B.getHandler().search({
|
|
3322
3322
|
params: [["res_model", "=", r], ["res_id", "=", ue()]],
|
|
3323
3323
|
fields: ["id", "name"],
|
|
3324
3324
|
context: Se(),
|
|
3325
3325
|
model: "ir.attachment"
|
|
3326
3326
|
});
|
|
3327
|
-
Re == null || Re(
|
|
3327
|
+
Re == null || Re(pe);
|
|
3328
3328
|
} else
|
|
3329
3329
|
Re == null || Re([]), re = await Fe(K), oe = !0;
|
|
3330
3330
|
return {
|
|
@@ -3341,7 +3341,7 @@ function Sl(e, t) {
|
|
|
3341
3341
|
target: Ee(F),
|
|
3342
3342
|
fields: F
|
|
3343
3343
|
});
|
|
3344
|
-
await
|
|
3344
|
+
await B.getHandler().update({
|
|
3345
3345
|
model: r,
|
|
3346
3346
|
id: ue(),
|
|
3347
3347
|
values: {
|
|
@@ -3355,7 +3355,7 @@ function Sl(e, t) {
|
|
|
3355
3355
|
}
|
|
3356
3356
|
}), te.current = Ee(F);
|
|
3357
3357
|
} else {
|
|
3358
|
-
const re = Ee(F), oe = await
|
|
3358
|
+
const re = Ee(F), oe = await B.getHandler().create({
|
|
3359
3359
|
model: r,
|
|
3360
3360
|
values: {
|
|
3361
3361
|
...re,
|
|
@@ -3367,7 +3367,7 @@ function Sl(e, t) {
|
|
|
3367
3367
|
...S == null ? void 0 : S.context
|
|
3368
3368
|
}
|
|
3369
3369
|
});
|
|
3370
|
-
|
|
3370
|
+
H.current = oe, te.current = re;
|
|
3371
3371
|
}
|
|
3372
3372
|
h && await h([ue()]), !g && G && (le == null || le(ue(), Ke(), se()));
|
|
3373
3373
|
}, Wo = async (K) => {
|
|
@@ -3383,7 +3383,7 @@ function Sl(e, t) {
|
|
|
3383
3383
|
if (X.current = !0, M(void 0), z.current && !Oe() && ue() && re) {
|
|
3384
3384
|
X.current = !1, de == null || de(!1), le == null || le(ue(), Ke(), se(), z.current), z.current = !1;
|
|
3385
3385
|
const oe = ue();
|
|
3386
|
-
return c && (
|
|
3386
|
+
return c && (H.current = void 0, $t({
|
|
3387
3387
|
values: {},
|
|
3388
3388
|
fields: F,
|
|
3389
3389
|
reset: !0
|
|
@@ -3404,7 +3404,7 @@ function Sl(e, t) {
|
|
|
3404
3404
|
};
|
|
3405
3405
|
T(!0), ie == null || ie(!0);
|
|
3406
3406
|
try {
|
|
3407
|
-
m === "api" ? await or(K) : await Wo(K), c && (
|
|
3407
|
+
m === "api" ? await or(K) : await Wo(K), c && (H.current = void 0, $t({
|
|
3408
3408
|
values: {},
|
|
3409
3409
|
fields: F,
|
|
3410
3410
|
reset: !0
|
|
@@ -3426,15 +3426,15 @@ function Sl(e, t) {
|
|
|
3426
3426
|
values: re,
|
|
3427
3427
|
operationInProgress: oe = !1
|
|
3428
3428
|
}) => {
|
|
3429
|
-
var
|
|
3430
|
-
const
|
|
3431
|
-
|
|
3429
|
+
var et;
|
|
3430
|
+
const pe = new Pr(K);
|
|
3431
|
+
pe.parse(G, {
|
|
3432
3432
|
readOnly: f || oe,
|
|
3433
3433
|
values: Ma({
|
|
3434
3434
|
...re,
|
|
3435
3435
|
...Te()
|
|
3436
3436
|
}, K)
|
|
3437
|
-
}), R(
|
|
3437
|
+
}), R(pe), pe.string && pe.string !== Ze && (ee == null || ee(pe.string)), q && pe.string && ((et = q.setTitle) == null || et.call(q, pe.string));
|
|
3438
3438
|
}, vn = async ({
|
|
3439
3439
|
elementHasLostFocus: K = !1
|
|
3440
3440
|
}) => {
|
|
@@ -3446,7 +3446,7 @@ function Sl(e, t) {
|
|
|
3446
3446
|
fields: F
|
|
3447
3447
|
}), re = Object.keys(G);
|
|
3448
3448
|
if (re.length !== 0) {
|
|
3449
|
-
if (
|
|
3449
|
+
if (Ha({
|
|
3450
3450
|
changedFields: re,
|
|
3451
3451
|
formOoui: S,
|
|
3452
3452
|
types: ["text", "codeeditor", "email", "url", "char", "float", "float_time", "integer", "many2one"]
|
|
@@ -3486,7 +3486,7 @@ function Sl(e, t) {
|
|
|
3486
3486
|
},
|
|
3487
3487
|
parentValues: Pe == null ? void 0 : Pe(),
|
|
3488
3488
|
onChangeFieldActionArgs: G.args
|
|
3489
|
-
}), oe = await
|
|
3489
|
+
}), oe = await B.getHandler().executeOnChange({
|
|
3490
3490
|
model: r,
|
|
3491
3491
|
action: G.method,
|
|
3492
3492
|
ids: ue() ? [ue()] : [],
|
|
@@ -3494,46 +3494,46 @@ function Sl(e, t) {
|
|
|
3494
3494
|
fields: F
|
|
3495
3495
|
});
|
|
3496
3496
|
if (oe.value) {
|
|
3497
|
-
const
|
|
3497
|
+
const pe = {
|
|
3498
3498
|
...Ee(F),
|
|
3499
3499
|
...oe.value
|
|
3500
3500
|
};
|
|
3501
3501
|
Lt({
|
|
3502
3502
|
fields: F,
|
|
3503
3503
|
arch: _,
|
|
3504
|
-
values:
|
|
3504
|
+
values: pe
|
|
3505
3505
|
}), $t({
|
|
3506
|
-
values:
|
|
3506
|
+
values: pe,
|
|
3507
3507
|
fields: F,
|
|
3508
3508
|
reset: !1
|
|
3509
3509
|
});
|
|
3510
3510
|
}
|
|
3511
3511
|
if (oe.warning && oe.warning.title && oe.warning.message && !ae.current) {
|
|
3512
3512
|
const {
|
|
3513
|
-
title:
|
|
3514
|
-
message:
|
|
3513
|
+
title: pe,
|
|
3514
|
+
message: et
|
|
3515
3515
|
} = oe.warning;
|
|
3516
|
-
ae.current = !0, sl(
|
|
3516
|
+
ae.current = !0, sl(pe, et, () => {
|
|
3517
3517
|
ae.current = !1;
|
|
3518
3518
|
});
|
|
3519
3519
|
}
|
|
3520
3520
|
if (oe.domain && Object.keys(oe.domain).length > 0) {
|
|
3521
|
-
const
|
|
3521
|
+
const pe = ja({
|
|
3522
3522
|
fieldsDomain: oe.domain,
|
|
3523
3523
|
fields: F
|
|
3524
3524
|
});
|
|
3525
3525
|
Lt({
|
|
3526
|
-
fields:
|
|
3526
|
+
fields: pe,
|
|
3527
3527
|
arch: _,
|
|
3528
|
-
values: Ee(
|
|
3529
|
-
}), j(
|
|
3528
|
+
values: Ee(pe)
|
|
3529
|
+
}), j(pe);
|
|
3530
3530
|
}
|
|
3531
3531
|
};
|
|
3532
3532
|
async function zo({
|
|
3533
3533
|
action: K,
|
|
3534
3534
|
context: G
|
|
3535
3535
|
}) {
|
|
3536
|
-
const re = await
|
|
3536
|
+
const re = await B.getHandler().execute({
|
|
3537
3537
|
model: r,
|
|
3538
3538
|
action: K,
|
|
3539
3539
|
payload: [ue()],
|
|
@@ -3568,7 +3568,7 @@ function Sl(e, t) {
|
|
|
3568
3568
|
async function Jo({
|
|
3569
3569
|
action: K
|
|
3570
3570
|
}) {
|
|
3571
|
-
const G = await
|
|
3571
|
+
const G = await B.getHandler().executeWorkflow({
|
|
3572
3572
|
model: r,
|
|
3573
3573
|
action: K,
|
|
3574
3574
|
payload: ue()
|
|
@@ -3581,7 +3581,7 @@ function Sl(e, t) {
|
|
|
3581
3581
|
action: K,
|
|
3582
3582
|
context: G
|
|
3583
3583
|
}) {
|
|
3584
|
-
const re = (await
|
|
3584
|
+
const re = (await B.getHandler().readObjects({
|
|
3585
3585
|
model: "ir.actions.actions",
|
|
3586
3586
|
ids: [parseInt(K)],
|
|
3587
3587
|
context: v
|
|
@@ -3640,38 +3640,39 @@ function Sl(e, t) {
|
|
|
3640
3640
|
Tr(C);
|
|
3641
3641
|
return;
|
|
3642
3642
|
}
|
|
3643
|
+
let oe = !1;
|
|
3643
3644
|
try {
|
|
3644
|
-
(Oe() || ue() === void 0) && (m === "2many" ? (await or({
|
|
3645
|
+
(Oe() || ue() === void 0) && (oe = !0, wn(!0), m === "2many" ? (await or({
|
|
3645
3646
|
callOnSubmitSucceed: !1
|
|
3646
3647
|
}), z.current = !0) : await Jt({
|
|
3647
3648
|
callOnSubmitSucceed: !1
|
|
3648
3649
|
}));
|
|
3649
|
-
const
|
|
3650
|
+
const pe = z.current ? ye() : {}, et = {
|
|
3650
3651
|
...re,
|
|
3651
|
-
...
|
|
3652
|
+
...pe
|
|
3652
3653
|
};
|
|
3653
|
-
|
|
3654
|
+
K === "object" ? await zo({
|
|
3654
3655
|
action: G,
|
|
3655
|
-
context:
|
|
3656
|
+
context: et
|
|
3656
3657
|
}) : K === "workflow" ? await Jo({
|
|
3657
3658
|
action: G
|
|
3658
3659
|
}) : K === "action" && await Zo({
|
|
3659
3660
|
action: G,
|
|
3660
|
-
context:
|
|
3661
|
-
}), wn(!1);
|
|
3662
|
-
} catch (
|
|
3663
|
-
wn(!1), Ge(
|
|
3661
|
+
context: et
|
|
3662
|
+
}), oe && wn(!1);
|
|
3663
|
+
} catch (pe) {
|
|
3664
|
+
oe && wn(!1), Ge(pe);
|
|
3664
3665
|
}
|
|
3665
3666
|
}
|
|
3666
3667
|
const ei = () => !S && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !V ? null : /* @__PURE__ */ n(ne, {
|
|
3667
3668
|
children: /* @__PURE__ */ n(as, {
|
|
3668
3669
|
getValues: Ke,
|
|
3669
3670
|
getPlainValues: Q,
|
|
3670
|
-
getFields:
|
|
3671
|
+
getFields: ot,
|
|
3671
3672
|
domain: O,
|
|
3672
3673
|
activeId: i,
|
|
3673
3674
|
activeModel: r,
|
|
3674
|
-
setFieldValue:
|
|
3675
|
+
setFieldValue: it,
|
|
3675
3676
|
getFieldValue: gt,
|
|
3676
3677
|
executeButtonAction: Qo,
|
|
3677
3678
|
getContext: Se,
|
|
@@ -3748,7 +3749,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3748
3749
|
} = e, {
|
|
3749
3750
|
modalWidth: d
|
|
3750
3751
|
} = fn(), [f, c] = I(i), [m, y] = I(!1), [p, h] = I();
|
|
3751
|
-
|
|
3752
|
+
ge(() => {
|
|
3752
3753
|
a && g();
|
|
3753
3754
|
}, [l, a]);
|
|
3754
3755
|
async function g() {
|
|
@@ -3757,7 +3758,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3757
3758
|
res_id: A,
|
|
3758
3759
|
action_type: D,
|
|
3759
3760
|
view_id: E
|
|
3760
|
-
} = l, x = await
|
|
3761
|
+
} = l, x = await B.getHandler().isShortcutFavorite({
|
|
3761
3762
|
action_id: b,
|
|
3762
3763
|
action_type: D,
|
|
3763
3764
|
view_id: E,
|
|
@@ -3767,7 +3768,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3767
3768
|
}
|
|
3768
3769
|
async function v() {
|
|
3769
3770
|
if (m && p)
|
|
3770
|
-
await
|
|
3771
|
+
await B.getHandler().removeFavourite({
|
|
3771
3772
|
shortcut_id: p
|
|
3772
3773
|
});
|
|
3773
3774
|
else {
|
|
@@ -3777,7 +3778,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3777
3778
|
action_type: D,
|
|
3778
3779
|
view_id: E
|
|
3779
3780
|
} = l;
|
|
3780
|
-
await
|
|
3781
|
+
await B.getHandler().addFavourite({
|
|
3781
3782
|
action_id: b,
|
|
3782
3783
|
action_type: D,
|
|
3783
3784
|
view_id: E,
|
|
@@ -3893,7 +3894,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3893
3894
|
});
|
|
3894
3895
|
}, {
|
|
3895
3896
|
useToken: Ol
|
|
3896
|
-
} =
|
|
3897
|
+
} = Be, xo = (e) => {
|
|
3897
3898
|
const {
|
|
3898
3899
|
ooui: t
|
|
3899
3900
|
} = e, {
|
|
@@ -3926,7 +3927,7 @@ const qt = bt(Sl), zt = (e) => {
|
|
|
3926
3927
|
});
|
|
3927
3928
|
}, {
|
|
3928
3929
|
useToken: Il
|
|
3929
|
-
} =
|
|
3930
|
+
} = Be, tn = (e) => {
|
|
3930
3931
|
const {
|
|
3931
3932
|
ooui: t,
|
|
3932
3933
|
onChange: r
|
|
@@ -4008,7 +4009,7 @@ function _l(e) {
|
|
|
4008
4009
|
const {
|
|
4009
4010
|
defaultAlgorithm: Dl,
|
|
4010
4011
|
defaultSeed: Vl
|
|
4011
|
-
} =
|
|
4012
|
+
} = Be, Al = Dl(Vl), {
|
|
4012
4013
|
Option: Rl
|
|
4013
4014
|
} = Ct, kl = (e) => {
|
|
4014
4015
|
const {
|
|
@@ -4193,7 +4194,7 @@ function Nl(e) {
|
|
|
4193
4194
|
}
|
|
4194
4195
|
const {
|
|
4195
4196
|
useToken: Pl
|
|
4196
|
-
} =
|
|
4197
|
+
} = Be;
|
|
4197
4198
|
function Co(e) {
|
|
4198
4199
|
const {
|
|
4199
4200
|
fields: t,
|
|
@@ -4215,7 +4216,7 @@ function Co(e) {
|
|
|
4215
4216
|
} = e, [p, h] = I(), [g, v] = I(), [O, V] = I(!1), b = fe(), {
|
|
4216
4217
|
token: A
|
|
4217
4218
|
} = Pl(), [D] = st.useForm();
|
|
4218
|
-
|
|
4219
|
+
ge(() => {
|
|
4219
4220
|
D.setFieldsValue(m);
|
|
4220
4221
|
}, [m]);
|
|
4221
4222
|
const E = () => {
|
|
@@ -4305,7 +4306,7 @@ const Ir = (e, t = "14px -apple-system") => {
|
|
|
4305
4306
|
i.font = t;
|
|
4306
4307
|
const o = i.measureText(e);
|
|
4307
4308
|
return Math.round((o.width + 80) * 1.5);
|
|
4308
|
-
},
|
|
4309
|
+
}, Bl = (e, t, r = 500) => {
|
|
4309
4310
|
if (e.length === 0)
|
|
4310
4311
|
return e;
|
|
4311
4312
|
const i = e.map(
|
|
@@ -4327,7 +4328,7 @@ const Ir = (e, t = "14px -apple-system") => {
|
|
|
4327
4328
|
tableWidth: o
|
|
4328
4329
|
};
|
|
4329
4330
|
};
|
|
4330
|
-
function
|
|
4331
|
+
function Hl(e) {
|
|
4331
4332
|
if (!!e)
|
|
4332
4333
|
try {
|
|
4333
4334
|
if (e.includes(":")) {
|
|
@@ -4440,7 +4441,7 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4440
4441
|
var w, T, $, M, S;
|
|
4441
4442
|
d(!0);
|
|
4442
4443
|
try {
|
|
4443
|
-
const R = await
|
|
4444
|
+
const R = await B.getHandler().getView({
|
|
4444
4445
|
model: r,
|
|
4445
4446
|
type: "form",
|
|
4446
4447
|
context: i
|
|
@@ -4452,7 +4453,7 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4452
4453
|
} = R;
|
|
4453
4454
|
(w = _.action) == null || w.filter((F) => F.hasOwnProperty("context")).map((F) => k.push(...Sn(F.context))), (T = _.action) == null || T.filter((F) => F.hasOwnProperty("domain")).map((F) => k.push(...cr(F.domain))), ($ = _.relate) == null || $.filter((F) => F.hasOwnProperty("context")).map((F) => k.push(...Sn(F.context))), (M = _.relate) == null || M.filter((F) => F.hasOwnProperty("domain")).map((F) => k.push(...cr(F.domain))), (S = _.print) == null || S.filter((F) => F.hasOwnProperty("context")).map((F) => k.push(...Sn(F.context))), k = k.filter((F) => Object.keys(R.fields).indexOf(F) > -1);
|
|
4454
4455
|
let N = {};
|
|
4455
|
-
k.length > 0 && (N = (await
|
|
4456
|
+
k.length > 0 && (N = (await B.getHandler().readObjects({
|
|
4456
4457
|
model: r,
|
|
4457
4458
|
ids: [t],
|
|
4458
4459
|
fieldsToRetrieve: k,
|
|
@@ -4469,7 +4470,7 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4469
4470
|
function b() {
|
|
4470
4471
|
var T;
|
|
4471
4472
|
if (u)
|
|
4472
|
-
return /* @__PURE__ */ n(
|
|
4473
|
+
return /* @__PURE__ */ n(He, {
|
|
4473
4474
|
children: /* @__PURE__ */ n("div", {
|
|
4474
4475
|
style: {
|
|
4475
4476
|
padding: 15
|
|
@@ -4478,21 +4479,21 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4478
4479
|
})
|
|
4479
4480
|
});
|
|
4480
4481
|
if (!f || !f.toolbar)
|
|
4481
|
-
return /* @__PURE__ */ n(
|
|
4482
|
-
const w = (T = f == null ? void 0 : f.toolbar) == null ? void 0 : T.relate.map(($) => /* @__PURE__ */ n(
|
|
4482
|
+
return /* @__PURE__ */ n(He, {});
|
|
4483
|
+
const w = (T = f == null ? void 0 : f.toolbar) == null ? void 0 : T.relate.map(($) => /* @__PURE__ */ n(He.Item, {
|
|
4483
4484
|
children: $.name
|
|
4484
4485
|
}, $.id));
|
|
4485
|
-
return /* @__PURE__ */ n(
|
|
4486
|
+
return /* @__PURE__ */ n(He, {
|
|
4486
4487
|
onClick: A,
|
|
4487
|
-
children: [/* @__PURE__ */ n(
|
|
4488
|
+
children: [/* @__PURE__ */ n(He.Item, {
|
|
4488
4489
|
disabled: !f.toolbar.action || f.toolbar.action.length === 0,
|
|
4489
4490
|
icon: /* @__PURE__ */ n(Yn, {}),
|
|
4490
4491
|
children: p("action")
|
|
4491
|
-
}, "action"), /* @__PURE__ */ n(
|
|
4492
|
+
}, "action"), /* @__PURE__ */ n(He.Item, {
|
|
4492
4493
|
disabled: !f.toolbar.print || f.toolbar.print.length === 0,
|
|
4493
4494
|
icon: /* @__PURE__ */ n(Wn, {}),
|
|
4494
4495
|
children: p("report")
|
|
4495
|
-
}, "print"), /* @__PURE__ */ n(
|
|
4496
|
+
}, "print"), /* @__PURE__ */ n(He.Divider, {}), /* @__PURE__ */ n(He.ItemGroup, {
|
|
4496
4497
|
title: /* @__PURE__ */ P(ne, {
|
|
4497
4498
|
children: [/* @__PURE__ */ n(qr, {}), " ", /* @__PURE__ */ P("span", {
|
|
4498
4499
|
children: [" ", p("related")]
|
|
@@ -4589,7 +4590,7 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4589
4590
|
if (!t || t && o)
|
|
4590
4591
|
return;
|
|
4591
4592
|
l(!0);
|
|
4592
|
-
const y = await
|
|
4593
|
+
const y = await B.getHandler().execute({
|
|
4593
4594
|
action: "name_get",
|
|
4594
4595
|
payload: [f],
|
|
4595
4596
|
model: u,
|
|
@@ -4597,12 +4598,12 @@ const jl = (e) => /* @__PURE__ */ n(ve, {
|
|
|
4597
4598
|
});
|
|
4598
4599
|
s(y[0][1]), l(!1);
|
|
4599
4600
|
}, [t, o]);
|
|
4600
|
-
if (
|
|
4601
|
+
if (ge(() => {
|
|
4601
4602
|
c();
|
|
4602
4603
|
}, [t]), !t && !a)
|
|
4603
4604
|
return /* @__PURE__ */ n(ne, {});
|
|
4604
4605
|
if (a)
|
|
4605
|
-
return /* @__PURE__ */ n(
|
|
4606
|
+
return /* @__PURE__ */ n(rt, {});
|
|
4606
4607
|
const m = i.get(u);
|
|
4607
4608
|
return /* @__PURE__ */ P(Ye, {
|
|
4608
4609
|
children: [/* @__PURE__ */ n(ne, {
|
|
@@ -4724,7 +4725,7 @@ var Fo = { exports: {} };
|
|
|
4724
4725
|
case c:
|
|
4725
4726
|
return N ? j(1, J) : j(0, J + 1);
|
|
4726
4727
|
case f:
|
|
4727
|
-
var
|
|
4728
|
+
var H = this.$locale().weekStart || 0, te = (U < H ? U + 7 : U) - H;
|
|
4728
4729
|
return j(N ? W - te : W + (6 - te), J);
|
|
4729
4730
|
case d:
|
|
4730
4731
|
case p:
|
|
@@ -4777,12 +4778,12 @@ var Fo = { exports: {} };
|
|
|
4777
4778
|
return _.invalidDate || h;
|
|
4778
4779
|
var N = R || "YYYY-MM-DDTHH:mm:ssZ", F = w.z(this), j = this.$H, q = this.$m, U = this.$M, J = _.weekdays, W = _.months, L = function(ae, X, z, he) {
|
|
4779
4780
|
return ae && (ae[X] || ae(k, N)) || z[X].slice(0, he);
|
|
4780
|
-
},
|
|
4781
|
+
}, H = function(ae) {
|
|
4781
4782
|
return w.s(j % 12 || 12, ae, "0");
|
|
4782
4783
|
}, te = _.meridiem || function(ae, X, z) {
|
|
4783
4784
|
var he = ae < 12 ? "AM" : "PM";
|
|
4784
4785
|
return z ? he.toLowerCase() : he;
|
|
4785
|
-
}, Z = { YY: String(this.$y).slice(-2), YYYY: w.s(this.$y, 4, "0"), M: U + 1, MM: w.s(U + 1, 2, "0"), MMM: L(_.monthsShort, U, W, 3), MMMM: L(W, U), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: L(_.weekdaysMin, this.$W, J, 2), ddd: L(_.weekdaysShort, this.$W, J, 3), dddd: J[this.$W], H: String(j), HH: w.s(j, 2, "0"), h:
|
|
4786
|
+
}, Z = { YY: String(this.$y).slice(-2), YYYY: w.s(this.$y, 4, "0"), M: U + 1, MM: w.s(U + 1, 2, "0"), MMM: L(_.monthsShort, U, W, 3), MMMM: L(W, U), D: this.$D, DD: w.s(this.$D, 2, "0"), d: String(this.$W), dd: L(_.weekdaysMin, this.$W, J, 2), ddd: L(_.weekdaysShort, this.$W, J, 3), dddd: J[this.$W], H: String(j), HH: w.s(j, 2, "0"), h: H(1), hh: H(2), a: te(j, q, !0), A: te(j, q, !1), m: String(q), mm: w.s(q, 2, "0"), s: String(this.$s), ss: w.s(this.$s, 2, "0"), SSS: w.s(this.$ms, 3, "0"), Z: F };
|
|
4786
4787
|
return N.replace(v, function(ae, X) {
|
|
4787
4788
|
return X || Z[ae] || F.replace(":", "");
|
|
4788
4789
|
});
|
|
@@ -4938,7 +4939,7 @@ var Io = { exports: {} };
|
|
|
4938
4939
|
})(Io);
|
|
4939
4940
|
const ql = Io.exports, {
|
|
4940
4941
|
useToken: zl
|
|
4941
|
-
} =
|
|
4942
|
+
} = Be;
|
|
4942
4943
|
ut.extend(Gl);
|
|
4943
4944
|
ut.extend(ql);
|
|
4944
4945
|
const ct = {
|
|
@@ -5010,7 +5011,7 @@ const ct = {
|
|
|
5010
5011
|
justifyContent: "center",
|
|
5011
5012
|
alignContent: "center"
|
|
5012
5013
|
},
|
|
5013
|
-
children: /* @__PURE__ */ n(
|
|
5014
|
+
children: /* @__PURE__ */ n(Bt, {
|
|
5014
5015
|
checked: e,
|
|
5015
5016
|
disabled: !0
|
|
5016
5017
|
})
|
|
@@ -5091,11 +5092,11 @@ function pn(e) {
|
|
|
5091
5092
|
readonly: b
|
|
5092
5093
|
} = e, [A, D] = I([]), [E, x] = I([]), C = fe(!1), w = fe(null), {
|
|
5093
5094
|
t: T
|
|
5094
|
-
} = Y(we), $ = fe(r), M = Y(
|
|
5095
|
+
} = Y(we), $ = fe(r), M = Y(tt), {
|
|
5095
5096
|
title: S = void 0,
|
|
5096
5097
|
setTitle: R = void 0
|
|
5097
5098
|
} = (O ? M : {}) || {};
|
|
5098
|
-
|
|
5099
|
+
ge(() => {
|
|
5099
5100
|
w.current = It(o);
|
|
5100
5101
|
const J = Aa(w.current, {
|
|
5101
5102
|
boolean: Zl,
|
|
@@ -5116,7 +5117,7 @@ function pn(e) {
|
|
|
5116
5117
|
avatar: lc
|
|
5117
5118
|
}, V);
|
|
5118
5119
|
x(J), w.current.string && S !== w.current.string && (R == null || R(w.current.string));
|
|
5119
|
-
}, [o]),
|
|
5120
|
+
}, [o]), ge(() => {
|
|
5120
5121
|
C.current = !1;
|
|
5121
5122
|
const J = ho(w.current, s);
|
|
5122
5123
|
D(J), $.current = r;
|
|
@@ -5149,9 +5150,9 @@ function pn(e) {
|
|
|
5149
5150
|
}));
|
|
5150
5151
|
if (!W || W.length === 0)
|
|
5151
5152
|
return null;
|
|
5152
|
-
let L = [],
|
|
5153
|
+
let L = [], H = ((te = f == null ? void 0 : f.selectedRowKeys) == null ? void 0 : te.length) > 0 ? A.filter((Z) => f == null ? void 0 : f.selectedRowKeys.includes(Z.id)) : A;
|
|
5153
5154
|
return W.forEach((Z) => {
|
|
5154
|
-
const ae =
|
|
5155
|
+
const ae = H.reduce((X, z) => z[Z.field] && !isNaN(z[Z.field]) ? X + z[Z.field] : X, 0);
|
|
5155
5156
|
L.push(`${Z.label}: ${Math.round(ae * 100) / 100}`);
|
|
5156
5157
|
}), /* @__PURE__ */ n("div", {
|
|
5157
5158
|
className: "p-1 pb-0 pl-2 mt-2 ",
|
|
@@ -5160,7 +5161,7 @@ function pn(e) {
|
|
|
5160
5161
|
}
|
|
5161
5162
|
let q, U = c;
|
|
5162
5163
|
if (w.current !== null) {
|
|
5163
|
-
q =
|
|
5164
|
+
q = Bl(E, A, 600);
|
|
5164
5165
|
const W = w.current;
|
|
5165
5166
|
c && W.columns.some((L) => L.sum !== void 0) && (U = c - 30);
|
|
5166
5167
|
}
|
|
@@ -5198,7 +5199,7 @@ function pn(e) {
|
|
|
5198
5199
|
expandableOpts: g ? {
|
|
5199
5200
|
expandIcon: xi,
|
|
5200
5201
|
collapseIcon: Ci,
|
|
5201
|
-
loadingIcon:
|
|
5202
|
+
loadingIcon: rt,
|
|
5202
5203
|
onFetchChildrenForRecord: g,
|
|
5203
5204
|
childField: v
|
|
5204
5205
|
} : void 0
|
|
@@ -5222,7 +5223,7 @@ function cc(e, t) {
|
|
|
5222
5223
|
height: M
|
|
5223
5224
|
} = fn(), S = Y(Et), {
|
|
5224
5225
|
processAction: R
|
|
5225
|
-
} = S || {}, k = Y(
|
|
5226
|
+
} = S || {}, k = Y(tt), {
|
|
5226
5227
|
setResults: _ = void 0,
|
|
5227
5228
|
setCurrentItemIndex: N = void 0,
|
|
5228
5229
|
currentId: F = void 0,
|
|
@@ -5232,7 +5233,7 @@ function cc(e, t) {
|
|
|
5232
5233
|
searchParams: J = [],
|
|
5233
5234
|
setSearchParams: W = void 0,
|
|
5234
5235
|
searchVisible: L = !0,
|
|
5235
|
-
setSearchVisible:
|
|
5236
|
+
setSearchVisible: H = void 0,
|
|
5236
5237
|
sorter: te = void 0,
|
|
5237
5238
|
setSorter: Z = void 0,
|
|
5238
5239
|
setTotalItems: ae = void 0,
|
|
@@ -5265,7 +5266,7 @@ function cc(e, t) {
|
|
|
5265
5266
|
setSearchParams: W,
|
|
5266
5267
|
setSearchValues: xe,
|
|
5267
5268
|
searchParams: J,
|
|
5268
|
-
setSearchVisible:
|
|
5269
|
+
setSearchVisible: H,
|
|
5269
5270
|
setTreeIsLoading: z,
|
|
5270
5271
|
nameSearch: a,
|
|
5271
5272
|
searchNameGetDoneRef: v,
|
|
@@ -5289,34 +5290,34 @@ function cc(e, t) {
|
|
|
5289
5290
|
},
|
|
5290
5291
|
getFields: () => b == null ? void 0 : b.fields,
|
|
5291
5292
|
getDomain: () => u
|
|
5292
|
-
})),
|
|
5293
|
+
})), ge(() => {
|
|
5293
5294
|
!h || d && (v.current = !1, ie());
|
|
5294
5295
|
}, [Re, Ze, h, d, a]);
|
|
5295
5296
|
const ue = async () => {
|
|
5296
5297
|
g(!1), p(!0), C(void 0), z == null || z(!0);
|
|
5297
5298
|
try {
|
|
5298
|
-
await
|
|
5299
|
+
await ot(), g(!0);
|
|
5299
5300
|
} catch (Oe) {
|
|
5300
5301
|
C(Oe), z == null || z(!1);
|
|
5301
5302
|
} finally {
|
|
5302
5303
|
p(!1);
|
|
5303
5304
|
}
|
|
5304
|
-
},
|
|
5305
|
+
}, ot = async () => {
|
|
5305
5306
|
V(r);
|
|
5306
5307
|
let Oe = i;
|
|
5307
|
-
i || (Oe = await
|
|
5308
|
+
i || (Oe = await B.getHandler().getView({
|
|
5308
5309
|
model: r,
|
|
5309
5310
|
type: "form",
|
|
5310
5311
|
context: c
|
|
5311
5312
|
}));
|
|
5312
5313
|
let Ee = o;
|
|
5313
|
-
o || (Ee = await
|
|
5314
|
+
o || (Ee = await B.getHandler().getView({
|
|
5314
5315
|
model: r,
|
|
5315
5316
|
type: "tree",
|
|
5316
5317
|
context: c
|
|
5317
5318
|
})), E(Oe), A(Ee);
|
|
5318
5319
|
};
|
|
5319
|
-
|
|
5320
|
+
ge(() => {
|
|
5320
5321
|
ue();
|
|
5321
5322
|
}, [r]);
|
|
5322
5323
|
const Ke = (Oe) => {
|
|
@@ -5325,14 +5326,14 @@ function cc(e, t) {
|
|
|
5325
5326
|
const {
|
|
5326
5327
|
id: Ee
|
|
5327
5328
|
} = Oe;
|
|
5328
|
-
$.current || ($.current = await
|
|
5329
|
+
$.current || ($.current = await B.getHandler().treeButOpen({
|
|
5329
5330
|
id: b.view_id,
|
|
5330
5331
|
model: O,
|
|
5331
5332
|
context: c
|
|
5332
5333
|
}));
|
|
5333
|
-
const
|
|
5334
|
+
const it = $.current[0][2];
|
|
5334
5335
|
await (R == null ? void 0 : R({
|
|
5335
|
-
actionData:
|
|
5336
|
+
actionData: it,
|
|
5336
5337
|
fields: b.fields,
|
|
5337
5338
|
values: {
|
|
5338
5339
|
active_id: Ee,
|
|
@@ -5347,8 +5348,8 @@ function cc(e, t) {
|
|
|
5347
5348
|
if (b != null && b.isExpandable) {
|
|
5348
5349
|
try {
|
|
5349
5350
|
await Q(Oe);
|
|
5350
|
-
} catch (
|
|
5351
|
-
Ge(
|
|
5351
|
+
} catch (it) {
|
|
5352
|
+
Ge(it);
|
|
5352
5353
|
}
|
|
5353
5354
|
return;
|
|
5354
5355
|
}
|
|
@@ -5360,7 +5361,7 @@ function cc(e, t) {
|
|
|
5360
5361
|
});
|
|
5361
5362
|
};
|
|
5362
5363
|
function Se(Oe) {
|
|
5363
|
-
const Ee = ee().filter((
|
|
5364
|
+
const Ee = ee().filter((it) => Oe.includes(it.id));
|
|
5364
5365
|
U == null || U(Ee), m == null || m(Oe);
|
|
5365
5366
|
}
|
|
5366
5367
|
function ye() {
|
|
@@ -5519,7 +5520,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5519
5520
|
}, {
|
|
5520
5521
|
defaultAlgorithm: uc,
|
|
5521
5522
|
defaultSeed: fc
|
|
5522
|
-
} =
|
|
5523
|
+
} = Be, Ao = uc(fc), mc = (e) => {
|
|
5523
5524
|
const {
|
|
5524
5525
|
ooui: t
|
|
5525
5526
|
} = e, {
|
|
@@ -5562,18 +5563,18 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5562
5563
|
getContext: T,
|
|
5563
5564
|
elementHasLostFocus: $
|
|
5564
5565
|
} = E || {}, M = fe([]), [S, R] = I([]), k = t && t[0] || void 0, _ = t && t[1] || "";
|
|
5565
|
-
|
|
5566
|
+
ge(() => {
|
|
5566
5567
|
!Array.isArray(t) && t && U(t);
|
|
5567
|
-
}, [t]),
|
|
5568
|
+
}, [t]), ge(() => {
|
|
5568
5569
|
k && _.length === 0 ? U(k) : k && _.length > 0 ? A(_) : !k && !_ && A(D.current || "");
|
|
5569
5570
|
}, [t]);
|
|
5570
|
-
const N = (
|
|
5571
|
-
r == null || r(
|
|
5572
|
-
}, F = (
|
|
5573
|
-
D.current =
|
|
5571
|
+
const N = (H) => {
|
|
5572
|
+
r == null || r(H), $ == null || $();
|
|
5573
|
+
}, F = (H) => {
|
|
5574
|
+
D.current = H.target.value, N([void 0, ""]);
|
|
5574
5575
|
}, j = async () => {
|
|
5575
5576
|
if (!h && b !== _) {
|
|
5576
|
-
if (await new Promise((
|
|
5577
|
+
if (await new Promise((H) => setTimeout(H, 100)), V.current) {
|
|
5577
5578
|
N([void 0, ""]);
|
|
5578
5579
|
return;
|
|
5579
5580
|
}
|
|
@@ -5582,7 +5583,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5582
5583
|
if (M.current && M.current.length > 0)
|
|
5583
5584
|
q(D.current);
|
|
5584
5585
|
else {
|
|
5585
|
-
const
|
|
5586
|
+
const H = await B.getHandler().nameSearch({
|
|
5586
5587
|
model: s,
|
|
5587
5588
|
payload: D.current,
|
|
5588
5589
|
context: {
|
|
@@ -5590,17 +5591,17 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5590
5591
|
...l
|
|
5591
5592
|
}
|
|
5592
5593
|
});
|
|
5593
|
-
|
|
5594
|
+
H.length === 1 ? (D.current = void 0, N(H[0])) : q(D.current);
|
|
5594
5595
|
}
|
|
5595
|
-
} catch (
|
|
5596
|
-
nn(
|
|
5596
|
+
} catch (H) {
|
|
5597
|
+
nn(H);
|
|
5597
5598
|
} finally {
|
|
5598
5599
|
g(!1);
|
|
5599
5600
|
}
|
|
5600
5601
|
}
|
|
5601
|
-
}, q = async (
|
|
5602
|
+
}, q = async (H) => {
|
|
5602
5603
|
if (await J(), M.current && M.current.length > 0) {
|
|
5603
|
-
const te = await
|
|
5604
|
+
const te = await B.getHandler().searchAllIds({
|
|
5604
5605
|
params: M.current,
|
|
5605
5606
|
model: s,
|
|
5606
5607
|
context: {
|
|
@@ -5609,23 +5610,23 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5609
5610
|
},
|
|
5610
5611
|
totalItems: 2
|
|
5611
5612
|
});
|
|
5612
|
-
te.length === 1 ? U(te[0]) : (O(
|
|
5613
|
+
te.length === 1 ? U(te[0]) : (O(H), m(!0));
|
|
5613
5614
|
return;
|
|
5614
5615
|
}
|
|
5615
|
-
O(
|
|
5616
|
-
}, U = async (
|
|
5616
|
+
O(H), m(!0);
|
|
5617
|
+
}, U = async (H) => {
|
|
5617
5618
|
g(!0);
|
|
5618
5619
|
try {
|
|
5619
|
-
const te = await
|
|
5620
|
+
const te = await B.getHandler().execute({
|
|
5620
5621
|
action: "name_get",
|
|
5621
|
-
payload: [
|
|
5622
|
+
payload: [H],
|
|
5622
5623
|
model: s,
|
|
5623
5624
|
context: {
|
|
5624
5625
|
...T == null ? void 0 : T(),
|
|
5625
5626
|
...l
|
|
5626
5627
|
}
|
|
5627
5628
|
});
|
|
5628
|
-
N([
|
|
5629
|
+
N([H, te[0][1]]);
|
|
5629
5630
|
} catch (te) {
|
|
5630
5631
|
nn(te);
|
|
5631
5632
|
} finally {
|
|
@@ -5633,7 +5634,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5633
5634
|
}
|
|
5634
5635
|
};
|
|
5635
5636
|
async function J() {
|
|
5636
|
-
d && (M.current = await
|
|
5637
|
+
d && (M.current = await B.getHandler().evalDomain({
|
|
5637
5638
|
domain: d,
|
|
5638
5639
|
values: Mt({
|
|
5639
5640
|
fields: w(),
|
|
@@ -5641,20 +5642,20 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5641
5642
|
}),
|
|
5642
5643
|
fields: w(),
|
|
5643
5644
|
context: T()
|
|
5644
|
-
})), x && x.length > 0 && (M.current = M.current.concat(
|
|
5645
|
+
})), x && x.length > 0 && (M.current = M.current.concat(Br({
|
|
5645
5646
|
domain: x,
|
|
5646
5647
|
widgetFieldName: u
|
|
5647
5648
|
}))), R(M.current);
|
|
5648
5649
|
}
|
|
5649
|
-
async function W(
|
|
5650
|
-
|
|
5650
|
+
async function W(H) {
|
|
5651
|
+
H.keyCode === 13 ? (H.preventDefault(), H.stopPropagation(), await j()) : H.code === "Backspace" && k !== void 0 && (H.preventDefault(), H.stopPropagation(), N([void 0, ""]));
|
|
5651
5652
|
}
|
|
5652
5653
|
return /* @__PURE__ */ P(Ce, {
|
|
5653
5654
|
gutter: 8,
|
|
5654
5655
|
wrap: !1,
|
|
5655
5656
|
children: [/* @__PURE__ */ n(ce, {
|
|
5656
5657
|
flex: "auto",
|
|
5657
|
-
children: /* @__PURE__ */ n(o && !a ? hc :
|
|
5658
|
+
children: /* @__PURE__ */ n(o && !a ? hc : nt, {
|
|
5658
5659
|
type: "text",
|
|
5659
5660
|
value: b,
|
|
5660
5661
|
disabled: a,
|
|
@@ -5677,7 +5678,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5677
5678
|
paddingRight: 0
|
|
5678
5679
|
},
|
|
5679
5680
|
children: /* @__PURE__ */ n(_e, {
|
|
5680
|
-
icon: /* @__PURE__ */ n(
|
|
5681
|
+
icon: /* @__PURE__ */ n(Bn, {}),
|
|
5681
5682
|
disabled: k === void 0 || _ === "" || b === void 0,
|
|
5682
5683
|
onClick: () => {
|
|
5683
5684
|
p(!0);
|
|
@@ -5694,7 +5695,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5694
5695
|
paddingLeft: 0
|
|
5695
5696
|
},
|
|
5696
5697
|
children: /* @__PURE__ */ n(_e, {
|
|
5697
|
-
icon: h ? /* @__PURE__ */ n(
|
|
5698
|
+
icon: h ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Kn, {}),
|
|
5698
5699
|
disabled: a || h,
|
|
5699
5700
|
onClick: () => {
|
|
5700
5701
|
V.current = !0, q(_);
|
|
@@ -5714,8 +5715,8 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5714
5715
|
},
|
|
5715
5716
|
visible: c,
|
|
5716
5717
|
nameSearch: k ? void 0 : v,
|
|
5717
|
-
onSelectValues: (
|
|
5718
|
-
m(!1), U(
|
|
5718
|
+
onSelectValues: (H) => {
|
|
5719
|
+
m(!1), U(H[0]), V.current = !1, D.current = void 0;
|
|
5719
5720
|
},
|
|
5720
5721
|
onCloseModal: () => {
|
|
5721
5722
|
m(!1), V.current = !1;
|
|
@@ -5728,8 +5729,8 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5728
5729
|
},
|
|
5729
5730
|
id: t && t[0],
|
|
5730
5731
|
visible: y,
|
|
5731
|
-
onSubmitSucceed: (
|
|
5732
|
-
p(!1), U(
|
|
5732
|
+
onSubmitSucceed: (H) => {
|
|
5733
|
+
p(!1), U(H);
|
|
5733
5734
|
},
|
|
5734
5735
|
onCancel: () => {
|
|
5735
5736
|
p(!1);
|
|
@@ -5738,7 +5739,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5738
5739
|
readOnly: a
|
|
5739
5740
|
})]
|
|
5740
5741
|
});
|
|
5741
|
-
}, hc = Wt(
|
|
5742
|
+
}, hc = Wt(nt)`
|
|
5742
5743
|
.ant-input {
|
|
5743
5744
|
background-color: ${Ao.colorPrimaryBg};
|
|
5744
5745
|
}
|
|
@@ -5760,7 +5761,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5760
5761
|
});
|
|
5761
5762
|
}, {
|
|
5762
5763
|
getValueForOperator: Ar
|
|
5763
|
-
} =
|
|
5764
|
+
} = Hr, rn = 0.7, on = 30, gc = (e) => {
|
|
5764
5765
|
const {
|
|
5765
5766
|
model: t,
|
|
5766
5767
|
domain: r,
|
|
@@ -5774,7 +5775,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5774
5775
|
operator: f,
|
|
5775
5776
|
manualIds: c
|
|
5776
5777
|
} = e, [m, y] = I(!1), [p, h] = I(), [g, v] = I(), [O, V] = I(), [b, A] = I(0), [D, E] = I(0), [x, C] = I(), [w, T] = I(), [$, M] = I();
|
|
5777
|
-
|
|
5778
|
+
ge(() => {
|
|
5778
5779
|
k();
|
|
5779
5780
|
}, [t, o]);
|
|
5780
5781
|
async function S({
|
|
@@ -5786,11 +5787,11 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5786
5787
|
domain: _
|
|
5787
5788
|
});
|
|
5788
5789
|
if (d && f) {
|
|
5789
|
-
const F = c || await
|
|
5790
|
+
const F = c || await B.getHandler().searchAllIds({
|
|
5790
5791
|
params: _,
|
|
5791
5792
|
model: t,
|
|
5792
5793
|
context: i
|
|
5793
|
-
}), j = await
|
|
5794
|
+
}), j = await B.getHandler().readObjects({
|
|
5794
5795
|
model: t,
|
|
5795
5796
|
ids: F,
|
|
5796
5797
|
fieldsToRetrieve: [d],
|
|
@@ -5801,7 +5802,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5801
5802
|
operator: f
|
|
5802
5803
|
});
|
|
5803
5804
|
} else
|
|
5804
|
-
return c ? c.length : await
|
|
5805
|
+
return c ? c.length : await B.getHandler().searchCount({
|
|
5805
5806
|
model: t,
|
|
5806
5807
|
params: _,
|
|
5807
5808
|
context: i
|
|
@@ -5811,11 +5812,11 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5811
5812
|
domain: _
|
|
5812
5813
|
}) {
|
|
5813
5814
|
if (d && f) {
|
|
5814
|
-
const N = await
|
|
5815
|
+
const N = await B.getHandler().searchAllIds({
|
|
5815
5816
|
params: _,
|
|
5816
5817
|
model: t,
|
|
5817
5818
|
context: i
|
|
5818
|
-
}), F = await
|
|
5819
|
+
}), F = await B.getHandler().readObjects({
|
|
5819
5820
|
model: t,
|
|
5820
5821
|
ids: N,
|
|
5821
5822
|
fieldsToRetrieve: [d],
|
|
@@ -5826,7 +5827,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5826
5827
|
operator: f
|
|
5827
5828
|
});
|
|
5828
5829
|
} else
|
|
5829
|
-
return await
|
|
5830
|
+
return await B.getHandler().searchCount({
|
|
5830
5831
|
model: t,
|
|
5831
5832
|
params: _,
|
|
5832
5833
|
context: i
|
|
@@ -5841,7 +5842,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5841
5842
|
isTotal: !1
|
|
5842
5843
|
});
|
|
5843
5844
|
if (h(F), s) {
|
|
5844
|
-
const j = await
|
|
5845
|
+
const j = await B.getHandler().evalDomain({
|
|
5845
5846
|
domain: s,
|
|
5846
5847
|
values: {},
|
|
5847
5848
|
context: i
|
|
@@ -5852,7 +5853,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5852
5853
|
}), V(_);
|
|
5853
5854
|
}
|
|
5854
5855
|
if (_ ? (N = Math.round(F / _ * 100 * 100) / 100, v(N)) : v(0), o) {
|
|
5855
|
-
const j = await
|
|
5856
|
+
const j = await B.getHandler().parseCondition({
|
|
5856
5857
|
condition: o,
|
|
5857
5858
|
values: {
|
|
5858
5859
|
value: F,
|
|
@@ -5864,7 +5865,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5864
5865
|
}
|
|
5865
5866
|
if (l)
|
|
5866
5867
|
if (l.indexOf(":") !== -1) {
|
|
5867
|
-
const j = await
|
|
5868
|
+
const j = await B.getHandler().parseCondition({
|
|
5868
5869
|
condition: l,
|
|
5869
5870
|
values: {
|
|
5870
5871
|
value: F,
|
|
@@ -5889,7 +5890,7 @@ const Do = bt(cc), Vo = (e) => {
|
|
|
5889
5890
|
style: {
|
|
5890
5891
|
padding: "1rem"
|
|
5891
5892
|
},
|
|
5892
|
-
children: /* @__PURE__ */ n(
|
|
5893
|
+
children: /* @__PURE__ */ n(rt, {
|
|
5893
5894
|
style: {
|
|
5894
5895
|
height: "12px"
|
|
5895
5896
|
}
|
|
@@ -6173,7 +6174,7 @@ function Cc(e) {
|
|
|
6173
6174
|
}
|
|
6174
6175
|
const {
|
|
6175
6176
|
processGraphData: Sc
|
|
6176
|
-
} =
|
|
6177
|
+
} = Hr, {
|
|
6177
6178
|
getFieldsToRetrieve: Tc
|
|
6178
6179
|
} = vi, Fc = (e) => {
|
|
6179
6180
|
const {
|
|
@@ -6245,7 +6246,7 @@ async function Oc({
|
|
|
6245
6246
|
context: t,
|
|
6246
6247
|
fields: r
|
|
6247
6248
|
}) {
|
|
6248
|
-
return await
|
|
6249
|
+
return await B.getHandler().getFields({
|
|
6249
6250
|
model: e,
|
|
6250
6251
|
context: t,
|
|
6251
6252
|
fields: r
|
|
@@ -6266,7 +6267,7 @@ async function Ic({
|
|
|
6266
6267
|
fields: e
|
|
6267
6268
|
});
|
|
6268
6269
|
if (a) {
|
|
6269
|
-
let d = await
|
|
6270
|
+
let d = await B.getHandler().readObjects({
|
|
6270
6271
|
model: t,
|
|
6271
6272
|
ids: a,
|
|
6272
6273
|
fieldsToRetrieve: e,
|
|
@@ -6278,7 +6279,7 @@ async function Ic({
|
|
|
6278
6279
|
};
|
|
6279
6280
|
}
|
|
6280
6281
|
return {
|
|
6281
|
-
values: await
|
|
6282
|
+
values: await B.getHandler().search({
|
|
6282
6283
|
model: t,
|
|
6283
6284
|
params: r,
|
|
6284
6285
|
fields: e,
|
|
@@ -6378,20 +6379,20 @@ const Ac = (e, t) => {
|
|
|
6378
6379
|
domain: s,
|
|
6379
6380
|
limit: a,
|
|
6380
6381
|
manualIds: l
|
|
6381
|
-
} = e, [u, d] = I(!1), [f, c] = I(), [m, y] = I(), p = Y(
|
|
6382
|
+
} = e, [u, d] = I(!1), [f, c] = I(), [m, y] = I(), p = Y(tt), {
|
|
6382
6383
|
setGraphIsLoading: h = void 0
|
|
6383
6384
|
} = p || {};
|
|
6384
6385
|
xt(t, () => ({
|
|
6385
6386
|
refresh: () => {
|
|
6386
6387
|
g();
|
|
6387
6388
|
}
|
|
6388
|
-
})),
|
|
6389
|
+
})), ge(() => {
|
|
6389
6390
|
g();
|
|
6390
6391
|
}, [r]);
|
|
6391
6392
|
async function g() {
|
|
6392
6393
|
d(!0), h == null || h(!0);
|
|
6393
6394
|
try {
|
|
6394
|
-
const v = await
|
|
6395
|
+
const v = await B.getHandler().getView({
|
|
6395
6396
|
model: i,
|
|
6396
6397
|
id: r,
|
|
6397
6398
|
type: "graph",
|
|
@@ -6417,7 +6418,7 @@ const Ac = (e, t) => {
|
|
|
6417
6418
|
alignContent: "center",
|
|
6418
6419
|
padding: "1rem"
|
|
6419
6420
|
},
|
|
6420
|
-
children: /* @__PURE__ */ n(
|
|
6421
|
+
children: /* @__PURE__ */ n(rt, {
|
|
6421
6422
|
style: {
|
|
6422
6423
|
height: "12px"
|
|
6423
6424
|
}
|
|
@@ -6493,7 +6494,7 @@ const Ac = (e, t) => {
|
|
|
6493
6494
|
});
|
|
6494
6495
|
}, {
|
|
6495
6496
|
useToken: $c
|
|
6496
|
-
} =
|
|
6497
|
+
} = Be, Lc = (e) => {
|
|
6497
6498
|
const {
|
|
6498
6499
|
title: t,
|
|
6499
6500
|
readOnly: r,
|
|
@@ -6597,7 +6598,7 @@ function Pc(e) {
|
|
|
6597
6598
|
return !t.includes(s, o + 1);
|
|
6598
6599
|
});
|
|
6599
6600
|
}
|
|
6600
|
-
const
|
|
6601
|
+
const Bc = (e) => {
|
|
6601
6602
|
var Ke;
|
|
6602
6603
|
const {
|
|
6603
6604
|
value: t,
|
|
@@ -6623,12 +6624,12 @@ const Hc = (e) => {
|
|
|
6623
6624
|
} = Y(we), [O, V] = I(!1), [b, A] = I(!1), [D, E] = I(), [x, C] = I(!1), [w, T] = I(!1), [$, M] = I(), [S, R] = I([]), [k, _] = I(!1), N = fe([]), [F, j] = I(), q = fe(), [U, J] = I(void 0), {
|
|
6624
6625
|
readOnly: W,
|
|
6625
6626
|
relation: L,
|
|
6626
|
-
context:
|
|
6627
|
+
context: H,
|
|
6627
6628
|
domain: te
|
|
6628
6629
|
} = i, Z = i.type === "many2many", {
|
|
6629
6630
|
id: ae
|
|
6630
6631
|
} = i, X = s.filter((Q) => (Q.values || Q.treeValues) && Q.operation !== "pendingRemove"), z = fe();
|
|
6631
|
-
|
|
6632
|
+
ge(() => {
|
|
6632
6633
|
if (z.current !== a) {
|
|
6633
6634
|
z.current = a, he();
|
|
6634
6635
|
return;
|
|
@@ -6638,7 +6639,7 @@ const Hc = (e) => {
|
|
|
6638
6639
|
const he = Le(() => {
|
|
6639
6640
|
(a === "form" && s.some((Q) => !Q.values) || a === "tree" && s.some((Q) => !Q.treeValues)) && $e();
|
|
6640
6641
|
}, [s, a]);
|
|
6641
|
-
|
|
6642
|
+
ge(() => {
|
|
6642
6643
|
Pe();
|
|
6643
6644
|
}, [h]);
|
|
6644
6645
|
const xe = (Q) => {
|
|
@@ -6665,7 +6666,7 @@ const Hc = (e) => {
|
|
|
6665
6666
|
items: s,
|
|
6666
6667
|
context: {
|
|
6667
6668
|
...p == null ? void 0 : p(),
|
|
6668
|
-
...
|
|
6669
|
+
...H
|
|
6669
6670
|
},
|
|
6670
6671
|
currentView: Q || a
|
|
6671
6672
|
});
|
|
@@ -6677,7 +6678,7 @@ const Hc = (e) => {
|
|
|
6677
6678
|
}
|
|
6678
6679
|
};
|
|
6679
6680
|
async function Pe() {
|
|
6680
|
-
te && (N.current = await
|
|
6681
|
+
te && (N.current = await B.getHandler().evalDomain({
|
|
6681
6682
|
domain: te,
|
|
6682
6683
|
values: Mt({
|
|
6683
6684
|
fields: m(),
|
|
@@ -6685,7 +6686,7 @@ const Hc = (e) => {
|
|
|
6685
6686
|
}),
|
|
6686
6687
|
fields: m(),
|
|
6687
6688
|
context: p()
|
|
6688
|
-
})), h && h.length > 0 && (N.current = N.current.concat(
|
|
6689
|
+
})), h && h.length > 0 && (N.current = N.current.concat(Br({
|
|
6689
6690
|
domain: h,
|
|
6690
6691
|
widgetFieldName: ae
|
|
6691
6692
|
})));
|
|
@@ -6705,21 +6706,21 @@ const Hc = (e) => {
|
|
|
6705
6706
|
d(u + 1);
|
|
6706
6707
|
}) : d(u + 1));
|
|
6707
6708
|
}, je = async () => {
|
|
6708
|
-
const Q = X[u].id, se = (await
|
|
6709
|
+
const Q = X[u].id, se = (await B.getHandler().readObjects({
|
|
6709
6710
|
model: L,
|
|
6710
6711
|
ids: [Q],
|
|
6711
6712
|
fields: o.get("form").fields,
|
|
6712
6713
|
context: {
|
|
6713
6714
|
...p == null ? void 0 : p(),
|
|
6714
|
-
...
|
|
6715
|
+
...H
|
|
6715
6716
|
}
|
|
6716
|
-
}))[0], Se = (await
|
|
6717
|
+
}))[0], Se = (await B.getHandler().readObjects({
|
|
6717
6718
|
model: L,
|
|
6718
6719
|
ids: [Q],
|
|
6719
6720
|
fields: o.get("tree").fields,
|
|
6720
6721
|
context: {
|
|
6721
6722
|
...p == null ? void 0 : p(),
|
|
6722
|
-
...
|
|
6723
|
+
...H
|
|
6723
6724
|
}
|
|
6724
6725
|
}))[0], ye = s.map((Te) => Te.id === Q ? {
|
|
6725
6726
|
...Te,
|
|
@@ -6854,21 +6855,21 @@ const Hc = (e) => {
|
|
|
6854
6855
|
const Se = Q.filter((ye) => !s.find((Te) => Te.id === ye));
|
|
6855
6856
|
try {
|
|
6856
6857
|
for (const ye of Se) {
|
|
6857
|
-
const Te = (await
|
|
6858
|
+
const Te = (await B.getHandler().readObjects({
|
|
6858
6859
|
model: L,
|
|
6859
6860
|
ids: [ye],
|
|
6860
6861
|
fields: o.get("form").fields,
|
|
6861
6862
|
context: {
|
|
6862
6863
|
...p == null ? void 0 : p(),
|
|
6863
|
-
...
|
|
6864
|
+
...H
|
|
6864
6865
|
}
|
|
6865
|
-
}))[0], Fe = (await
|
|
6866
|
+
}))[0], Fe = (await B.getHandler().readObjects({
|
|
6866
6867
|
model: L,
|
|
6867
6868
|
ids: [ye],
|
|
6868
6869
|
fields: o.get("tree").fields,
|
|
6869
6870
|
context: {
|
|
6870
6871
|
...p == null ? void 0 : p(),
|
|
6871
|
-
...
|
|
6872
|
+
...H
|
|
6872
6873
|
}
|
|
6873
6874
|
}))[0];
|
|
6874
6875
|
se.push({
|
|
@@ -6902,14 +6903,14 @@ const Hc = (e) => {
|
|
|
6902
6903
|
values: (se = X[u]) == null ? void 0 : se.values,
|
|
6903
6904
|
parentContext: {
|
|
6904
6905
|
...p == null ? void 0 : p(),
|
|
6905
|
-
...
|
|
6906
|
+
...H
|
|
6906
6907
|
},
|
|
6907
6908
|
model: L,
|
|
6908
6909
|
id: (Se = X[u]) == null ? void 0 : Se.id,
|
|
6909
6910
|
submitMode: "values",
|
|
6910
6911
|
onFieldsChange: (Fe) => {
|
|
6911
|
-
var
|
|
6912
|
-
const Oe = (
|
|
6912
|
+
var it;
|
|
6913
|
+
const Oe = (it = X[u]) == null ? void 0 : it.id, Ee = s.map((gt) => gt.id === Oe ? {
|
|
6913
6914
|
...gt,
|
|
6914
6915
|
operation: gt.operation === "original" ? "pendingUpdate" : gt.operation,
|
|
6915
6916
|
values: {
|
|
@@ -6950,7 +6951,7 @@ const Hc = (e) => {
|
|
|
6950
6951
|
onChangeSort: j,
|
|
6951
6952
|
context: {
|
|
6952
6953
|
...p == null ? void 0 : p(),
|
|
6953
|
-
...
|
|
6954
|
+
...H
|
|
6954
6955
|
},
|
|
6955
6956
|
colorsForResults: U,
|
|
6956
6957
|
readonly: W
|
|
@@ -6963,7 +6964,7 @@ const Hc = (e) => {
|
|
|
6963
6964
|
domain: Fe,
|
|
6964
6965
|
context: {
|
|
6965
6966
|
...p == null ? void 0 : p(),
|
|
6966
|
-
...
|
|
6967
|
+
...H
|
|
6967
6968
|
},
|
|
6968
6969
|
limit: 0
|
|
6969
6970
|
});
|
|
@@ -6976,7 +6977,7 @@ const Hc = (e) => {
|
|
|
6976
6977
|
type: "error",
|
|
6977
6978
|
banner: !0
|
|
6978
6979
|
});
|
|
6979
|
-
const
|
|
6980
|
+
const ot = k;
|
|
6980
6981
|
return b ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
|
|
6981
6982
|
children: [/* @__PURE__ */ n(Lc, {
|
|
6982
6983
|
mode: a,
|
|
@@ -7006,19 +7007,19 @@ const Hc = (e) => {
|
|
|
7006
7007
|
onSubmitSucceed: ke,
|
|
7007
7008
|
parentContext: {
|
|
7008
7009
|
...p == null ? void 0 : p(),
|
|
7009
|
-
...
|
|
7010
|
+
...H
|
|
7010
7011
|
},
|
|
7011
7012
|
onCancel: () => {
|
|
7012
7013
|
_(!1), C(!1);
|
|
7013
7014
|
},
|
|
7014
7015
|
readOnly: W,
|
|
7015
|
-
mustClearAfterSave:
|
|
7016
|
+
mustClearAfterSave: ot
|
|
7016
7017
|
}), /* @__PURE__ */ n(Vo, {
|
|
7017
7018
|
domain: N.current,
|
|
7018
7019
|
model: L,
|
|
7019
7020
|
context: {
|
|
7020
7021
|
...p == null ? void 0 : p(),
|
|
7021
|
-
...
|
|
7022
|
+
...H
|
|
7022
7023
|
},
|
|
7023
7024
|
visible: w,
|
|
7024
7025
|
onSelectValues: async (Q) => {
|
|
@@ -7029,7 +7030,7 @@ const Hc = (e) => {
|
|
|
7029
7030
|
}
|
|
7030
7031
|
})]
|
|
7031
7032
|
});
|
|
7032
|
-
},
|
|
7033
|
+
}, Hc = (e) => {
|
|
7033
7034
|
const {
|
|
7034
7035
|
ooui: t
|
|
7035
7036
|
} = e, {
|
|
@@ -7046,7 +7047,7 @@ const Hc = (e) => {
|
|
|
7046
7047
|
St(() => {
|
|
7047
7048
|
v();
|
|
7048
7049
|
}, [t]);
|
|
7049
|
-
const g = async (V) => o && o[V] ? o[V] : await
|
|
7050
|
+
const g = async (V) => o && o[V] ? o[V] : await B.getHandler().getView({
|
|
7050
7051
|
model: i,
|
|
7051
7052
|
type: V,
|
|
7052
7053
|
context: {
|
|
@@ -7093,7 +7094,7 @@ const Hc = (e) => {
|
|
|
7093
7094
|
throw new Error();
|
|
7094
7095
|
},
|
|
7095
7096
|
...e,
|
|
7096
|
-
children: /* @__PURE__ */ n(
|
|
7097
|
+
children: /* @__PURE__ */ n(Bc, {
|
|
7097
7098
|
ooui: t,
|
|
7098
7099
|
views: m
|
|
7099
7100
|
})
|
|
@@ -7101,7 +7102,7 @@ const Hc = (e) => {
|
|
|
7101
7102
|
});
|
|
7102
7103
|
}, {
|
|
7103
7104
|
useToken: jc
|
|
7104
|
-
} =
|
|
7105
|
+
} = Be, Kc = (e) => {
|
|
7105
7106
|
const {
|
|
7106
7107
|
ooui: t
|
|
7107
7108
|
} = e, {
|
|
@@ -7131,7 +7132,7 @@ const Hc = (e) => {
|
|
|
7131
7132
|
} : void 0, d = fe(), [f, c] = I(), m = Y(Ne), {
|
|
7132
7133
|
elementHasLostFocus: y
|
|
7133
7134
|
} = m || {};
|
|
7134
|
-
|
|
7135
|
+
ge(() => {
|
|
7135
7136
|
c(So(r));
|
|
7136
7137
|
}, [r]);
|
|
7137
7138
|
const p = (v) => {
|
|
@@ -7141,9 +7142,9 @@ const Hc = (e) => {
|
|
|
7141
7142
|
d.current = v.target.value, c(v.target.value);
|
|
7142
7143
|
}
|
|
7143
7144
|
async function g() {
|
|
7144
|
-
p(
|
|
7145
|
+
p(Hl(f)), await new Promise((v) => setTimeout(v, 300)), y == null || y();
|
|
7145
7146
|
}
|
|
7146
|
-
return /* @__PURE__ */ n(
|
|
7147
|
+
return /* @__PURE__ */ n(nt, {
|
|
7147
7148
|
value: f,
|
|
7148
7149
|
disabled: s,
|
|
7149
7150
|
className: "w-full",
|
|
@@ -7205,9 +7206,9 @@ function Uc(e) {
|
|
|
7205
7206
|
}
|
|
7206
7207
|
const {
|
|
7207
7208
|
useToken: Gc
|
|
7208
|
-
} =
|
|
7209
|
+
} = Be, {
|
|
7209
7210
|
TextArea: kn
|
|
7210
|
-
} =
|
|
7211
|
+
} = nt, qc = (e) => {
|
|
7211
7212
|
const {
|
|
7212
7213
|
ooui: t
|
|
7213
7214
|
} = e, {
|
|
@@ -7358,7 +7359,7 @@ const {
|
|
|
7358
7359
|
g.registersAmount === "selected" && (i == null ? void 0 : i.length) !== 0 && (v = [
|
|
7359
7360
|
["id", "in", i == null ? void 0 : i.map((b) => b.id)]
|
|
7360
7361
|
]);
|
|
7361
|
-
const { datas: O } = await
|
|
7362
|
+
const { datas: O } = await B.getHandler().exportData({
|
|
7362
7363
|
model: e,
|
|
7363
7364
|
fields: rd({
|
|
7364
7365
|
keys: g.selectedKeys,
|
|
@@ -7375,7 +7376,7 @@ const {
|
|
|
7375
7376
|
},
|
|
7376
7377
|
[r, e, o, s, t, a]
|
|
7377
7378
|
), f = Le(async () => {
|
|
7378
|
-
const g = await
|
|
7379
|
+
const g = await B.getHandler().getFields({
|
|
7379
7380
|
model: e,
|
|
7380
7381
|
context: t,
|
|
7381
7382
|
fields: []
|
|
@@ -7383,7 +7384,7 @@ const {
|
|
|
7383
7384
|
return l.current["/"] = g, kr({ fields: g });
|
|
7384
7385
|
}, [e, t, l]), c = Le(
|
|
7385
7386
|
async (g) => {
|
|
7386
|
-
const O = En(g, l.current)[Mn(g)], V = O.relation, b = await
|
|
7387
|
+
const O = En(g, l.current)[Mn(g)], V = O.relation, b = await B.getHandler().getFields({
|
|
7387
7388
|
model: V,
|
|
7388
7389
|
context: t,
|
|
7389
7390
|
fields: []
|
|
@@ -7420,7 +7421,7 @@ const {
|
|
|
7420
7421
|
};
|
|
7421
7422
|
}, [l.current]), y = Le(
|
|
7422
7423
|
async (g) => {
|
|
7423
|
-
const v = await h("ir.exports"), O = await h("ir.exports.line"), V = await
|
|
7424
|
+
const v = await h("ir.exports"), O = await h("ir.exports.line"), V = await B.getHandler().create({
|
|
7424
7425
|
model: "ir.exports",
|
|
7425
7426
|
values: {
|
|
7426
7427
|
name: g.name,
|
|
@@ -7430,7 +7431,7 @@ const {
|
|
|
7430
7431
|
context: t
|
|
7431
7432
|
});
|
|
7432
7433
|
return await Promise.all(
|
|
7433
|
-
g.fields.map(async (b) => await
|
|
7434
|
+
g.fields.map(async (b) => await B.getHandler().create({
|
|
7434
7435
|
model: "ir.exports.line",
|
|
7435
7436
|
values: {
|
|
7436
7437
|
name: b.key,
|
|
@@ -7444,7 +7445,7 @@ const {
|
|
|
7444
7445
|
[]
|
|
7445
7446
|
), p = Le(
|
|
7446
7447
|
async (g) => {
|
|
7447
|
-
await
|
|
7448
|
+
await B.getHandler().delete({
|
|
7448
7449
|
model: "ir.exports",
|
|
7449
7450
|
ids: [g.id]
|
|
7450
7451
|
});
|
|
@@ -7454,7 +7455,7 @@ const {
|
|
|
7454
7455
|
async (g) => {
|
|
7455
7456
|
if (u.current.has(g))
|
|
7456
7457
|
return u.current.get(g);
|
|
7457
|
-
const v =
|
|
7458
|
+
const v = B.getHandler().getFields({
|
|
7458
7459
|
model: g,
|
|
7459
7460
|
context: t,
|
|
7460
7461
|
fields: []
|
|
@@ -7505,11 +7506,11 @@ const {
|
|
|
7505
7506
|
model: e,
|
|
7506
7507
|
context: t
|
|
7507
7508
|
}) => {
|
|
7508
|
-
const r = await
|
|
7509
|
+
const r = await B.getHandler().search({
|
|
7509
7510
|
model: "ir.exports",
|
|
7510
7511
|
params: [["resource", "=", e]],
|
|
7511
7512
|
context: t
|
|
7512
|
-
}), i = r.flatMap((s) => s.export_fields), o = await
|
|
7513
|
+
}), i = r.flatMap((s) => s.export_fields), o = await B.getHandler().readObjects({
|
|
7513
7514
|
model: "ir.exports.line",
|
|
7514
7515
|
ids: i,
|
|
7515
7516
|
context: t
|
|
@@ -7736,9 +7737,9 @@ var Lo = { exports: {} };
|
|
|
7736
7737
|
try {
|
|
7737
7738
|
if (["x", "X"].indexOf(_) > -1)
|
|
7738
7739
|
return new Date((_ === "X" ? 1e3 : 1) * k);
|
|
7739
|
-
var F = p(_)(k), j = F.year, q = F.month, U = F.day, J = F.hours, W = F.minutes, L = F.seconds,
|
|
7740
|
+
var F = p(_)(k), j = F.year, q = F.month, U = F.day, J = F.hours, W = F.minutes, L = F.seconds, H = F.milliseconds, te = F.zone, Z = new Date(), ae = U || (j || q ? 1 : Z.getDate()), X = j || Z.getFullYear(), z = 0;
|
|
7740
7741
|
j && !q || (z = q > 0 ? q - 1 : Z.getMonth());
|
|
7741
|
-
var he = J || 0, xe = W || 0, $e = L || 0, Ve =
|
|
7742
|
+
var he = J || 0, xe = W || 0, $e = L || 0, Ve = H || 0;
|
|
7742
7743
|
return te ? new Date(Date.UTC(X, z, ae, he, xe, $e, Ve + 60 * te.offset * 1e3)) : N ? new Date(Date.UTC(X, z, ae, he, xe, $e, Ve)) : new Date(X, z, ae, he, xe, $e, Ve);
|
|
7743
7744
|
} catch {
|
|
7744
7745
|
return new Date("");
|
|
@@ -7800,7 +7801,7 @@ const cd = (e) => {
|
|
|
7800
7801
|
selectionValues: s,
|
|
7801
7802
|
readOnly: a
|
|
7802
7803
|
} = i, l = t == null ? void 0 : t.split(","), [u, d] = I([]), [f, c] = I();
|
|
7803
|
-
return
|
|
7804
|
+
return ge(() => {
|
|
7804
7805
|
if (!t) {
|
|
7805
7806
|
c(void 0), d([]);
|
|
7806
7807
|
return;
|
|
@@ -7848,7 +7849,7 @@ const cd = (e) => {
|
|
|
7848
7849
|
});
|
|
7849
7850
|
}, {
|
|
7850
7851
|
useToken: md
|
|
7851
|
-
} =
|
|
7852
|
+
} = Be, hd = (e) => {
|
|
7852
7853
|
const {
|
|
7853
7854
|
ooui: t
|
|
7854
7855
|
} = e, {
|
|
@@ -7912,7 +7913,7 @@ const cd = (e) => {
|
|
|
7912
7913
|
display: "none"
|
|
7913
7914
|
},
|
|
7914
7915
|
onChange: v
|
|
7915
|
-
}), /* @__PURE__ */ n(
|
|
7916
|
+
}), /* @__PURE__ */ n(nt, {
|
|
7916
7917
|
type: "text",
|
|
7917
7918
|
disabled: !0,
|
|
7918
7919
|
style: u,
|
|
@@ -7921,7 +7922,7 @@ const cd = (e) => {
|
|
|
7921
7922
|
}), /* @__PURE__ */ n(ce, {
|
|
7922
7923
|
children: /* @__PURE__ */ P(Ye, {
|
|
7923
7924
|
children: [/* @__PURE__ */ n(_e, {
|
|
7924
|
-
icon: /* @__PURE__ */ n(
|
|
7925
|
+
icon: /* @__PURE__ */ n(Bn, {}),
|
|
7925
7926
|
disabled: o,
|
|
7926
7927
|
onClick: () => {
|
|
7927
7928
|
d.current.click();
|
|
@@ -7936,7 +7937,7 @@ const cd = (e) => {
|
|
|
7936
7937
|
tooltip: m("download"),
|
|
7937
7938
|
disabled: !r,
|
|
7938
7939
|
onClick: h,
|
|
7939
|
-
icon: /* @__PURE__ */ n(
|
|
7940
|
+
icon: /* @__PURE__ */ n(Hn, {})
|
|
7940
7941
|
}), /* @__PURE__ */ n(Je, {
|
|
7941
7942
|
tooltip: m("clear"),
|
|
7942
7943
|
disabled: o || !r,
|
|
@@ -7948,12 +7949,12 @@ const cd = (e) => {
|
|
|
7948
7949
|
});
|
|
7949
7950
|
}, In = {
|
|
7950
7951
|
tree: /* @__PURE__ */ n(Gn, {}),
|
|
7951
|
-
form: /* @__PURE__ */ n(
|
|
7952
|
+
form: /* @__PURE__ */ n(Ht, {}),
|
|
7952
7953
|
graph: /* @__PURE__ */ n(Oi, {}),
|
|
7953
7954
|
calendar: /* @__PURE__ */ n(Ii, {})
|
|
7954
7955
|
};
|
|
7955
7956
|
function Mr(e) {
|
|
7956
|
-
return e ? (In == null ? void 0 : In[e.type]) || /* @__PURE__ */ n(
|
|
7957
|
+
return e ? (In == null ? void 0 : In[e.type]) || /* @__PURE__ */ n(Ht, {}) : /* @__PURE__ */ n(Ht, {});
|
|
7957
7958
|
}
|
|
7958
7959
|
function Qn(e) {
|
|
7959
7960
|
const {
|
|
@@ -7968,7 +7969,7 @@ function Qn(e) {
|
|
|
7968
7969
|
lang: u
|
|
7969
7970
|
} = Y(we);
|
|
7970
7971
|
function d() {
|
|
7971
|
-
const m = r.map((y, p) => /* @__PURE__ */ n(
|
|
7972
|
+
const m = r.map((y, p) => /* @__PURE__ */ n(He.Item, {
|
|
7972
7973
|
children: /* @__PURE__ */ P(Ce, {
|
|
7973
7974
|
wrap: !1,
|
|
7974
7975
|
children: [/* @__PURE__ */ n(ce, {
|
|
@@ -7993,9 +7994,9 @@ function Qn(e) {
|
|
|
7993
7994
|
})]
|
|
7994
7995
|
})
|
|
7995
7996
|
}, y.view_id || p));
|
|
7996
|
-
return /* @__PURE__ */ n(
|
|
7997
|
+
return /* @__PURE__ */ n(He, {
|
|
7997
7998
|
onClick: c,
|
|
7998
|
-
children: /* @__PURE__ */ n(
|
|
7999
|
+
children: /* @__PURE__ */ n(He.ItemGroup, {
|
|
7999
8000
|
title: l("viewAs"),
|
|
8000
8001
|
children: m
|
|
8001
8002
|
})
|
|
@@ -8066,12 +8067,12 @@ function Dt(e) {
|
|
|
8066
8067
|
disabled: a = !1
|
|
8067
8068
|
} = e;
|
|
8068
8069
|
function l() {
|
|
8069
|
-
const d = i == null ? void 0 : i.map((f, c) => f.name === "divider" ? /* @__PURE__ */ n(
|
|
8070
|
+
const d = i == null ? void 0 : i.map((f, c) => f.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + c) : /* @__PURE__ */ n(He.Item, {
|
|
8070
8071
|
children: f.name
|
|
8071
8072
|
}, f.id));
|
|
8072
|
-
return /* @__PURE__ */ n(
|
|
8073
|
+
return /* @__PURE__ */ n(He, {
|
|
8073
8074
|
onClick: u,
|
|
8074
|
-
children: /* @__PURE__ */ n(
|
|
8075
|
+
children: /* @__PURE__ */ n(He.ItemGroup, {
|
|
8075
8076
|
title: r,
|
|
8076
8077
|
children: d
|
|
8077
8078
|
})
|
|
@@ -8104,7 +8105,7 @@ function ze(e) {
|
|
|
8104
8105
|
tooltip: o,
|
|
8105
8106
|
onClick: t,
|
|
8106
8107
|
disabled: r,
|
|
8107
|
-
children: [i ? /* @__PURE__ */ n(
|
|
8108
|
+
children: [i ? /* @__PURE__ */ n(rt, {}) : s, a]
|
|
8108
8109
|
});
|
|
8109
8110
|
}
|
|
8110
8111
|
function No(e) {
|
|
@@ -8113,7 +8114,7 @@ function No(e) {
|
|
|
8113
8114
|
} = e, {
|
|
8114
8115
|
formHasChanges: r,
|
|
8115
8116
|
onNewClicked: i
|
|
8116
|
-
} = Y(
|
|
8117
|
+
} = Y(tt), {
|
|
8117
8118
|
t: o,
|
|
8118
8119
|
lang: s
|
|
8119
8120
|
} = Y(we), a = () => {
|
|
@@ -8154,7 +8155,7 @@ const {
|
|
|
8154
8155
|
});
|
|
8155
8156
|
};
|
|
8156
8157
|
async function Po(e, t, r) {
|
|
8157
|
-
const i = (await
|
|
8158
|
+
const i = (await B.getHandler().getLogInfo({
|
|
8158
8159
|
model: e,
|
|
8159
8160
|
ids: [t]
|
|
8160
8161
|
}))[0], {
|
|
@@ -8229,7 +8230,7 @@ const vd = (e) => {
|
|
|
8229
8230
|
children: [/* @__PURE__ */ n("li", {
|
|
8230
8231
|
className: "ant-dropdown-menu-item-divider"
|
|
8231
8232
|
}), i.map((d) => {
|
|
8232
|
-
const f = d.link ? Zr :
|
|
8233
|
+
const f = d.link ? Zr : Hn;
|
|
8233
8234
|
return /* @__PURE__ */ P(Ce, {
|
|
8234
8235
|
style: {
|
|
8235
8236
|
paddingTop: 4,
|
|
@@ -8263,7 +8264,7 @@ const vd = (e) => {
|
|
|
8263
8264
|
},
|
|
8264
8265
|
children: /* @__PURE__ */ n(ht, {
|
|
8265
8266
|
title: Ie("openAttachment", r),
|
|
8266
|
-
children: /* @__PURE__ */ n(
|
|
8267
|
+
children: /* @__PURE__ */ n(Ht, {
|
|
8267
8268
|
style: {
|
|
8268
8269
|
cursor: "pointer"
|
|
8269
8270
|
},
|
|
@@ -8287,12 +8288,12 @@ function bd(e) {
|
|
|
8287
8288
|
onViewAttachmentDetails: s
|
|
8288
8289
|
} = e, {
|
|
8289
8290
|
formRef: a
|
|
8290
|
-
} = Y(
|
|
8291
|
+
} = Y(tt), [l, u] = I(!1), [d, f] = I([]), [c, m] = I(!1), {
|
|
8291
8292
|
t: y
|
|
8292
8293
|
} = Y(we), p = Le(async () => {
|
|
8293
8294
|
u(!0);
|
|
8294
8295
|
try {
|
|
8295
|
-
const v = await
|
|
8296
|
+
const v = await B.getHandler().readObjects({
|
|
8296
8297
|
model: "ir.attachment",
|
|
8297
8298
|
ids: t.map((O) => O.id),
|
|
8298
8299
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
@@ -8316,7 +8317,7 @@ function bd(e) {
|
|
|
8316
8317
|
m(!0);
|
|
8317
8318
|
let O;
|
|
8318
8319
|
try {
|
|
8319
|
-
O = (await
|
|
8320
|
+
O = (await B.getHandler().readObjects({
|
|
8320
8321
|
model: "ir.attachment",
|
|
8321
8322
|
ids: [v.id],
|
|
8322
8323
|
context: a.current.getContext()
|
|
@@ -8333,7 +8334,7 @@ function bd(e) {
|
|
|
8333
8334
|
}, []), g = Le(async (v) => {
|
|
8334
8335
|
s(v);
|
|
8335
8336
|
}, []);
|
|
8336
|
-
return
|
|
8337
|
+
return ge(() => {
|
|
8337
8338
|
p();
|
|
8338
8339
|
}, [p]), /* @__PURE__ */ P(ne, {
|
|
8339
8340
|
children: [/* @__PURE__ */ n(vd, {
|
|
@@ -8384,7 +8385,7 @@ function xd({
|
|
|
8384
8385
|
previousView: D,
|
|
8385
8386
|
setPreviousView: E,
|
|
8386
8387
|
goToResourceId: x
|
|
8387
|
-
} = Y(
|
|
8388
|
+
} = Y(tt), {
|
|
8388
8389
|
t: C,
|
|
8389
8390
|
lang: w
|
|
8390
8391
|
} = Y(we), T = Y(Et), {
|
|
@@ -8434,14 +8435,14 @@ function xd({
|
|
|
8434
8435
|
}
|
|
8435
8436
|
async function q() {
|
|
8436
8437
|
try {
|
|
8437
|
-
y == null || y(!0), await
|
|
8438
|
+
y == null || y(!0), await B.getHandler().delete({
|
|
8438
8439
|
model: m,
|
|
8439
8440
|
ids: [l]
|
|
8440
8441
|
});
|
|
8441
8442
|
const L = u == null ? void 0 : u.filter((te) => te.id !== l);
|
|
8442
8443
|
v == null || v(L);
|
|
8443
|
-
let
|
|
8444
|
-
f > 0 && f <= u.length - 1 && (
|
|
8444
|
+
let H = 0;
|
|
8445
|
+
f > 0 && f <= u.length - 1 && (H = f - 1), L != null && L[H] ? (c == null || c(L == null ? void 0 : L[H].id), d == null || d(H)) : (c == null || c(void 0), d == null || d(void 0));
|
|
8445
8446
|
} catch (L) {
|
|
8446
8447
|
nn(JSON.stringify(L));
|
|
8447
8448
|
} finally {
|
|
@@ -8451,7 +8452,7 @@ function xd({
|
|
|
8451
8452
|
async function U() {
|
|
8452
8453
|
try {
|
|
8453
8454
|
g == null || g(!0);
|
|
8454
|
-
const L = await
|
|
8455
|
+
const L = await B.getHandler().duplicate({
|
|
8455
8456
|
id: l,
|
|
8456
8457
|
model: m,
|
|
8457
8458
|
context: b.current.getContext()
|
|
@@ -8562,14 +8563,14 @@ function xd({
|
|
|
8562
8563
|
onItemClick: async (L) => {
|
|
8563
8564
|
if (!L)
|
|
8564
8565
|
return;
|
|
8565
|
-
const
|
|
8566
|
+
const H = await Ft({
|
|
8566
8567
|
onFormSave: o
|
|
8567
8568
|
});
|
|
8568
|
-
!
|
|
8569
|
+
!H.succeed || W({
|
|
8569
8570
|
...L,
|
|
8570
8571
|
datas: {
|
|
8571
8572
|
...L.datas || {},
|
|
8572
|
-
ids: [
|
|
8573
|
+
ids: [H.currentId]
|
|
8573
8574
|
}
|
|
8574
8575
|
});
|
|
8575
8576
|
}
|
|
@@ -8598,15 +8599,15 @@ function xd({
|
|
|
8598
8599
|
});
|
|
8599
8600
|
if (!L.succeed)
|
|
8600
8601
|
return;
|
|
8601
|
-
const
|
|
8602
|
+
const H = L.currentId, te = m;
|
|
8602
8603
|
R({
|
|
8603
8604
|
model: "ir.attachment",
|
|
8604
8605
|
values: {
|
|
8605
|
-
selection_associated_object: `${te},${
|
|
8606
|
+
selection_associated_object: `${te},${H}`
|
|
8606
8607
|
},
|
|
8607
8608
|
forced_values: {
|
|
8608
8609
|
res_model: te,
|
|
8609
|
-
res_id:
|
|
8610
|
+
res_id: H
|
|
8610
8611
|
},
|
|
8611
8612
|
initialViewType: "form"
|
|
8612
8613
|
});
|
|
@@ -8617,10 +8618,10 @@ function xd({
|
|
|
8617
8618
|
});
|
|
8618
8619
|
if (!L.succeed)
|
|
8619
8620
|
return;
|
|
8620
|
-
const
|
|
8621
|
+
const H = L.currentId;
|
|
8621
8622
|
R({
|
|
8622
8623
|
model: "ir.attachment",
|
|
8623
|
-
domain: [["res_model", "=", `${m}`], ["res_id", "=", `${
|
|
8624
|
+
domain: [["res_model", "=", `${m}`], ["res_id", "=", `${H}`]],
|
|
8624
8625
|
initialViewType: "tree"
|
|
8625
8626
|
});
|
|
8626
8627
|
},
|
|
@@ -8655,7 +8656,7 @@ async function Ft({
|
|
|
8655
8656
|
}
|
|
8656
8657
|
const {
|
|
8657
8658
|
useToken: Cd
|
|
8658
|
-
} =
|
|
8659
|
+
} = Be, Bo = (e) => {
|
|
8659
8660
|
const {
|
|
8660
8661
|
ooui: t,
|
|
8661
8662
|
value: r,
|
|
@@ -8673,7 +8674,7 @@ const {
|
|
|
8673
8674
|
} : void 0, c = Y(Ne), {
|
|
8674
8675
|
elementHasLostFocus: m
|
|
8675
8676
|
} = c || {}, [y, p] = I(!1), [h, g] = I(!1);
|
|
8676
|
-
|
|
8677
|
+
ge(() => {
|
|
8677
8678
|
l && !y && g(!1), !r && !l && (p(!0), g(!0));
|
|
8678
8679
|
}, [y, l]);
|
|
8679
8680
|
const v = (O) => {
|
|
@@ -8708,7 +8709,7 @@ const {
|
|
|
8708
8709
|
})
|
|
8709
8710
|
}), /* @__PURE__ */ n(ce, {
|
|
8710
8711
|
flex: "auto",
|
|
8711
|
-
children: h ? /* @__PURE__ */ n(
|
|
8712
|
+
children: h ? /* @__PURE__ */ n(nt, {
|
|
8712
8713
|
style: {
|
|
8713
8714
|
borderTopLeftRadius: 0,
|
|
8714
8715
|
borderBottomLeftRadius: 0,
|
|
@@ -8740,7 +8741,7 @@ const {
|
|
|
8740
8741
|
return /* @__PURE__ */ n(ve, {
|
|
8741
8742
|
required: r,
|
|
8742
8743
|
...e,
|
|
8743
|
-
children: /* @__PURE__ */ n(
|
|
8744
|
+
children: /* @__PURE__ */ n(Bo, {
|
|
8744
8745
|
ooui: t,
|
|
8745
8746
|
valueValidator: (i) => i ? Yi(i) : !1
|
|
8746
8747
|
})
|
|
@@ -8754,7 +8755,7 @@ const {
|
|
|
8754
8755
|
return /* @__PURE__ */ n(ve, {
|
|
8755
8756
|
required: r,
|
|
8756
8757
|
...e,
|
|
8757
|
-
children: /* @__PURE__ */ n(
|
|
8758
|
+
children: /* @__PURE__ */ n(Bo, {
|
|
8758
8759
|
ooui: t,
|
|
8759
8760
|
linkPrefix: "mailto:",
|
|
8760
8761
|
valueValidator: (i) => i ? Wi(i) : !1
|
|
@@ -8831,8 +8832,8 @@ const {
|
|
|
8831
8832
|
});
|
|
8832
8833
|
}, {
|
|
8833
8834
|
useToken: Od
|
|
8834
|
-
} =
|
|
8835
|
-
function
|
|
8835
|
+
} = Be;
|
|
8836
|
+
function Ho(e) {
|
|
8836
8837
|
const {
|
|
8837
8838
|
badgeNumber: t = 0,
|
|
8838
8839
|
...r
|
|
@@ -8887,10 +8888,10 @@ function Id({
|
|
|
8887
8888
|
graphIsLoading: u,
|
|
8888
8889
|
previousView: d,
|
|
8889
8890
|
setPreviousView: f
|
|
8890
|
-
} = Y(
|
|
8891
|
+
} = Y(tt);
|
|
8891
8892
|
return /* @__PURE__ */ P(Ye, {
|
|
8892
8893
|
wrap: !0,
|
|
8893
|
-
children: [/* @__PURE__ */ n(
|
|
8894
|
+
children: [/* @__PURE__ */ n(Ho, {
|
|
8894
8895
|
icon: /* @__PURE__ */ n(eo, {
|
|
8895
8896
|
style: {
|
|
8896
8897
|
color: a ? "white" : void 0
|
|
@@ -8924,7 +8925,7 @@ function Id({
|
|
|
8924
8925
|
}
|
|
8925
8926
|
const {
|
|
8926
8927
|
useToken: _d
|
|
8927
|
-
} =
|
|
8928
|
+
} = Be, {
|
|
8928
8929
|
Title: Dd,
|
|
8929
8930
|
Text: Xt
|
|
8930
8931
|
} = an;
|
|
@@ -8940,7 +8941,7 @@ function yn(e) {
|
|
|
8940
8941
|
results: l,
|
|
8941
8942
|
totalItems: u,
|
|
8942
8943
|
selectedRowItems: d
|
|
8943
|
-
} = Y(
|
|
8944
|
+
} = Y(tt), {
|
|
8944
8945
|
t: f
|
|
8945
8946
|
} = Y(we), {
|
|
8946
8947
|
token: c
|
|
@@ -9027,7 +9028,7 @@ const Vd = (e) => {
|
|
|
9027
9028
|
domain: s,
|
|
9028
9029
|
formView: a,
|
|
9029
9030
|
treeView: l
|
|
9030
|
-
} = e, u = fe(), d = Y(
|
|
9031
|
+
} = e, u = fe(), d = Y(tt), {
|
|
9031
9032
|
setResults: f = void 0,
|
|
9032
9033
|
setCurrentItemIndex: c = void 0,
|
|
9033
9034
|
currentId: m = void 0,
|
|
@@ -9048,10 +9049,10 @@ const Vd = (e) => {
|
|
|
9048
9049
|
setSearchValues: T,
|
|
9049
9050
|
currentView: $
|
|
9050
9051
|
} = d || {}, [M, S] = I(!0);
|
|
9051
|
-
|
|
9052
|
+
ge(() => {
|
|
9052
9053
|
var j;
|
|
9053
9054
|
(j = u.current) == null || j.refresh();
|
|
9054
|
-
}, [C]),
|
|
9055
|
+
}, [C]), ge(() => {
|
|
9055
9056
|
t.view_id !== $.view_id && S(!0);
|
|
9056
9057
|
}, [$]);
|
|
9057
9058
|
const {
|
|
@@ -9165,7 +9166,7 @@ function Rd(e) {
|
|
|
9165
9166
|
function u(f) {
|
|
9166
9167
|
t(f.search);
|
|
9167
9168
|
}
|
|
9168
|
-
|
|
9169
|
+
ge(() => {
|
|
9169
9170
|
s.setFieldsValue({
|
|
9170
9171
|
search: i
|
|
9171
9172
|
});
|
|
@@ -9186,7 +9187,7 @@ function Rd(e) {
|
|
|
9186
9187
|
children: /* @__PURE__ */ n(st.Item, {
|
|
9187
9188
|
name: "search",
|
|
9188
9189
|
noStyle: !0,
|
|
9189
|
-
children: /* @__PURE__ */ n(
|
|
9190
|
+
children: /* @__PURE__ */ n(nt, {
|
|
9190
9191
|
autoFocus: !0,
|
|
9191
9192
|
disabled: r,
|
|
9192
9193
|
onChange: (f) => {
|
|
@@ -9250,7 +9251,7 @@ function Md(e) {
|
|
|
9250
9251
|
results: A,
|
|
9251
9252
|
limit: D,
|
|
9252
9253
|
totalItems: E
|
|
9253
|
-
} = Y(
|
|
9254
|
+
} = Y(tt), {
|
|
9254
9255
|
parentContext: x = {},
|
|
9255
9256
|
treeExpandable: C,
|
|
9256
9257
|
toolbar: w
|
|
@@ -9274,7 +9275,7 @@ function Md(e) {
|
|
|
9274
9275
|
async function j() {
|
|
9275
9276
|
var W;
|
|
9276
9277
|
try {
|
|
9277
|
-
s == null || s(!0), await
|
|
9278
|
+
s == null || s(!0), await B.getHandler().delete({
|
|
9278
9279
|
model: d,
|
|
9279
9280
|
ids: o.map((L) => L.id)
|
|
9280
9281
|
}), c == null || c(void 0), m == null || m(void 0), (W = f == null ? void 0 : f.current) == null || W.refreshResults();
|
|
@@ -9289,7 +9290,7 @@ function Md(e) {
|
|
|
9289
9290
|
try {
|
|
9290
9291
|
u == null || u(!0);
|
|
9291
9292
|
const L = o[0].id;
|
|
9292
|
-
await
|
|
9293
|
+
await B.getHandler().duplicate({
|
|
9293
9294
|
id: L,
|
|
9294
9295
|
model: d,
|
|
9295
9296
|
context: {
|
|
@@ -9332,7 +9333,7 @@ function Md(e) {
|
|
|
9332
9333
|
onSearch: (W) => {
|
|
9333
9334
|
W && W.trim().length > 0 ? g == null || g(W) : g == null || g(void 0);
|
|
9334
9335
|
}
|
|
9335
|
-
}), !C && /* @__PURE__ */ n(
|
|
9336
|
+
}), !C && /* @__PURE__ */ n(Ho, {
|
|
9336
9337
|
icon: /* @__PURE__ */ n(eo, {
|
|
9337
9338
|
style: {
|
|
9338
9339
|
color: p ? "white" : void 0
|
|
@@ -9449,8 +9450,8 @@ function Md(e) {
|
|
|
9449
9450
|
}],
|
|
9450
9451
|
onItemClick: (W) => {
|
|
9451
9452
|
if (W.id === "print_screen") {
|
|
9452
|
-
let L = (o == null ? void 0 : o.map((
|
|
9453
|
-
L.length === 0 && (L = (A == null ? void 0 : A.map((
|
|
9453
|
+
let L = (o == null ? void 0 : o.map((H) => H.id)) || [];
|
|
9454
|
+
L.length === 0 && (L = (A == null ? void 0 : A.map((H) => H.id)) || []), U({
|
|
9454
9455
|
id: -1,
|
|
9455
9456
|
model: d,
|
|
9456
9457
|
report_name: "printscreen.list",
|
|
@@ -9503,7 +9504,7 @@ const Ed = (e) => {
|
|
|
9503
9504
|
} = e, {
|
|
9504
9505
|
currentView: p,
|
|
9505
9506
|
setPreviousView: h
|
|
9506
|
-
} = Y(
|
|
9507
|
+
} = Y(tt);
|
|
9507
9508
|
return t ? /* @__PURE__ */ P(ne, {
|
|
9508
9509
|
children: [/* @__PURE__ */ n(yn, {
|
|
9509
9510
|
children: /* @__PURE__ */ n(Md, {
|
|
@@ -9620,7 +9621,7 @@ const Pd = (e) => {
|
|
|
9620
9621
|
})]
|
|
9621
9622
|
}) : null;
|
|
9622
9623
|
};
|
|
9623
|
-
async function
|
|
9624
|
+
async function Bd(e) {
|
|
9624
9625
|
const t = await Promise.all(
|
|
9625
9626
|
e.map(async (i) => {
|
|
9626
9627
|
try {
|
|
@@ -9635,7 +9636,7 @@ async function Hd(e) {
|
|
|
9635
9636
|
info: t[o]
|
|
9636
9637
|
})).filter((i) => i.info !== null);
|
|
9637
9638
|
}
|
|
9638
|
-
function
|
|
9639
|
+
function Hd(e, t) {
|
|
9639
9640
|
const {
|
|
9640
9641
|
domain: r,
|
|
9641
9642
|
model: i,
|
|
@@ -9653,7 +9654,7 @@ function Bd(e, t) {
|
|
|
9653
9654
|
treeExpandable: h = !1,
|
|
9654
9655
|
limit: g
|
|
9655
9656
|
} = e, [v, O] = I(), [V, b] = I([]), [A, D] = I(!0), E = m || void 0, [x, C] = I(E), [w, T] = I([]), [$, M] = I(), [S, R] = I([]), [k, _] = I(), [N, F] = I(0), [j, q] = I(!1), [U, J] = I(!1), [W, L] = I(), {
|
|
9656
|
-
t:
|
|
9657
|
+
t: H
|
|
9657
9658
|
} = Y(we), te = fe(), Z = fe(), ae = Y(lt), {
|
|
9658
9659
|
setCurrentView: X,
|
|
9659
9660
|
setCurrentId: z,
|
|
@@ -9681,7 +9682,7 @@ function Bd(e, t) {
|
|
|
9681
9682
|
const [me, Ue] = le;
|
|
9682
9683
|
Ue !== "dashboard" ? De.push({
|
|
9683
9684
|
viewTuple: le,
|
|
9684
|
-
promise:
|
|
9685
|
+
promise: B.getHandler().getView({
|
|
9685
9686
|
model: i,
|
|
9686
9687
|
type: Ue,
|
|
9687
9688
|
id: me,
|
|
@@ -9691,7 +9692,7 @@ function Bd(e, t) {
|
|
|
9691
9692
|
viewTuple: le
|
|
9692
9693
|
});
|
|
9693
9694
|
}
|
|
9694
|
-
const Ae = await
|
|
9695
|
+
const Ae = await Bd(De);
|
|
9695
9696
|
for (const le of Ae) {
|
|
9696
9697
|
if (!le)
|
|
9697
9698
|
continue;
|
|
@@ -9703,8 +9704,8 @@ function Bd(e, t) {
|
|
|
9703
9704
|
const [, Q] = Ke;
|
|
9704
9705
|
return Q === "form";
|
|
9705
9706
|
});
|
|
9706
|
-
let
|
|
9707
|
-
ue && (
|
|
9707
|
+
let ot;
|
|
9708
|
+
ue && (ot = {
|
|
9708
9709
|
action_id: y,
|
|
9709
9710
|
action_type: p,
|
|
9710
9711
|
name: a,
|
|
@@ -9717,7 +9718,7 @@ function Bd(e, t) {
|
|
|
9717
9718
|
id: o.active_id,
|
|
9718
9719
|
model: i,
|
|
9719
9720
|
context: o,
|
|
9720
|
-
configAction:
|
|
9721
|
+
configAction: ot
|
|
9721
9722
|
});
|
|
9722
9723
|
break;
|
|
9723
9724
|
}
|
|
@@ -9752,10 +9753,10 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9752
9753
|
l({
|
|
9753
9754
|
tabKey: u,
|
|
9754
9755
|
canWeClose: de
|
|
9755
|
-
}),
|
|
9756
|
+
}), ge(() => {
|
|
9756
9757
|
const ee = V.find((Ae) => Ae.type === "tree"), De = V.find((Ae) => d.id ? Ae.type === d.type && Ae.view_id === d.id : Ae.type === d.type);
|
|
9757
9758
|
We(De || ee), m ? z == null || z(E) : (Pe(void 0), M(void 0)), ie();
|
|
9758
|
-
}, [i, s, m]),
|
|
9759
|
+
}, [i, s, m]), ge(() => {
|
|
9759
9760
|
xe === u && (z == null || z(x), X == null || X(v));
|
|
9760
9761
|
}, [he, xe]);
|
|
9761
9762
|
async function de() {
|
|
@@ -9771,7 +9772,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9771
9772
|
let Ae;
|
|
9772
9773
|
if (De === -1) {
|
|
9773
9774
|
try {
|
|
9774
|
-
Ae = (le = await
|
|
9775
|
+
Ae = (le = await B.getHandler().readObjects({
|
|
9775
9776
|
model: i,
|
|
9776
9777
|
ids: [ee],
|
|
9777
9778
|
context: o
|
|
@@ -9779,7 +9780,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9779
9780
|
} catch {
|
|
9780
9781
|
}
|
|
9781
9782
|
if (!Ae) {
|
|
9782
|
-
J(!1), q(!1), dt(
|
|
9783
|
+
J(!1), q(!1), dt(H("idNotFound"));
|
|
9783
9784
|
return;
|
|
9784
9785
|
}
|
|
9785
9786
|
} else
|
|
@@ -9898,20 +9899,20 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9898
9899
|
})]
|
|
9899
9900
|
}) : null;
|
|
9900
9901
|
}
|
|
9901
|
-
const jo = bt(
|
|
9902
|
+
const jo = bt(Hd);
|
|
9902
9903
|
async function jd({
|
|
9903
9904
|
actionId: e,
|
|
9904
9905
|
rootContext: t = {},
|
|
9905
9906
|
globalValues: r = {}
|
|
9906
9907
|
}) {
|
|
9907
|
-
const i = "ir.actions.act_window", o = `${i},${e}`, s = await
|
|
9908
|
+
const i = "ir.actions.act_window", o = `${i},${e}`, s = await B.getHandler().getActionData({
|
|
9908
9909
|
action: o,
|
|
9909
9910
|
context: t
|
|
9910
9911
|
}), a = wt({
|
|
9911
9912
|
context: s.context,
|
|
9912
9913
|
values: r,
|
|
9913
9914
|
fields: {}
|
|
9914
|
-
}), l = s.domain ? await
|
|
9915
|
+
}), l = s.domain ? await B.getHandler().evalDomain({
|
|
9915
9916
|
domain: s.domain,
|
|
9916
9917
|
values: r,
|
|
9917
9918
|
context: { ...t, ...a }
|
|
@@ -9927,7 +9928,7 @@ async function jd({
|
|
|
9927
9928
|
if (V)
|
|
9928
9929
|
p.push(O);
|
|
9929
9930
|
else {
|
|
9930
|
-
const { view_id: A } = await
|
|
9931
|
+
const { view_id: A } = await B.getHandler().getView({
|
|
9931
9932
|
model: u,
|
|
9932
9933
|
type: b,
|
|
9933
9934
|
id: V,
|
|
@@ -9989,7 +9990,7 @@ const Kd = zi(Ji), Yd = (e) => {
|
|
|
9989
9990
|
});
|
|
9990
9991
|
}, {
|
|
9991
9992
|
useToken: Wd
|
|
9992
|
-
} =
|
|
9993
|
+
} = Be, {
|
|
9993
9994
|
Text: Ud
|
|
9994
9995
|
} = an, Gd = (e) => {
|
|
9995
9996
|
const {
|
|
@@ -10070,7 +10071,7 @@ function zd(e) {
|
|
|
10070
10071
|
totalItems: $e,
|
|
10071
10072
|
results: Ve,
|
|
10072
10073
|
attrsEvaluated: Pe
|
|
10073
|
-
} = await
|
|
10074
|
+
} = await B.getHandler().searchForTree({
|
|
10074
10075
|
params: he,
|
|
10075
10076
|
limit: D.current,
|
|
10076
10077
|
offset: b,
|
|
@@ -10100,10 +10101,10 @@ function zd(e) {
|
|
|
10100
10101
|
_(JSON.stringify(z));
|
|
10101
10102
|
}
|
|
10102
10103
|
};
|
|
10103
|
-
|
|
10104
|
+
ge(() => {
|
|
10104
10105
|
!f || a && L();
|
|
10105
10106
|
}, [O, b, f, a]);
|
|
10106
|
-
const
|
|
10107
|
+
const H = async (z) => {
|
|
10107
10108
|
c(!1), d(!0), F(void 0);
|
|
10108
10109
|
try {
|
|
10109
10110
|
z === "action" ? await te() : await Z(), c(!0);
|
|
@@ -10113,20 +10114,20 @@ function zd(e) {
|
|
|
10113
10114
|
d(!1);
|
|
10114
10115
|
}
|
|
10115
10116
|
}, te = async () => {
|
|
10116
|
-
const z = await
|
|
10117
|
+
const z = await B.getHandler().getViewsForAction({
|
|
10117
10118
|
action: t,
|
|
10118
10119
|
context: l
|
|
10119
10120
|
});
|
|
10120
10121
|
U.current = z.domain, v(z.views.get("form")), h(z.views.get("tree")), y(z.model), D.current = z.limit;
|
|
10121
10122
|
}, Z = async () => {
|
|
10122
10123
|
y(r);
|
|
10123
|
-
const z = await
|
|
10124
|
+
const z = await B.getHandler().getView({
|
|
10124
10125
|
model: r,
|
|
10125
10126
|
type: "form",
|
|
10126
10127
|
context: l
|
|
10127
10128
|
});
|
|
10128
10129
|
v(z);
|
|
10129
|
-
const he = await
|
|
10130
|
+
const he = await B.getHandler().getView({
|
|
10130
10131
|
model: r,
|
|
10131
10132
|
type: "tree",
|
|
10132
10133
|
id: i,
|
|
@@ -10134,8 +10135,8 @@ function zd(e) {
|
|
|
10134
10135
|
});
|
|
10135
10136
|
h(he);
|
|
10136
10137
|
};
|
|
10137
|
-
|
|
10138
|
-
t ?
|
|
10138
|
+
ge(() => {
|
|
10139
|
+
t ? H("action") : r && H("model");
|
|
10139
10140
|
}, [t, r]);
|
|
10140
10141
|
const ae = (z) => {
|
|
10141
10142
|
const {
|
|
@@ -10197,11 +10198,11 @@ const Jd = (e) => {
|
|
|
10197
10198
|
const {
|
|
10198
10199
|
model: t
|
|
10199
10200
|
} = e, [r, i] = I();
|
|
10200
|
-
|
|
10201
|
+
ge(() => {
|
|
10201
10202
|
o();
|
|
10202
10203
|
}, [t]);
|
|
10203
10204
|
async function o() {
|
|
10204
|
-
const s = await
|
|
10205
|
+
const s = await B.getHandler().search({
|
|
10205
10206
|
params: [],
|
|
10206
10207
|
model: t,
|
|
10207
10208
|
limit: 1
|
|
@@ -10232,7 +10233,7 @@ function Zd(e, t) {
|
|
|
10232
10233
|
openAction: y,
|
|
10233
10234
|
moveItemsEnabled: p
|
|
10234
10235
|
} = Y(er), h = fe(), g = fe();
|
|
10235
|
-
|
|
10236
|
+
ge(() => {
|
|
10236
10237
|
v();
|
|
10237
10238
|
}, [r, o, i]), xt(t, () => ({
|
|
10238
10239
|
refresh: () => {
|
|
@@ -10256,7 +10257,7 @@ function Zd(e, t) {
|
|
|
10256
10257
|
}
|
|
10257
10258
|
}
|
|
10258
10259
|
async function O() {
|
|
10259
|
-
return await
|
|
10260
|
+
return await B.getHandler().getView({
|
|
10260
10261
|
model: r,
|
|
10261
10262
|
type: "form",
|
|
10262
10263
|
context: i
|
|
@@ -10267,7 +10268,7 @@ function Zd(e, t) {
|
|
|
10267
10268
|
model: C,
|
|
10268
10269
|
context: w
|
|
10269
10270
|
}) {
|
|
10270
|
-
h.current = (await
|
|
10271
|
+
h.current = (await B.getHandler().getView({
|
|
10271
10272
|
model: C,
|
|
10272
10273
|
type: "form",
|
|
10273
10274
|
context: w
|
|
@@ -10287,7 +10288,7 @@ function Zd(e, t) {
|
|
|
10287
10288
|
return T;
|
|
10288
10289
|
}
|
|
10289
10290
|
async function b(x) {
|
|
10290
|
-
return (await
|
|
10291
|
+
return (await B.getHandler().readObjects({
|
|
10291
10292
|
model: r,
|
|
10292
10293
|
ids: [o],
|
|
10293
10294
|
fields: x.fields,
|
|
@@ -10348,7 +10349,7 @@ function Zd(e, t) {
|
|
|
10348
10349
|
fields: h.current,
|
|
10349
10350
|
items: T
|
|
10350
10351
|
};
|
|
10351
|
-
await
|
|
10352
|
+
await B.getHandler().update({
|
|
10352
10353
|
model: r,
|
|
10353
10354
|
id: o,
|
|
10354
10355
|
values: {
|
|
@@ -10366,7 +10367,7 @@ function Zd(e, t) {
|
|
|
10366
10367
|
message: f,
|
|
10367
10368
|
type: "error",
|
|
10368
10369
|
banner: !0
|
|
10369
|
-
})) : u ? /* @__PURE__ */ n(
|
|
10370
|
+
})) : u ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Yd, {
|
|
10370
10371
|
onPositionItemsChanged: D,
|
|
10371
10372
|
children: a.map((x, C) => {
|
|
10372
10373
|
const {
|
|
@@ -10461,7 +10462,7 @@ function Zd(e, t) {
|
|
|
10461
10462
|
limit: J
|
|
10462
10463
|
});
|
|
10463
10464
|
}
|
|
10464
|
-
let
|
|
10465
|
+
let H;
|
|
10465
10466
|
const te = N.find((Z) => {
|
|
10466
10467
|
const [, ae] = Z;
|
|
10467
10468
|
return ae === "tree";
|
|
@@ -10473,7 +10474,7 @@ function Zd(e, t) {
|
|
|
10473
10474
|
title: he,
|
|
10474
10475
|
model: xe
|
|
10475
10476
|
} = w;
|
|
10476
|
-
|
|
10477
|
+
H = {
|
|
10477
10478
|
action_id: X,
|
|
10478
10479
|
action_type: z,
|
|
10479
10480
|
name: he,
|
|
@@ -10487,7 +10488,7 @@ function Zd(e, t) {
|
|
|
10487
10488
|
id: M,
|
|
10488
10489
|
title: _,
|
|
10489
10490
|
parms: W,
|
|
10490
|
-
action:
|
|
10491
|
+
action: H,
|
|
10491
10492
|
openAction: y,
|
|
10492
10493
|
children: L
|
|
10493
10494
|
}, M);
|
|
@@ -10533,7 +10534,7 @@ const Xd = bt(Zd), Qd = (e) => {
|
|
|
10533
10534
|
c(!0);
|
|
10534
10535
|
let x = [];
|
|
10535
10536
|
if (r.domain) {
|
|
10536
|
-
const C = await
|
|
10537
|
+
const C = await B.getHandler().evalDomain({
|
|
10537
10538
|
domain: r.domain,
|
|
10538
10539
|
values: Mt({
|
|
10539
10540
|
fields: v == null ? void 0 : v.getFields(),
|
|
@@ -10545,7 +10546,7 @@ const Xd = bt(Zd), Qd = (e) => {
|
|
|
10545
10546
|
x = [...x, ...C];
|
|
10546
10547
|
}
|
|
10547
10548
|
try {
|
|
10548
|
-
const w = (await
|
|
10549
|
+
const w = (await B.getHandler().search({
|
|
10549
10550
|
model: m,
|
|
10550
10551
|
params: x,
|
|
10551
10552
|
fields: [h],
|
|
@@ -10597,7 +10598,7 @@ const Xd = bt(Zd), Qd = (e) => {
|
|
|
10597
10598
|
return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(ne, {
|
|
10598
10599
|
children: /* @__PURE__ */ P("div", {
|
|
10599
10600
|
className: "flex flex-row",
|
|
10600
|
-
children: [/* @__PURE__ */ n(
|
|
10601
|
+
children: [/* @__PURE__ */ n(Bt.Group, {
|
|
10601
10602
|
value: a.length ? s : [],
|
|
10602
10603
|
disabled: p,
|
|
10603
10604
|
onChange: E,
|
|
@@ -10607,7 +10608,7 @@ const Xd = bt(Zd), Qd = (e) => {
|
|
|
10607
10608
|
children: /* @__PURE__ */ n(Ce, {
|
|
10608
10609
|
children: a.map((x) => /* @__PURE__ */ n(ce, {
|
|
10609
10610
|
span: Math.floor(24 / g),
|
|
10610
|
-
children: /* @__PURE__ */ n(
|
|
10611
|
+
children: /* @__PURE__ */ n(Bt, {
|
|
10611
10612
|
value: x.value,
|
|
10612
10613
|
children: x.label
|
|
10613
10614
|
})
|
|
@@ -10819,7 +10820,7 @@ function mu(e, t) {
|
|
|
10819
10820
|
res_id: x,
|
|
10820
10821
|
domain: C = []
|
|
10821
10822
|
}) {
|
|
10822
|
-
const w = await
|
|
10823
|
+
const w = await B.getHandler().getActionData({
|
|
10823
10824
|
action: b,
|
|
10824
10825
|
context: o
|
|
10825
10826
|
});
|
|
@@ -10831,7 +10832,7 @@ function mu(e, t) {
|
|
|
10831
10832
|
context: w.context,
|
|
10832
10833
|
values: i,
|
|
10833
10834
|
fields: {}
|
|
10834
|
-
}), R = w.domain ? await
|
|
10835
|
+
}), R = w.domain ? await B.getHandler().evalDomain({
|
|
10835
10836
|
domain: w.domain,
|
|
10836
10837
|
values: i,
|
|
10837
10838
|
context: {
|
|
@@ -10847,18 +10848,18 @@ function mu(e, t) {
|
|
|
10847
10848
|
limit: q
|
|
10848
10849
|
} = w, U = j === "tree", J = [];
|
|
10849
10850
|
for (const L of _) {
|
|
10850
|
-
const [
|
|
10851
|
-
if (
|
|
10851
|
+
const [H, te] = L;
|
|
10852
|
+
if (H)
|
|
10852
10853
|
J.push(L);
|
|
10853
10854
|
else if (te === "dashboard")
|
|
10854
10855
|
J.push([void 0, "dashboard"]);
|
|
10855
10856
|
else {
|
|
10856
10857
|
const {
|
|
10857
10858
|
view_id: Z
|
|
10858
|
-
} = await
|
|
10859
|
+
} = await B.getHandler().getView({
|
|
10859
10860
|
model: k,
|
|
10860
10861
|
type: te,
|
|
10861
|
-
id:
|
|
10862
|
+
id: H,
|
|
10862
10863
|
context: {
|
|
10863
10864
|
...o,
|
|
10864
10865
|
...S
|
|
@@ -10869,16 +10870,16 @@ function mu(e, t) {
|
|
|
10869
10870
|
}
|
|
10870
10871
|
let W;
|
|
10871
10872
|
if (E) {
|
|
10872
|
-
const [L,
|
|
10873
|
+
const [L, H] = J.find(([te, Z]) => Z === E);
|
|
10873
10874
|
W = {
|
|
10874
10875
|
id: L,
|
|
10875
|
-
type:
|
|
10876
|
+
type: H
|
|
10876
10877
|
};
|
|
10877
10878
|
} else {
|
|
10878
|
-
const [L,
|
|
10879
|
+
const [L, H] = J[0];
|
|
10879
10880
|
W = {
|
|
10880
10881
|
id: L,
|
|
10881
|
-
type:
|
|
10882
|
+
type: H
|
|
10882
10883
|
};
|
|
10883
10884
|
}
|
|
10884
10885
|
V({
|
|
@@ -10941,7 +10942,7 @@ function mu(e, t) {
|
|
|
10941
10942
|
...i
|
|
10942
10943
|
},
|
|
10943
10944
|
fields: A
|
|
10944
|
-
}), j = T ? await
|
|
10945
|
+
}), j = T ? await B.getHandler().evalDomain({
|
|
10945
10946
|
domain: T,
|
|
10946
10947
|
values: Mt({
|
|
10947
10948
|
fields: A,
|
|
@@ -10978,14 +10979,14 @@ function mu(e, t) {
|
|
|
10978
10979
|
action_type: D,
|
|
10979
10980
|
res_id: E,
|
|
10980
10981
|
view_id: x
|
|
10981
|
-
} = b, C = `${D},${A}`, w = await
|
|
10982
|
+
} = b, C = `${D},${A}`, w = await B.getHandler().getActionData({
|
|
10982
10983
|
action: C,
|
|
10983
10984
|
context: o
|
|
10984
10985
|
}), T = wt({
|
|
10985
10986
|
context: w.context,
|
|
10986
10987
|
values: i,
|
|
10987
10988
|
fields: {}
|
|
10988
|
-
}), $ = w.domain ? await
|
|
10989
|
+
}), $ = w.domain ? await B.getHandler().evalDomain({
|
|
10989
10990
|
domain: w.domain,
|
|
10990
10991
|
values: i,
|
|
10991
10992
|
context: {
|
|
@@ -11001,24 +11002,24 @@ function mu(e, t) {
|
|
|
11001
11002
|
limit: N
|
|
11002
11003
|
} = w, F = _ === "tree", j = [];
|
|
11003
11004
|
for (const W of S) {
|
|
11004
|
-
const [L,
|
|
11005
|
+
const [L, H] = W;
|
|
11005
11006
|
if (L)
|
|
11006
11007
|
j.push(W);
|
|
11007
|
-
else if (
|
|
11008
|
+
else if (H === "dashboard")
|
|
11008
11009
|
j.push([void 0, "dashboard"]);
|
|
11009
11010
|
else {
|
|
11010
11011
|
const {
|
|
11011
11012
|
view_id: te
|
|
11012
|
-
} = await
|
|
11013
|
+
} = await B.getHandler().getView({
|
|
11013
11014
|
model: M,
|
|
11014
|
-
type:
|
|
11015
|
+
type: H,
|
|
11015
11016
|
id: L,
|
|
11016
11017
|
context: {
|
|
11017
11018
|
...o,
|
|
11018
11019
|
...T
|
|
11019
11020
|
}
|
|
11020
11021
|
});
|
|
11021
|
-
j.push([te,
|
|
11022
|
+
j.push([te, H]);
|
|
11022
11023
|
}
|
|
11023
11024
|
}
|
|
11024
11025
|
let q, U;
|
|
@@ -11057,7 +11058,7 @@ function mu(e, t) {
|
|
|
11057
11058
|
res_id: x,
|
|
11058
11059
|
domain: C
|
|
11059
11060
|
}) {
|
|
11060
|
-
const w = await
|
|
11061
|
+
const w = await B.getHandler().getActionStringForModel(b);
|
|
11061
11062
|
await p({
|
|
11062
11063
|
action: w,
|
|
11063
11064
|
values: A,
|
|
@@ -11085,7 +11086,7 @@ function mu(e, t) {
|
|
|
11085
11086
|
}) {
|
|
11086
11087
|
const N = to();
|
|
11087
11088
|
if (C !== "current") {
|
|
11088
|
-
const F = await
|
|
11089
|
+
const F = await B.getHandler().getView({
|
|
11089
11090
|
model: D,
|
|
11090
11091
|
type: "form",
|
|
11091
11092
|
id: w.type === "form" ? w.id : void 0,
|
|
@@ -11170,7 +11171,7 @@ function mu(e, t) {
|
|
|
11170
11171
|
}
|
|
11171
11172
|
const Yu = bt(mu), {
|
|
11172
11173
|
useToken: hu
|
|
11173
|
-
} =
|
|
11174
|
+
} = Be;
|
|
11174
11175
|
function pu(e) {
|
|
11175
11176
|
const {
|
|
11176
11177
|
label: t,
|
|
@@ -11278,7 +11279,7 @@ function Uu() {
|
|
|
11278
11279
|
}
|
|
11279
11280
|
const {
|
|
11280
11281
|
useToken: vu
|
|
11281
|
-
} =
|
|
11282
|
+
} = Be, Gu = (e) => {
|
|
11282
11283
|
const {
|
|
11283
11284
|
onRetrieveShortcuts: t,
|
|
11284
11285
|
onCheckIsFavourite: r,
|
|
@@ -11296,9 +11297,9 @@ const {
|
|
|
11296
11297
|
currentId: D,
|
|
11297
11298
|
openDefaultActionForModel: E
|
|
11298
11299
|
} = v || {};
|
|
11299
|
-
|
|
11300
|
+
ge(() => {
|
|
11300
11301
|
x();
|
|
11301
|
-
}, []),
|
|
11302
|
+
}, []), ge(() => {
|
|
11302
11303
|
T();
|
|
11303
11304
|
}, [V, b, A, D]);
|
|
11304
11305
|
async function x() {
|
|
@@ -11348,7 +11349,7 @@ const {
|
|
|
11348
11349
|
model: "ir.ui.view_sc"
|
|
11349
11350
|
});
|
|
11350
11351
|
}
|
|
11351
|
-
const M = /* @__PURE__ */ P(
|
|
11352
|
+
const M = /* @__PURE__ */ P(He, {
|
|
11352
11353
|
onClick: C,
|
|
11353
11354
|
children: [/* @__PURE__ */ P("div", {
|
|
11354
11355
|
style: {
|
|
@@ -11378,12 +11379,12 @@ const {
|
|
|
11378
11379
|
})
|
|
11379
11380
|
})
|
|
11380
11381
|
})]
|
|
11381
|
-
}), /* @__PURE__ */ n(
|
|
11382
|
+
}), /* @__PURE__ */ n(He.Divider, {}), c ? /* @__PURE__ */ n(Me, {
|
|
11382
11383
|
style: {
|
|
11383
11384
|
padding: "1rem"
|
|
11384
11385
|
}
|
|
11385
11386
|
}) : d.length > 0 ? /* @__PURE__ */ n(ne, {
|
|
11386
|
-
children: d.map((k) => /* @__PURE__ */ n(
|
|
11387
|
+
children: d.map((k) => /* @__PURE__ */ n(He.Item, {
|
|
11387
11388
|
children: /* @__PURE__ */ n(S, {
|
|
11388
11389
|
title: k.name,
|
|
11389
11390
|
type: k.view_type
|
|
@@ -11409,7 +11410,7 @@ const {
|
|
|
11409
11410
|
style: {
|
|
11410
11411
|
paddingRight: 20
|
|
11411
11412
|
},
|
|
11412
|
-
children: _ === "tree" ? /* @__PURE__ */ n(Gn, {}) : /* @__PURE__ */ n(
|
|
11413
|
+
children: _ === "tree" ? /* @__PURE__ */ n(Gn, {}) : /* @__PURE__ */ n(Ht, {})
|
|
11413
11414
|
}), /* @__PURE__ */ n(ce, {
|
|
11414
11415
|
flex: "auto",
|
|
11415
11416
|
children: k
|
|
@@ -11483,7 +11484,7 @@ export {
|
|
|
11483
11484
|
io as Char,
|
|
11484
11485
|
cu as CodeEditor,
|
|
11485
11486
|
kd as ConfigContext,
|
|
11486
|
-
|
|
11487
|
+
B as ConnectionProvider,
|
|
11487
11488
|
bl as ContentRootProvider,
|
|
11488
11489
|
Uu as CurrentTabContent,
|
|
11489
11490
|
Xd as Dashboard,
|
|
@@ -11507,7 +11508,7 @@ export {
|
|
|
11507
11508
|
tu as Markdown,
|
|
11508
11509
|
Qd as MultiCheckbox,
|
|
11509
11510
|
Uc as Notebook,
|
|
11510
|
-
|
|
11511
|
+
Hc as One2many,
|
|
11511
11512
|
jl as ProgressBar,
|
|
11512
11513
|
ru as Radio,
|
|
11513
11514
|
ud as Reference,
|