@gisce/react-ooui 2.6.0-alpha.10 → 2.6.0-alpha.11
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
|
@@ -4,11 +4,11 @@ var ar = (e, t, n) => (ai(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
|
4
4
|
import { jsxs as D, jsx as o, Fragment as ne } from "react/jsx-runtime";
|
|
5
5
|
import Je, { useContext as ee, useState as v, useEffect as le, useRef as re, createContext as li, forwardRef as ct, useImperativeHandle as dt, useCallback as z, Fragment as Mr, useMemo as Ce, memo as $n } from "react";
|
|
6
6
|
import { Tooltip as mt, theme as Pe, Typography as It, Form as nt, Row as Te, Col as de, Modal as Ge, Button as _e, Dropdown as ci, Menu as lr, Spin as Ne, Divider as cn, Space as Le, Input as Ze, Select as bt, Checkbox as Nt, Alert as qe, Timeline as _n, Statistic as di, Card as Hn, Tag as Pr, message as Tn, DatePicker as Bn, TimePicker as ui, InputNumber as Nr, Progress as fi, Avatar as Lr, Pagination as mi, Badge as hi, Tabs as $r, Radio as cr, Switch as pi, Steps as dr, Layout as gi } from "antd";
|
|
7
|
-
import { Label as Ot, Field as Vn, Tree as yi, Reference as wi, Selection as Kn, Many2one as Hr, Boolean as vi, Container as bi, parseContext as yt, Form as Ci, Integer as An, SearchFieldTypes as ft, SearchFilter as xi, parseContextFields as Si, parseDomainFields as Ti, transformDomainForChildWidget as Br, graphProcessor as Kr, parseGraph as
|
|
7
|
+
import { Label as Ot, Field as Vn, Tree as yi, Reference as wi, Selection as Kn, Many2one as Hr, Boolean as vi, Container as bi, parseContext as yt, Form as Ci, Integer as An, SearchFieldTypes as ft, SearchFilter as xi, parseContextFields as Si, parseDomainFields as Ti, transformDomainForChildWidget as Br, graphProcessor as Kr, parseGraph as Wr, graphFieldUtils as Fi } from "@gisce/ooui";
|
|
8
8
|
import * as ur from "@ant-design/icons";
|
|
9
|
-
import
|
|
9
|
+
import jr, { QuestionCircleOutlined as Ur, ExclamationCircleOutlined as ht, LoadingOutlined as et, DownOutlined as dn, WarningOutlined as Gr, CloseOutlined as Wt, CheckOutlined as jt, TranslationOutlined as Yr, FolderOpenOutlined as Wn, DownloadOutlined as jn, ClearOutlined as Un, StarFilled as Ri, StarOutlined as Ii, UpOutlined as Oi, SearchOutlined as Gn, ThunderboltOutlined as Yn, PrinterOutlined as qn, EnterOutlined as qr, PlusSquareOutlined as _i, MinusSquareOutlined as Vi, FileAddOutlined as un, AlignLeftOutlined as Ai, ApiOutlined as Di, DeleteOutlined as zn, LeftOutlined as zr, RightOutlined as Jr, EyeOutlined as Ei, FormOutlined as Lt, TableOutlined as Jn, AreaChartOutlined as ki, CalendarOutlined as Mi, LinkOutlined as fr, SaveOutlined as Pi, CopyOutlined as Xn, InfoCircleOutlined as Xr, ReloadOutlined as fn, EditOutlined as Qr, FilterOutlined as Zr, CloseCircleFilled as Ni, BorderOuterOutlined as Li, SettingOutlined as $i, ExportOutlined as Hi } from "@ant-design/icons";
|
|
10
10
|
import { Interweave as Qn } from "interweave";
|
|
11
|
-
import { useLocale as ue, Many2OneSuffix as Bi, Many2OneSuffixModal as mr, FieldSet as Ki, ExportModal as
|
|
11
|
+
import { useLocale as ue, Many2OneSuffix as Bi, Many2OneSuffixModal as mr, FieldSet as Ki, ExportModal as Wi, Dropdown as eo, DropdownButton as Ft, FormigaConfigProvider as ji, mergeStrings as Ui, HTMLPreview as Gi, FavouriteButton as Yi } from "@gisce/react-formiga-components";
|
|
12
12
|
import * as hr from "@tabler/icons-react";
|
|
13
13
|
import qi from "antd/lib/input/TextArea";
|
|
14
14
|
import _t from "styled-components";
|
|
@@ -292,7 +292,7 @@ function yr(e, t) {
|
|
|
292
292
|
size: ((l = t == null ? void 0 : t.style) == null ? void 0 : l.fontSize) || 17
|
|
293
293
|
});
|
|
294
294
|
};
|
|
295
|
-
return () => Je.createElement(
|
|
295
|
+
return () => Je.createElement(jr, {
|
|
296
296
|
component: s,
|
|
297
297
|
...t
|
|
298
298
|
});
|
|
@@ -495,7 +495,7 @@ const Tt = class Tt {
|
|
|
495
495
|
}
|
|
496
496
|
};
|
|
497
497
|
ar(Tt, "handler");
|
|
498
|
-
let
|
|
498
|
+
let k = Tt;
|
|
499
499
|
const oo = (e) => {
|
|
500
500
|
let t, n, i;
|
|
501
501
|
if (typeof e == "string" && e.indexOf(" -- ") !== -1 && e.indexOf(`
|
|
@@ -538,7 +538,7 @@ const oo = (e) => {
|
|
|
538
538
|
m(!1);
|
|
539
539
|
}
|
|
540
540
|
async function x() {
|
|
541
|
-
const S = (await
|
|
541
|
+
const S = (await k.getHandler().search({
|
|
542
542
|
params: [["translatable", "=", "1"]],
|
|
543
543
|
fieldsToRetrieve: ["code", "name"],
|
|
544
544
|
model: "res.lang"
|
|
@@ -551,7 +551,7 @@ const oo = (e) => {
|
|
|
551
551
|
async function R(F) {
|
|
552
552
|
const S = {};
|
|
553
553
|
for (const O of F) {
|
|
554
|
-
const T = (await
|
|
554
|
+
const T = (await k.getHandler().readObjects({
|
|
555
555
|
model: i,
|
|
556
556
|
ids: [r],
|
|
557
557
|
fieldsToRetrieve: [s],
|
|
@@ -584,7 +584,7 @@ const oo = (e) => {
|
|
|
584
584
|
h(!0);
|
|
585
585
|
try {
|
|
586
586
|
for (const F of Object.keys(g))
|
|
587
|
-
g[F] !== w.current[F] && await
|
|
587
|
+
g[F] !== w.current[F] && await k.getHandler().update({
|
|
588
588
|
model: i,
|
|
589
589
|
id: r,
|
|
590
590
|
values: { [s]: g[F] },
|
|
@@ -606,7 +606,7 @@ const oo = (e) => {
|
|
|
606
606
|
/* @__PURE__ */ o(
|
|
607
607
|
_e,
|
|
608
608
|
{
|
|
609
|
-
icon: /* @__PURE__ */ o(
|
|
609
|
+
icon: /* @__PURE__ */ o(Wt, {}),
|
|
610
610
|
onClick: n,
|
|
611
611
|
disabled: p,
|
|
612
612
|
children: d("cancel")
|
|
@@ -615,7 +615,7 @@ const oo = (e) => {
|
|
|
615
615
|
/* @__PURE__ */ o(
|
|
616
616
|
_e,
|
|
617
617
|
{
|
|
618
|
-
icon: p ? /* @__PURE__ */ o(et, {}) : /* @__PURE__ */ o(
|
|
618
|
+
icon: p ? /* @__PURE__ */ o(et, {}) : /* @__PURE__ */ o(jt, {}),
|
|
619
619
|
disabled: p,
|
|
620
620
|
onClick: V,
|
|
621
621
|
style: { marginLeft: 15 },
|
|
@@ -775,7 +775,7 @@ const { info: Ms } = Ge, lt = (e) => {
|
|
|
775
775
|
&.ant-select:not(.ant-select-customize-input) .ant-select-selector {
|
|
776
776
|
background-color: ${Hs.colorPrimaryBg};
|
|
777
777
|
}
|
|
778
|
-
`, { defaultAlgorithm:
|
|
778
|
+
`, { defaultAlgorithm: Ws, defaultSeed: js } = Pe, vr = Ws(js), Us = (e) => {
|
|
779
779
|
const { ooui: t } = e, { id: n, readOnly: i, required: r } = t;
|
|
780
780
|
return /* @__PURE__ */ o(ge, { ...e, valuePropName: "checked", children: /* @__PURE__ */ o(Gs, { id: n, readOnly: i, required: r }) });
|
|
781
781
|
}, Gs = (e) => {
|
|
@@ -859,7 +859,7 @@ const zs = (e) => {
|
|
|
859
859
|
Ke,
|
|
860
860
|
{
|
|
861
861
|
tooltip: a("uploadNewImage"),
|
|
862
|
-
icon: /* @__PURE__ */ o(
|
|
862
|
+
icon: /* @__PURE__ */ o(Wn, {}),
|
|
863
863
|
disabled: r,
|
|
864
864
|
onClick: () => {
|
|
865
865
|
s.current.click();
|
|
@@ -872,7 +872,7 @@ const zs = (e) => {
|
|
|
872
872
|
tooltip: a("download"),
|
|
873
873
|
disabled: !n,
|
|
874
874
|
onClick: d,
|
|
875
|
-
icon: /* @__PURE__ */ o(
|
|
875
|
+
icon: /* @__PURE__ */ o(jn, {})
|
|
876
876
|
}
|
|
877
877
|
),
|
|
878
878
|
/* @__PURE__ */ o(
|
|
@@ -1002,7 +1002,7 @@ const ho = async (e) => {
|
|
|
1002
1002
|
};
|
|
1003
1003
|
let c = [], m;
|
|
1004
1004
|
if (a === "tree" && (r != null && r.arch)) {
|
|
1005
|
-
const y = (g = wt(r)) == null ? void 0 : g.colors, w = await
|
|
1005
|
+
const y = (g = wt(r)) == null ? void 0 : g.colors, w = await k.getHandler().readEvalUiObjects({
|
|
1006
1006
|
model: n,
|
|
1007
1007
|
ids: f,
|
|
1008
1008
|
arch: r == null ? void 0 : r.arch,
|
|
@@ -1014,7 +1014,7 @@ const ho = async (e) => {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
c = w[0], m = Ht(w[1]);
|
|
1016
1016
|
} else
|
|
1017
|
-
c = await
|
|
1017
|
+
c = await k.getHandler().readObjects({
|
|
1018
1018
|
model: n,
|
|
1019
1019
|
ids: f,
|
|
1020
1020
|
fields: u[a],
|
|
@@ -1079,7 +1079,7 @@ const ia = (e) => {
|
|
|
1079
1079
|
pt(() => {
|
|
1080
1080
|
h();
|
|
1081
1081
|
}, [t]);
|
|
1082
|
-
const p = async (g) => r && r[g] ? r[g] : await
|
|
1082
|
+
const p = async (g) => r && r[g] ? r[g] : await k.getHandler().getView({
|
|
1083
1083
|
model: n,
|
|
1084
1084
|
type: g,
|
|
1085
1085
|
context: { ...m == null ? void 0 : m(), ...i }
|
|
@@ -1378,7 +1378,7 @@ const Vt = ({
|
|
|
1378
1378
|
let V = [];
|
|
1379
1379
|
try {
|
|
1380
1380
|
if (h && (V = [["id", "in", s]]), n.domain) {
|
|
1381
|
-
const S = await
|
|
1381
|
+
const S = await k.getHandler().evalDomain({
|
|
1382
1382
|
domain: n.domain,
|
|
1383
1383
|
values: Vt({
|
|
1384
1384
|
fields: y == null ? void 0 : y.getFields(),
|
|
@@ -1389,7 +1389,7 @@ const Vt = ({
|
|
|
1389
1389
|
});
|
|
1390
1390
|
V = [...V, ...S];
|
|
1391
1391
|
}
|
|
1392
|
-
const F = (await
|
|
1392
|
+
const F = (await k.getHandler().search({
|
|
1393
1393
|
model: m,
|
|
1394
1394
|
params: V,
|
|
1395
1395
|
fieldsToRetrieve: [g],
|
|
@@ -1494,9 +1494,9 @@ const Vt = ({
|
|
|
1494
1494
|
case "image":
|
|
1495
1495
|
return zs;
|
|
1496
1496
|
case "url":
|
|
1497
|
-
return jc;
|
|
1498
|
-
case "email":
|
|
1499
1497
|
return Wc;
|
|
1498
|
+
case "email":
|
|
1499
|
+
return jc;
|
|
1500
1500
|
case "float_time":
|
|
1501
1501
|
return uc;
|
|
1502
1502
|
case "fiber_grid":
|
|
@@ -1512,7 +1512,7 @@ const Vt = ({
|
|
|
1512
1512
|
case "multicheckbox":
|
|
1513
1513
|
return Kd;
|
|
1514
1514
|
case "markdown":
|
|
1515
|
-
return
|
|
1515
|
+
return jd;
|
|
1516
1516
|
case "radio":
|
|
1517
1517
|
return Gd;
|
|
1518
1518
|
case "switch":
|
|
@@ -1680,7 +1680,7 @@ const Vt = ({
|
|
|
1680
1680
|
setSearchTreeNameSearch: _,
|
|
1681
1681
|
goToResourceId: F,
|
|
1682
1682
|
limit: S
|
|
1683
|
-
} = e, [O, T] = v(!1), [I, A] = v(!1), [
|
|
1683
|
+
} = e, [O, T] = v(!1), [I, A] = v(!1), [N, W] = v(!1), [H, U] = v(!0), [E, K] = v(!0), [G, J] = v([]), [q, j] = v(!1), [M, B] = v([]), [L, se] = v(!1), [Q, me] = v(!0), [ve, X] = v(), [ae, xe] = v({}), [Re, Fe] = v(
|
|
1684
1684
|
S !== void 0 ? S : vt
|
|
1685
1685
|
), [Ve, ce] = v(i);
|
|
1686
1686
|
le(() => {
|
|
@@ -1727,19 +1727,19 @@ const Vt = ({
|
|
|
1727
1727
|
results: m,
|
|
1728
1728
|
setResults: c,
|
|
1729
1729
|
currentModel: g,
|
|
1730
|
-
removingItem:
|
|
1731
|
-
setRemovingItem:
|
|
1732
|
-
formIsLoading:
|
|
1730
|
+
removingItem: N,
|
|
1731
|
+
setRemovingItem: W,
|
|
1732
|
+
formIsLoading: H,
|
|
1733
1733
|
setFormIsLoading: U,
|
|
1734
|
-
treeIsLoading:
|
|
1735
|
-
setTreeIsLoading:
|
|
1734
|
+
treeIsLoading: E,
|
|
1735
|
+
setTreeIsLoading: K,
|
|
1736
1736
|
attachments: G,
|
|
1737
1737
|
setAttachments: J,
|
|
1738
1738
|
selectedRowItems: b,
|
|
1739
1739
|
setSelectedRowItems: R,
|
|
1740
1740
|
duplicatingItem: q,
|
|
1741
1741
|
setDuplicatingItem: j,
|
|
1742
|
-
setSearchParams:
|
|
1742
|
+
setSearchParams: B,
|
|
1743
1743
|
searchParams: M,
|
|
1744
1744
|
searchVisible: L,
|
|
1745
1745
|
setSearchVisible: se,
|
|
@@ -1815,26 +1815,26 @@ const Vt = ({
|
|
|
1815
1815
|
const { reportData: F, fields: S, values: O, context: T = {} } = _, {
|
|
1816
1816
|
context: I,
|
|
1817
1817
|
model: A,
|
|
1818
|
-
datas:
|
|
1819
|
-
report_name:
|
|
1820
|
-
type:
|
|
1818
|
+
datas: N = {},
|
|
1819
|
+
report_name: W,
|
|
1820
|
+
type: H
|
|
1821
1821
|
} = F;
|
|
1822
|
-
if (
|
|
1823
|
-
Ue(`${
|
|
1822
|
+
if (H !== "ir.actions.report.xml") {
|
|
1823
|
+
Ue(`${H} action not supported`);
|
|
1824
1824
|
return;
|
|
1825
1825
|
}
|
|
1826
|
-
const { ids: U } =
|
|
1826
|
+
const { ids: U } = N || {}, E = U || [], K = typeof I == "string" ? yt({
|
|
1827
1827
|
context: I,
|
|
1828
1828
|
fields: S,
|
|
1829
1829
|
values: O
|
|
1830
1830
|
}) : I;
|
|
1831
1831
|
try {
|
|
1832
|
-
const G = await
|
|
1832
|
+
const G = await k.getHandler().createReport({
|
|
1833
1833
|
model: A,
|
|
1834
|
-
name:
|
|
1835
|
-
datas:
|
|
1836
|
-
ids:
|
|
1837
|
-
context: { ...T, ...
|
|
1834
|
+
name: W,
|
|
1835
|
+
datas: N,
|
|
1836
|
+
ids: E,
|
|
1837
|
+
context: { ...T, ...K }
|
|
1838
1838
|
});
|
|
1839
1839
|
l(!0), s.current = !0, r.current = setInterval(() => {
|
|
1840
1840
|
w(G);
|
|
@@ -1846,7 +1846,7 @@ const Vt = ({
|
|
|
1846
1846
|
async function w(_) {
|
|
1847
1847
|
let F;
|
|
1848
1848
|
try {
|
|
1849
|
-
if (F = await
|
|
1849
|
+
if (F = await k.getHandler().getReport({
|
|
1850
1850
|
id: _
|
|
1851
1851
|
}), F.state && s.current === !0) {
|
|
1852
1852
|
s.current = !1, clearInterval(r.current), l(!1);
|
|
@@ -1888,9 +1888,9 @@ const Vt = ({
|
|
|
1888
1888
|
values: S = {},
|
|
1889
1889
|
context: O = {}
|
|
1890
1890
|
}) {
|
|
1891
|
-
var
|
|
1891
|
+
var W;
|
|
1892
1892
|
let T = _;
|
|
1893
|
-
_.res_model || (T = (await
|
|
1893
|
+
_.res_model || (T = (await k.getHandler().readObjects({
|
|
1894
1894
|
model: "ir.actions.act_window",
|
|
1895
1895
|
ids: [parseInt(_.id)],
|
|
1896
1896
|
context: O
|
|
@@ -1903,8 +1903,8 @@ const Vt = ({
|
|
|
1903
1903
|
...O,
|
|
1904
1904
|
...I
|
|
1905
1905
|
};
|
|
1906
|
-
let
|
|
1907
|
-
if (T.domain && (
|
|
1906
|
+
let N = [];
|
|
1907
|
+
if (T.domain && (N = await k.getHandler().evalDomain({
|
|
1908
1908
|
domain: T.domain,
|
|
1909
1909
|
values: Vt({
|
|
1910
1910
|
fields: F,
|
|
@@ -1913,20 +1913,20 @@ const Vt = ({
|
|
|
1913
1913
|
fields: F,
|
|
1914
1914
|
context: A
|
|
1915
1915
|
})), T.target === "new") {
|
|
1916
|
-
const
|
|
1916
|
+
const H = await k.getHandler().getView({
|
|
1917
1917
|
model: T.res_model,
|
|
1918
1918
|
type: "form",
|
|
1919
|
-
id: ((
|
|
1919
|
+
id: ((W = T == null ? void 0 : T.view_id) == null ? void 0 : W[0]) || void 0,
|
|
1920
1920
|
context: A
|
|
1921
1921
|
});
|
|
1922
1922
|
return R({
|
|
1923
|
-
domain:
|
|
1923
|
+
domain: N,
|
|
1924
1924
|
model: T.res_model,
|
|
1925
|
-
formView:
|
|
1925
|
+
formView: H,
|
|
1926
1926
|
context: A
|
|
1927
1927
|
}), {};
|
|
1928
1928
|
} else {
|
|
1929
|
-
const { initialView:
|
|
1929
|
+
const { initialView: H, views: U } = await Ma({
|
|
1930
1930
|
model: T.res_model,
|
|
1931
1931
|
context: A,
|
|
1932
1932
|
view_mode: T.view_mode,
|
|
@@ -1935,11 +1935,11 @@ const Vt = ({
|
|
|
1935
1935
|
return f == null || f({
|
|
1936
1936
|
target: "current",
|
|
1937
1937
|
context: A,
|
|
1938
|
-
domain:
|
|
1938
|
+
domain: N,
|
|
1939
1939
|
model: T.res_model,
|
|
1940
1940
|
views: U,
|
|
1941
1941
|
title: T.name,
|
|
1942
|
-
initialView:
|
|
1942
|
+
initialView: H,
|
|
1943
1943
|
action_id: T.id,
|
|
1944
1944
|
action_type: T.type
|
|
1945
1945
|
}), { closeParent: !0 };
|
|
@@ -2038,7 +2038,7 @@ async function Ma({
|
|
|
2038
2038
|
let a;
|
|
2039
2039
|
if (e)
|
|
2040
2040
|
for (const l of e) {
|
|
2041
|
-
const d = await
|
|
2041
|
+
const d = await k.getHandler().getView({
|
|
2042
2042
|
model: n,
|
|
2043
2043
|
type: l[1],
|
|
2044
2044
|
id: l[0],
|
|
@@ -2049,7 +2049,7 @@ async function Ma({
|
|
|
2049
2049
|
else {
|
|
2050
2050
|
const l = t.split(",");
|
|
2051
2051
|
for (const d of l) {
|
|
2052
|
-
const f = await
|
|
2052
|
+
const f = await k.getHandler().getView({
|
|
2053
2053
|
model: n,
|
|
2054
2054
|
type: d,
|
|
2055
2055
|
context: i
|
|
@@ -2122,7 +2122,7 @@ function $a(e, t) {
|
|
|
2122
2122
|
defaultValues: b,
|
|
2123
2123
|
forcedValues: V = {},
|
|
2124
2124
|
parentWidth: _
|
|
2125
|
-
} = e, { t: F } = ue(), [S, O] = v(!1), [T, I] = v(), [A,
|
|
2125
|
+
} = e, { t: F } = ue(), [S, O] = v(!1), [T, I] = v(), [A, N] = v(), [W] = nt.useForm(), [H, U] = v(), [E, K] = v(), G = ee(yo), [J, q] = v(), [j, M] = v(!1), B = re(), L = re({}), se = re({}), Q = re(!1), me = re(!1), ve = re(!1), ae = (_ !== void 0 ? _ : J) < La, xe = ee(Ee), { activeId: Re, getPlainValues: Fe } = xe || {}, Ve = ee(
|
|
2126
2126
|
ze
|
|
2127
2127
|
), {
|
|
2128
2128
|
setFormIsSaving: ce = void 0,
|
|
@@ -2144,57 +2144,57 @@ function $a(e, t) {
|
|
|
2144
2144
|
fetchValues: tt,
|
|
2145
2145
|
cancelUnsavedChanges: De,
|
|
2146
2146
|
clearAndReload: () => {
|
|
2147
|
-
|
|
2147
|
+
B.current = void 0, N(void 0), kt();
|
|
2148
2148
|
}
|
|
2149
2149
|
})), le(() => {
|
|
2150
2150
|
if (I(void 0), !(!n && !h)) {
|
|
2151
2151
|
if (!x) {
|
|
2152
|
-
|
|
2152
|
+
B.current = void 0, N(void 0);
|
|
2153
2153
|
return;
|
|
2154
2154
|
}
|
|
2155
|
-
(i === void 0 &&
|
|
2155
|
+
(i === void 0 && E || i !== void 0 && E && i < 0) && (B.current = void 0, N(void 0)), kt();
|
|
2156
2156
|
}
|
|
2157
2157
|
}, [i, n, p, h, x]), le(() => {
|
|
2158
2158
|
j && (bn({
|
|
2159
2159
|
elementHasLostFocus: !0
|
|
2160
2160
|
}), M(!1));
|
|
2161
2161
|
}, [j]);
|
|
2162
|
-
const he = (
|
|
2163
|
-
Se == null || Se(!1), ce == null || ce(!1), s == null || s(
|
|
2162
|
+
const he = (P, $, Z, te) => {
|
|
2163
|
+
Se == null || Se(!1), ce == null || ce(!1), s == null || s(P, $, Z, te), ke == null || ke(P);
|
|
2164
2164
|
}, pe = () => {
|
|
2165
2165
|
ce == null || ce(!1), r == null || r();
|
|
2166
|
-
}, ye = (
|
|
2167
|
-
ce == null || ce(!1), f == null || f(
|
|
2166
|
+
}, ye = (P) => {
|
|
2167
|
+
ce == null || ce(!1), f == null || f(P);
|
|
2168
2168
|
};
|
|
2169
2169
|
function oe() {
|
|
2170
|
-
return i ||
|
|
2170
|
+
return i || B.current;
|
|
2171
2171
|
}
|
|
2172
2172
|
function $e() {
|
|
2173
|
-
return
|
|
2173
|
+
return E;
|
|
2174
2174
|
}
|
|
2175
2175
|
function Ae() {
|
|
2176
|
-
const
|
|
2177
|
-
...
|
|
2176
|
+
const P = {
|
|
2177
|
+
...We(E),
|
|
2178
2178
|
...Et()
|
|
2179
2179
|
};
|
|
2180
|
-
for (const $ in
|
|
2181
|
-
|
|
2182
|
-
return
|
|
2180
|
+
for (const $ in P)
|
|
2181
|
+
P[$] === void 0 && delete P[$];
|
|
2182
|
+
return P;
|
|
2183
2183
|
}
|
|
2184
2184
|
function it() {
|
|
2185
|
-
const
|
|
2186
|
-
return Object.keys(
|
|
2187
|
-
const we =
|
|
2185
|
+
const P = Ae(), $ = $e(), Z = {};
|
|
2186
|
+
return Object.keys(P).forEach((te) => {
|
|
2187
|
+
const we = P[te];
|
|
2188
2188
|
$[te] && $[te].type === "many2one" && we && Array.isArray(we) && we.length === 2 ? Z[te] = we[0] : $[te] && ($[te].type === "one2many" || $[te].type === "many2many") && we && we.items ? Z[te] = we.items.filter((He) => He.operation !== "pendingRemove").map((He) => He.id) : Z[te] = we;
|
|
2189
2189
|
}), Z;
|
|
2190
2190
|
}
|
|
2191
2191
|
function Xe() {
|
|
2192
|
-
const
|
|
2193
|
-
...
|
|
2192
|
+
const P = {
|
|
2193
|
+
...We(E)
|
|
2194
2194
|
};
|
|
2195
|
-
for (const $ in
|
|
2196
|
-
|
|
2197
|
-
return
|
|
2195
|
+
for (const $ in P)
|
|
2196
|
+
P[$] === void 0 && delete P[$];
|
|
2197
|
+
return P;
|
|
2198
2198
|
}
|
|
2199
2199
|
function Dt() {
|
|
2200
2200
|
return { ...w, ...A == null ? void 0 : A.context };
|
|
@@ -2211,56 +2211,56 @@ function $a(e, t) {
|
|
|
2211
2211
|
...Oe
|
|
2212
2212
|
};
|
|
2213
2213
|
}
|
|
2214
|
-
const Jt = async (
|
|
2214
|
+
const Jt = async (P) => {
|
|
2215
2215
|
const $ = oe() ? A == null ? void 0 : A.context : {};
|
|
2216
|
-
return await
|
|
2216
|
+
return await k.getHandler().defaultGet({
|
|
2217
2217
|
model: n,
|
|
2218
|
-
fields:
|
|
2218
|
+
fields: P,
|
|
2219
2219
|
context: { ...w, ...$ },
|
|
2220
2220
|
extraValues: b
|
|
2221
2221
|
});
|
|
2222
2222
|
}, ut = () => Object.keys(
|
|
2223
2223
|
Fn({
|
|
2224
2224
|
source: L.current,
|
|
2225
|
-
target:
|
|
2226
|
-
fields:
|
|
2225
|
+
target: We(E),
|
|
2226
|
+
fields: E
|
|
2227
2227
|
})
|
|
2228
|
-
).length !== 0,
|
|
2229
|
-
const $ =
|
|
2230
|
-
return St($,
|
|
2231
|
-
}, Xt = (
|
|
2228
|
+
).length !== 0, We = (P) => {
|
|
2229
|
+
const $ = W.getFieldsValue(!0);
|
|
2230
|
+
return St($, P);
|
|
2231
|
+
}, Xt = (P, $) => {
|
|
2232
2232
|
st({
|
|
2233
2233
|
values: {
|
|
2234
|
-
...St(
|
|
2235
|
-
[
|
|
2234
|
+
...St(W.getFieldsValue(!0), E),
|
|
2235
|
+
[P]: $
|
|
2236
2236
|
},
|
|
2237
|
-
fields:
|
|
2237
|
+
fields: E,
|
|
2238
2238
|
reset: !1
|
|
2239
2239
|
});
|
|
2240
|
-
}, Qt = (
|
|
2240
|
+
}, Qt = (P) => W.getFieldsValue(!0)[P];
|
|
2241
2241
|
async function Zt() {
|
|
2242
2242
|
try {
|
|
2243
|
-
return await
|
|
2243
|
+
return await W.validateFields(), !1;
|
|
2244
2244
|
} catch {
|
|
2245
2245
|
return Tn.error(F("fillRequiredFields")), !0;
|
|
2246
2246
|
}
|
|
2247
2247
|
}
|
|
2248
2248
|
const kt = async () => {
|
|
2249
2249
|
I(void 0), ie == null || ie(!0);
|
|
2250
|
-
let
|
|
2250
|
+
let P;
|
|
2251
2251
|
try {
|
|
2252
|
-
h ?
|
|
2253
|
-
const { fields: $, arch: Z } =
|
|
2254
|
-
|
|
2252
|
+
h ? P = { arch: h.arch, fields: h.fields } : P = await Qe();
|
|
2253
|
+
const { fields: $, arch: Z } = P;
|
|
2254
|
+
K($), U(Z), await tt({
|
|
2255
2255
|
fields: $,
|
|
2256
2256
|
arch: Z
|
|
2257
2257
|
});
|
|
2258
2258
|
} catch ($) {
|
|
2259
2259
|
I($ != null && $.message ? $.message + $.stack : $), ie == null || ie(!1);
|
|
2260
2260
|
}
|
|
2261
|
-
}, tt = async (
|
|
2261
|
+
}, tt = async (P) => {
|
|
2262
2262
|
let $, Z, te, we;
|
|
2263
|
-
ie == null || ie(!0), I(void 0),
|
|
2263
|
+
ie == null || ie(!0), I(void 0), P != null && P.fields ? (Z = P.fields, te = P.arch) : (Z = E, te = H), p && (P == null ? void 0 : P.forceRefresh) !== !0 ? $ = p : { values: $, defaultGetCalled: we } = await Go({
|
|
2264
2264
|
fields: Z,
|
|
2265
2265
|
arch: te
|
|
2266
2266
|
}), C && ($ = { ...ma(C), ...$ }), L.current = St($, Z), st({
|
|
@@ -2269,36 +2269,36 @@ function $a(e, t) {
|
|
|
2269
2269
|
reset: !0,
|
|
2270
2270
|
isDefaultGet: we
|
|
2271
2271
|
}), Mt({ fields: Z, arch: te, values: $ }), ie == null || ie(!1), Se == null || Se(!1), we && M(!0);
|
|
2272
|
-
}, De = async () => new Promise(async (
|
|
2272
|
+
}, De = async () => new Promise(async (P) => {
|
|
2273
2273
|
ut() ? Gt({
|
|
2274
2274
|
t: F,
|
|
2275
2275
|
onOk: () => {
|
|
2276
|
-
pe == null || pe(),
|
|
2276
|
+
pe == null || pe(), P(!0);
|
|
2277
2277
|
},
|
|
2278
2278
|
onCancel: () => {
|
|
2279
|
-
|
|
2279
|
+
P(!1);
|
|
2280
2280
|
}
|
|
2281
|
-
}) : (pe == null || pe(),
|
|
2281
|
+
}) : (pe == null || pe(), P(!0));
|
|
2282
2282
|
}), Qe = async () => {
|
|
2283
2283
|
if (l) {
|
|
2284
|
-
const
|
|
2285
|
-
return (await
|
|
2286
|
-
action:
|
|
2284
|
+
const P = await k.getHandler().getActionStringForModel(n);
|
|
2285
|
+
return (await k.getHandler().getViewsForAction({
|
|
2286
|
+
action: P,
|
|
2287
2287
|
context: w
|
|
2288
2288
|
})).views.get("form");
|
|
2289
2289
|
}
|
|
2290
|
-
return await
|
|
2290
|
+
return await k.getHandler().getView({
|
|
2291
2291
|
model: n,
|
|
2292
2292
|
type: "form",
|
|
2293
2293
|
context: w
|
|
2294
2294
|
});
|
|
2295
2295
|
}, st = ({
|
|
2296
|
-
values:
|
|
2296
|
+
values: P,
|
|
2297
2297
|
fields: $,
|
|
2298
2298
|
reset: Z,
|
|
2299
2299
|
isDefaultGet: te = !1
|
|
2300
2300
|
}) => {
|
|
2301
|
-
const He = { ...Z ? {} :
|
|
2301
|
+
const He = { ...Z ? {} : W.getFieldsValue(!0), ...P }, xn = St(He, $), oi = Object.keys($).map((Sn) => {
|
|
2302
2302
|
const ii = xn[Sn] !== void 0 ? xn[Sn] : void 0;
|
|
2303
2303
|
return {
|
|
2304
2304
|
name: Sn,
|
|
@@ -2306,21 +2306,21 @@ function $a(e, t) {
|
|
|
2306
2306
|
value: ii
|
|
2307
2307
|
};
|
|
2308
2308
|
});
|
|
2309
|
-
te || (se.current = xn),
|
|
2309
|
+
te || (se.current = xn), W.setFields(oi);
|
|
2310
2310
|
}, Go = async ({
|
|
2311
|
-
fields:
|
|
2311
|
+
fields: P,
|
|
2312
2312
|
arch: $
|
|
2313
2313
|
}) => {
|
|
2314
2314
|
let Z = {}, te = !1;
|
|
2315
2315
|
if (oe()) {
|
|
2316
|
-
if (Z = (await
|
|
2316
|
+
if (Z = (await k.getHandler().readObjects({
|
|
2317
2317
|
model: n,
|
|
2318
2318
|
ids: [oe()],
|
|
2319
|
-
fields:
|
|
2319
|
+
fields: P,
|
|
2320
2320
|
context: w
|
|
2321
2321
|
}))[0], y)
|
|
2322
2322
|
return { values: Z, defaultGetCalled: te };
|
|
2323
|
-
const we = await
|
|
2323
|
+
const we = await k.getHandler().search({
|
|
2324
2324
|
params: [
|
|
2325
2325
|
["res_model", "=", n],
|
|
2326
2326
|
["res_id", "=", oe()]
|
|
@@ -2331,45 +2331,45 @@ function $a(e, t) {
|
|
|
2331
2331
|
});
|
|
2332
2332
|
fe == null || fe(we);
|
|
2333
2333
|
} else
|
|
2334
|
-
fe == null || fe([]), Z = await Jt(
|
|
2334
|
+
fe == null || fe([]), Z = await Jt(P), te = !0;
|
|
2335
2335
|
return { values: Z, defaultGetCalled: te };
|
|
2336
|
-
}, ir = async (
|
|
2337
|
-
const { callOnSubmitSucceed: $ = !0 } =
|
|
2336
|
+
}, ir = async (P) => {
|
|
2337
|
+
const { callOnSubmitSucceed: $ = !0 } = P || {};
|
|
2338
2338
|
if (oe()) {
|
|
2339
2339
|
const Z = Fn({
|
|
2340
2340
|
source: L.current,
|
|
2341
|
-
target:
|
|
2342
|
-
fields:
|
|
2341
|
+
target: We(E),
|
|
2342
|
+
fields: E
|
|
2343
2343
|
});
|
|
2344
|
-
await
|
|
2344
|
+
await k.getHandler().update({
|
|
2345
2345
|
model: n,
|
|
2346
2346
|
id: oe(),
|
|
2347
2347
|
values: { ...Z, ...V },
|
|
2348
|
-
fields:
|
|
2348
|
+
fields: E,
|
|
2349
2349
|
context: {
|
|
2350
2350
|
...w,
|
|
2351
2351
|
...A == null ? void 0 : A.context
|
|
2352
2352
|
}
|
|
2353
|
-
}), L.current =
|
|
2353
|
+
}), L.current = We(E);
|
|
2354
2354
|
} else {
|
|
2355
|
-
const Z =
|
|
2355
|
+
const Z = We(E), te = await k.getHandler().create({
|
|
2356
2356
|
model: n,
|
|
2357
2357
|
values: { ...Z, ...V },
|
|
2358
|
-
fields:
|
|
2358
|
+
fields: E,
|
|
2359
2359
|
context: {
|
|
2360
2360
|
...w,
|
|
2361
2361
|
...A == null ? void 0 : A.context
|
|
2362
2362
|
}
|
|
2363
2363
|
});
|
|
2364
|
-
|
|
2364
|
+
B.current = te, L.current = Z;
|
|
2365
2365
|
}
|
|
2366
2366
|
g && await g([oe()]), !y && $ && (he == null || he(oe(), Ae(), Xe()));
|
|
2367
|
-
}, Yo = async (
|
|
2368
|
-
const { callOnSubmitSucceed: $ = !0 } =
|
|
2367
|
+
}, Yo = async (P) => {
|
|
2368
|
+
const { callOnSubmitSucceed: $ = !0 } = P || {};
|
|
2369
2369
|
!y && $ && (he == null || he(oe(), Ae(), Xe()));
|
|
2370
|
-
}, en = async (
|
|
2370
|
+
}, en = async (P) => {
|
|
2371
2371
|
let $ = !1;
|
|
2372
|
-
const { callOnSubmitSucceed: Z = !0 } =
|
|
2372
|
+
const { callOnSubmitSucceed: Z = !0 } = P || {};
|
|
2373
2373
|
if (me.current = !0, I(void 0), ve.current && !ut() && oe() && Z) {
|
|
2374
2374
|
me.current = !1, Se == null || Se(!1), he == null || he(
|
|
2375
2375
|
oe(),
|
|
@@ -2378,7 +2378,7 @@ function $a(e, t) {
|
|
|
2378
2378
|
ve.current
|
|
2379
2379
|
), ve.current = !1;
|
|
2380
2380
|
const te = oe();
|
|
2381
|
-
return c && (
|
|
2381
|
+
return c && (B.current = void 0, st({ values: {}, fields: E, reset: !0 })), { succeed: !0, id: te };
|
|
2382
2382
|
}
|
|
2383
2383
|
if (!ut() && oe() && Z)
|
|
2384
2384
|
return me.current = !1, Se == null || Se(!1), pe == null || pe(), { succeed: !0, id: oe() };
|
|
@@ -2386,7 +2386,7 @@ function $a(e, t) {
|
|
|
2386
2386
|
return me.current = !1, Sr(F), { succeed: !1, id: oe() };
|
|
2387
2387
|
O(!0), ce == null || ce(!0);
|
|
2388
2388
|
try {
|
|
2389
|
-
m === "api" ? await ir(
|
|
2389
|
+
m === "api" ? await ir(P) : await Yo(P), c && (B.current = void 0, st({ values: {}, fields: E, reset: !0 })), await tt({ forceRefresh: !0 }), $ = !0, Tn.success(F("savedRegisters"));
|
|
2390
2390
|
} catch (te) {
|
|
2391
2391
|
me.current = !1, O(!1), ce == null || ce(!1), ye == null || ye(te), Tn.error(F("errorWhileSavingForm")), I(te != null && te.message ? te.message : te);
|
|
2392
2392
|
} finally {
|
|
@@ -2394,13 +2394,13 @@ function $a(e, t) {
|
|
|
2394
2394
|
}
|
|
2395
2395
|
return { succeed: $, id: oe() };
|
|
2396
2396
|
}, Mt = ({
|
|
2397
|
-
fields:
|
|
2397
|
+
fields: P,
|
|
2398
2398
|
arch: $,
|
|
2399
2399
|
values: Z,
|
|
2400
2400
|
operationInProgress: te = !1
|
|
2401
2401
|
}) => {
|
|
2402
2402
|
var He;
|
|
2403
|
-
const we = new Ci(
|
|
2403
|
+
const we = new Ci(P);
|
|
2404
2404
|
we.parse($, {
|
|
2405
2405
|
readOnly: u || te,
|
|
2406
2406
|
values: na(
|
|
@@ -2408,18 +2408,18 @@ function $a(e, t) {
|
|
|
2408
2408
|
...Z,
|
|
2409
2409
|
...Et()
|
|
2410
2410
|
},
|
|
2411
|
-
|
|
2411
|
+
P
|
|
2412
2412
|
)
|
|
2413
|
-
}),
|
|
2413
|
+
}), N(we), we.string && we.string !== Ie && (Me == null || Me(we.string)), G && we.string && ((He = G.setTitle) == null || He.call(G, we.string));
|
|
2414
2414
|
}, bn = async ({
|
|
2415
|
-
elementHasLostFocus:
|
|
2415
|
+
elementHasLostFocus: P = !1
|
|
2416
2416
|
}) => {
|
|
2417
2417
|
if (me.current)
|
|
2418
2418
|
return;
|
|
2419
2419
|
const $ = Fn({
|
|
2420
2420
|
source: se.current,
|
|
2421
|
-
target:
|
|
2422
|
-
fields:
|
|
2421
|
+
target: We(E),
|
|
2422
|
+
fields: E
|
|
2423
2423
|
}), Z = Object.keys($);
|
|
2424
2424
|
if (Z.length !== 0 && !(ua({
|
|
2425
2425
|
changedFields: Z,
|
|
@@ -2435,32 +2435,32 @@ function $a(e, t) {
|
|
|
2435
2435
|
"integer",
|
|
2436
2436
|
"many2one"
|
|
2437
2437
|
]
|
|
2438
|
-
}) &&
|
|
2439
|
-
const te = St(
|
|
2438
|
+
}) && P !== !0)) {
|
|
2439
|
+
const te = St(W.getFieldsValue(!0), E);
|
|
2440
2440
|
se.current = te, d == null || d(te), Se == null || Se(!0), zo(Z);
|
|
2441
2441
|
}
|
|
2442
|
-
}, qo = zi(bn, 100), zo = async (
|
|
2442
|
+
}, qo = zi(bn, 100), zo = async (P) => {
|
|
2443
2443
|
try {
|
|
2444
|
-
for (let $ = 0; $ <
|
|
2445
|
-
const Z =
|
|
2444
|
+
for (let $ = 0; $ < P.length; $ += 1) {
|
|
2445
|
+
const Z = P[$];
|
|
2446
2446
|
await Jo(Z);
|
|
2447
2447
|
}
|
|
2448
2448
|
} catch ($) {
|
|
2449
2449
|
Ue($);
|
|
2450
2450
|
}
|
|
2451
|
-
}, Jo = async (
|
|
2452
|
-
const $ = A == null ? void 0 : A.onChangeFields[
|
|
2451
|
+
}, Jo = async (P) => {
|
|
2452
|
+
const $ = A == null ? void 0 : A.onChangeFields[P];
|
|
2453
2453
|
if (!$) {
|
|
2454
2454
|
Mt({
|
|
2455
|
-
fields:
|
|
2456
|
-
arch:
|
|
2457
|
-
values:
|
|
2455
|
+
fields: E,
|
|
2456
|
+
arch: H,
|
|
2457
|
+
values: We(E)
|
|
2458
2458
|
});
|
|
2459
2459
|
return;
|
|
2460
2460
|
}
|
|
2461
2461
|
const Z = ha({
|
|
2462
2462
|
values: {
|
|
2463
|
-
...
|
|
2463
|
+
...We(E),
|
|
2464
2464
|
context: {
|
|
2465
2465
|
...w,
|
|
2466
2466
|
...A == null ? void 0 : A.context
|
|
@@ -2468,28 +2468,28 @@ function $a(e, t) {
|
|
|
2468
2468
|
},
|
|
2469
2469
|
parentValues: Fe == null ? void 0 : Fe(),
|
|
2470
2470
|
onChangeFieldActionArgs: $.args
|
|
2471
|
-
}), te = await
|
|
2471
|
+
}), te = await k.getHandler().executeOnChange({
|
|
2472
2472
|
model: n,
|
|
2473
2473
|
action: $.method,
|
|
2474
2474
|
ids: oe() ? [oe()] : [],
|
|
2475
2475
|
payload: Z,
|
|
2476
|
-
fields:
|
|
2476
|
+
fields: E
|
|
2477
2477
|
});
|
|
2478
2478
|
if (te.value) {
|
|
2479
2479
|
const we = {
|
|
2480
|
-
...
|
|
2480
|
+
...We(E),
|
|
2481
2481
|
...te.value
|
|
2482
2482
|
}, He = ra({
|
|
2483
2483
|
values: we,
|
|
2484
|
-
fields:
|
|
2484
|
+
fields: E
|
|
2485
2485
|
});
|
|
2486
2486
|
Mt({
|
|
2487
|
-
fields:
|
|
2488
|
-
arch:
|
|
2487
|
+
fields: E,
|
|
2488
|
+
arch: H,
|
|
2489
2489
|
values: He
|
|
2490
2490
|
}), st({
|
|
2491
2491
|
values: He,
|
|
2492
|
-
fields:
|
|
2492
|
+
fields: E,
|
|
2493
2493
|
reset: !1
|
|
2494
2494
|
});
|
|
2495
2495
|
}
|
|
@@ -2502,22 +2502,22 @@ function $a(e, t) {
|
|
|
2502
2502
|
if (te.domain && Object.keys(te.domain).length > 0) {
|
|
2503
2503
|
const we = fa({
|
|
2504
2504
|
fieldsDomain: te.domain,
|
|
2505
|
-
fields:
|
|
2505
|
+
fields: E
|
|
2506
2506
|
});
|
|
2507
2507
|
Mt({
|
|
2508
2508
|
fields: we,
|
|
2509
|
-
arch:
|
|
2510
|
-
values:
|
|
2511
|
-
}),
|
|
2509
|
+
arch: H,
|
|
2510
|
+
values: We(we)
|
|
2511
|
+
}), K(we);
|
|
2512
2512
|
}
|
|
2513
2513
|
};
|
|
2514
2514
|
async function Xo({
|
|
2515
|
-
action:
|
|
2515
|
+
action: P,
|
|
2516
2516
|
context: $
|
|
2517
2517
|
}) {
|
|
2518
|
-
const Z = await
|
|
2518
|
+
const Z = await k.getHandler().execute({
|
|
2519
2519
|
model: n,
|
|
2520
|
-
action:
|
|
2520
|
+
action: P,
|
|
2521
2521
|
payload: [oe()],
|
|
2522
2522
|
context: {
|
|
2523
2523
|
...A == null ? void 0 : A.context,
|
|
@@ -2533,7 +2533,7 @@ function $a(e, t) {
|
|
|
2533
2533
|
let te = {};
|
|
2534
2534
|
Z.context && (te = yt({
|
|
2535
2535
|
context: Z.context,
|
|
2536
|
-
fields:
|
|
2536
|
+
fields: E,
|
|
2537
2537
|
values: Ae()
|
|
2538
2538
|
})), await sr({
|
|
2539
2539
|
actionData: Z,
|
|
@@ -2542,32 +2542,32 @@ function $a(e, t) {
|
|
|
2542
2542
|
} else
|
|
2543
2543
|
await tt({ forceRefresh: !0 });
|
|
2544
2544
|
}
|
|
2545
|
-
async function Qo({ action:
|
|
2546
|
-
const $ = await
|
|
2545
|
+
async function Qo({ action: P }) {
|
|
2546
|
+
const $ = await k.getHandler().executeWorkflow({
|
|
2547
2547
|
model: n,
|
|
2548
|
-
action:
|
|
2548
|
+
action: P,
|
|
2549
2549
|
payload: oe()
|
|
2550
2550
|
});
|
|
2551
2551
|
$.type && $.type === "ir.actions.act_window_close" ? he == null || he(oe(), Ae(), Xe()) : await tt({ forceRefresh: !0 });
|
|
2552
2552
|
}
|
|
2553
2553
|
async function Zo({
|
|
2554
|
-
action:
|
|
2554
|
+
action: P,
|
|
2555
2555
|
context: $
|
|
2556
2556
|
}) {
|
|
2557
|
-
const Z = (await
|
|
2557
|
+
const Z = (await k.getHandler().readObjects({
|
|
2558
2558
|
model: "ir.actions.actions",
|
|
2559
|
-
ids: [parseInt(
|
|
2559
|
+
ids: [parseInt(P)],
|
|
2560
2560
|
context: w
|
|
2561
2561
|
}))[0];
|
|
2562
2562
|
await sr({ actionData: Z, context: $ });
|
|
2563
2563
|
}
|
|
2564
2564
|
async function sr({
|
|
2565
|
-
actionData:
|
|
2565
|
+
actionData: P,
|
|
2566
2566
|
context: $
|
|
2567
2567
|
}) {
|
|
2568
2568
|
const { closeParent: Z } = await (be == null ? void 0 : be({
|
|
2569
|
-
actionData:
|
|
2570
|
-
fields:
|
|
2569
|
+
actionData: P,
|
|
2570
|
+
fields: E,
|
|
2571
2571
|
values: Ae(),
|
|
2572
2572
|
context: {
|
|
2573
2573
|
...w,
|
|
@@ -2583,20 +2583,20 @@ function $a(e, t) {
|
|
|
2583
2583
|
function ei() {
|
|
2584
2584
|
bn({ elementHasLostFocus: !0 });
|
|
2585
2585
|
}
|
|
2586
|
-
function Cn(
|
|
2586
|
+
function Cn(P) {
|
|
2587
2587
|
Mt({
|
|
2588
|
-
fields:
|
|
2589
|
-
arch:
|
|
2590
|
-
values:
|
|
2591
|
-
operationInProgress:
|
|
2588
|
+
fields: E,
|
|
2589
|
+
arch: H,
|
|
2590
|
+
values: We(E),
|
|
2591
|
+
operationInProgress: P
|
|
2592
2592
|
});
|
|
2593
2593
|
}
|
|
2594
2594
|
async function ti({
|
|
2595
|
-
type:
|
|
2595
|
+
type: P,
|
|
2596
2596
|
action: $,
|
|
2597
2597
|
context: Z
|
|
2598
2598
|
}) {
|
|
2599
|
-
if (
|
|
2599
|
+
if (P === "cancel") {
|
|
2600
2600
|
pe == null || pe();
|
|
2601
2601
|
return;
|
|
2602
2602
|
}
|
|
@@ -2608,7 +2608,7 @@ function $a(e, t) {
|
|
|
2608
2608
|
try {
|
|
2609
2609
|
!u && (ut() || oe() === void 0) && (te = !0, Cn(!0), m === "2many" ? (await ir({ callOnSubmitSucceed: !1 }), ve.current = !0) : await en({ callOnSubmitSucceed: !1 }));
|
|
2610
2610
|
const we = ve.current ? vn() : {}, He = { ...Z, ...we };
|
|
2611
|
-
|
|
2611
|
+
P === "object" ? await Xo({ action: $, context: He }) : P === "workflow" ? await Qo({ action: $ }) : P === "action" && await Zo({ action: $, context: He }), te && Cn(!1);
|
|
2612
2612
|
} catch (we) {
|
|
2613
2613
|
te && Cn(!1), Ue(we);
|
|
2614
2614
|
}
|
|
@@ -2633,7 +2633,7 @@ function $a(e, t) {
|
|
|
2633
2633
|
children: /* @__PURE__ */ o(
|
|
2634
2634
|
nt,
|
|
2635
2635
|
{
|
|
2636
|
-
form:
|
|
2636
|
+
form: W,
|
|
2637
2637
|
onFieldsChange: () => {
|
|
2638
2638
|
qo({ elementHasLostFocus: !1 });
|
|
2639
2639
|
},
|
|
@@ -2654,7 +2654,7 @@ function $a(e, t) {
|
|
|
2654
2654
|
/* @__PURE__ */ o(
|
|
2655
2655
|
_e,
|
|
2656
2656
|
{
|
|
2657
|
-
icon: /* @__PURE__ */ o(
|
|
2657
|
+
icon: /* @__PURE__ */ o(Wt, {}),
|
|
2658
2658
|
disabled: S,
|
|
2659
2659
|
onClick: async () => {
|
|
2660
2660
|
await De();
|
|
@@ -2667,7 +2667,7 @@ function $a(e, t) {
|
|
|
2667
2667
|
{
|
|
2668
2668
|
disabled: S || u,
|
|
2669
2669
|
loading: S,
|
|
2670
|
-
icon: /* @__PURE__ */ o(
|
|
2670
|
+
icon: /* @__PURE__ */ o(jt, {}),
|
|
2671
2671
|
onClick: async () => {
|
|
2672
2672
|
await en();
|
|
2673
2673
|
},
|
|
@@ -2681,11 +2681,11 @@ function $a(e, t) {
|
|
|
2681
2681
|
Zn,
|
|
2682
2682
|
{
|
|
2683
2683
|
bounds: !0,
|
|
2684
|
-
onResize: (
|
|
2684
|
+
onResize: (P) => {
|
|
2685
2685
|
var $;
|
|
2686
|
-
q(($ =
|
|
2686
|
+
q(($ = P.bounds) == null ? void 0 : $.width);
|
|
2687
2687
|
},
|
|
2688
|
-
children: ({ measureRef:
|
|
2688
|
+
children: ({ measureRef: P }) => /* @__PURE__ */ D("div", { className: "pb-2", ref: P, children: [
|
|
2689
2689
|
T && /* @__PURE__ */ o(Na, { className: "mt-5 mb-10", error: T }),
|
|
2690
2690
|
ni(),
|
|
2691
2691
|
a && ri()
|
|
@@ -2708,7 +2708,7 @@ const Yt = ct($a), qt = (e) => {
|
|
|
2708
2708
|
a && b();
|
|
2709
2709
|
}, [l, a]);
|
|
2710
2710
|
async function b() {
|
|
2711
|
-
const S = await
|
|
2711
|
+
const S = await k.getHandler().isShortcutFavorite({
|
|
2712
2712
|
action_id: w,
|
|
2713
2713
|
action_type: x,
|
|
2714
2714
|
view_id: R,
|
|
@@ -2718,12 +2718,12 @@ const Yt = ct($a), qt = (e) => {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
async function V() {
|
|
2720
2720
|
if (p && g)
|
|
2721
|
-
await
|
|
2721
|
+
await k.getHandler().removeFavourite({
|
|
2722
2722
|
shortcut_id: g
|
|
2723
2723
|
});
|
|
2724
2724
|
else {
|
|
2725
2725
|
const { action_id: S, res_id: O, action_type: T, view_id: I } = l;
|
|
2726
|
-
await
|
|
2726
|
+
await k.getHandler().addFavourite({
|
|
2727
2727
|
action_id: S,
|
|
2728
2728
|
action_type: T,
|
|
2729
2729
|
view_id: I,
|
|
@@ -2864,8 +2864,8 @@ const Yt = ct($a), qt = (e) => {
|
|
|
2864
2864
|
}
|
|
2865
2865
|
}
|
|
2866
2866
|
)
|
|
2867
|
-
] }), { useToken:
|
|
2868
|
-
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: r, required: s } = t, { token: a } =
|
|
2867
|
+
] }), { useToken: Wa } = Pe, wo = (e) => {
|
|
2868
|
+
const { ooui: t } = e, { id: n, decimalDigits: i, readOnly: r, required: s } = t, { token: a } = Wa(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee(Ee), { elementHasLostFocus: f } = d || {};
|
|
2869
2869
|
return /* @__PURE__ */ o(ge, { required: s, type: "number", ...e, children: /* @__PURE__ */ o(
|
|
2870
2870
|
Nr,
|
|
2871
2871
|
{
|
|
@@ -2880,8 +2880,8 @@ const Yt = ct($a), qt = (e) => {
|
|
|
2880
2880
|
wheel: !1
|
|
2881
2881
|
}
|
|
2882
2882
|
) });
|
|
2883
|
-
}, { useToken:
|
|
2884
|
-
const { ooui: t, onChange: n } = e, { id: i, readOnly: r, required: s } = t, { token: a } =
|
|
2883
|
+
}, { useToken: ja } = Pe, rn = (e) => {
|
|
2884
|
+
const { ooui: t, onChange: n } = e, { id: i, readOnly: r, required: s } = t, { token: a } = ja(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee(Ee), { elementHasLostFocus: f } = d || {};
|
|
2885
2885
|
return /* @__PURE__ */ o(ge, { required: s, type: "number", ...e, children: /* @__PURE__ */ o(
|
|
2886
2886
|
Nr,
|
|
2887
2887
|
{
|
|
@@ -3142,18 +3142,18 @@ function vo(e) {
|
|
|
3142
3142
|
if (!y)
|
|
3143
3143
|
return;
|
|
3144
3144
|
const O = C ? y : h, T = O == null ? void 0 : O.rows;
|
|
3145
|
-
return T == null ? void 0 : T.map((I, A) => /* @__PURE__ */ o(Te, { children: I.map((
|
|
3145
|
+
return T == null ? void 0 : T.map((I, A) => /* @__PURE__ */ o(Te, { children: I.map((N, W) => /* @__PURE__ */ o(de, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ o(Za, { field: N }) }, W)) }, A));
|
|
3146
3146
|
};
|
|
3147
3147
|
pt(() => {
|
|
3148
3148
|
x(!1), R.current = new xi(n, t), R.current.parse(), g(R.current._simpleSearchContainer), w(R.current._advancedSearchContainer);
|
|
3149
3149
|
}, [t, n]);
|
|
3150
3150
|
const F = _(), S = (O) => {
|
|
3151
|
-
var
|
|
3151
|
+
var N;
|
|
3152
3152
|
const { limit: T, offset: I } = O;
|
|
3153
3153
|
delete O.offset, delete O.limit;
|
|
3154
3154
|
const A = nl(
|
|
3155
3155
|
O,
|
|
3156
|
-
(
|
|
3156
|
+
(N = R.current) == null ? void 0 : N._advancedSearchContainer
|
|
3157
3157
|
);
|
|
3158
3158
|
r({ params: A, offset: I, limit: T, searchValues: O });
|
|
3159
3159
|
};
|
|
@@ -3392,7 +3392,7 @@ const pl = (e) => /* @__PURE__ */ o(ge, { ...e, children: /* @__PURE__ */ o(Co,
|
|
|
3392
3392
|
}
|
|
3393
3393
|
)
|
|
3394
3394
|
] });
|
|
3395
|
-
},
|
|
3395
|
+
}, je = (e) => {
|
|
3396
3396
|
const t = re(/* @__PURE__ */ new Map());
|
|
3397
3397
|
le(() => () => {
|
|
3398
3398
|
i();
|
|
@@ -3423,10 +3423,10 @@ const pl = (e) => /* @__PURE__ */ o(ge, { ...e, children: /* @__PURE__ */ o(Co,
|
|
|
3423
3423
|
ot
|
|
3424
3424
|
), { openRelate: f } = d || {}, u = ee(
|
|
3425
3425
|
At
|
|
3426
|
-
), { processAction: c } = u || {}, [m, p] =
|
|
3427
|
-
|
|
3428
|
-
), [h, g] =
|
|
3429
|
-
|
|
3426
|
+
), { processAction: c } = u || {}, [m, p] = je(
|
|
3427
|
+
k.getHandler().getView
|
|
3428
|
+
), [h, g] = je(
|
|
3429
|
+
k.getHandler().readObjects
|
|
3430
3430
|
), y = z(() => {
|
|
3431
3431
|
p(), g();
|
|
3432
3432
|
}, [p, g]), w = z(async () => {
|
|
@@ -3517,7 +3517,7 @@ const pl = (e) => /* @__PURE__ */ o(ge, { ...e, children: /* @__PURE__ */ o(Co,
|
|
|
3517
3517
|
if (!t || t && r)
|
|
3518
3518
|
return;
|
|
3519
3519
|
l(!0);
|
|
3520
|
-
const p = await
|
|
3520
|
+
const p = await k.getHandler().execute({
|
|
3521
3521
|
action: "name_get",
|
|
3522
3522
|
payload: [u],
|
|
3523
3523
|
model: d,
|
|
@@ -3695,7 +3695,7 @@ const Cl = (e) => {
|
|
|
3695
3695
|
const [r, s] = v([]), [a, l] = v(!1), { relation: d, field: f } = n, u = z(async () => {
|
|
3696
3696
|
try {
|
|
3697
3697
|
l(!0);
|
|
3698
|
-
const m = await
|
|
3698
|
+
const m = await k.getHandler().search({
|
|
3699
3699
|
model: d,
|
|
3700
3700
|
params: [["id", "in", e.items.map((p) => p.id)]],
|
|
3701
3701
|
fields: [f],
|
|
@@ -3778,9 +3778,9 @@ const Cl = (e) => {
|
|
|
3778
3778
|
context: b,
|
|
3779
3779
|
readonly: V,
|
|
3780
3780
|
onSelectAllRecords: _
|
|
3781
|
-
} = e, F = re(null), [S, O] = v([]), T = re(!1), [I, A] = v(), { t:
|
|
3781
|
+
} = e, F = re(null), [S, O] = v([]), T = re(!1), [I, A] = v(), { t: N } = ue(), W = re(i), H = ee(
|
|
3782
3782
|
ze
|
|
3783
|
-
), { title: U = void 0, setTitle:
|
|
3783
|
+
), { title: U = void 0, setTitle: E = void 0 } = (R ? H : {}) || {}, K = Ce(() => {
|
|
3784
3784
|
if (I)
|
|
3785
3785
|
return uo(
|
|
3786
3786
|
I,
|
|
@@ -3797,7 +3797,7 @@ const Cl = (e) => {
|
|
|
3797
3797
|
}
|
|
3798
3798
|
})), le(() => {
|
|
3799
3799
|
const Q = wt(s);
|
|
3800
|
-
A(Q), Q.string && U !== Q.string && (
|
|
3800
|
+
A(Q), Q.string && U !== Q.string && (E == null || E(Q.string));
|
|
3801
3801
|
}, [s, U]), le(() => {
|
|
3802
3802
|
if (!I)
|
|
3803
3803
|
return;
|
|
@@ -3805,9 +3805,9 @@ const Cl = (e) => {
|
|
|
3805
3805
|
const Q = fo(I, a);
|
|
3806
3806
|
O(Q);
|
|
3807
3807
|
}, [a]), le(() => {
|
|
3808
|
-
|
|
3808
|
+
W.current = i;
|
|
3809
3809
|
}, [i]);
|
|
3810
|
-
const G = (n - 1) *
|
|
3810
|
+
const G = (n - 1) * W.current + 1, J = G - 1 + S.length, q = r === void 0 ? null : r === 0 ? N("no_results") : N("summary").replace("{from}", G == null ? void 0 : G.toString()).replace("{to}", J == null ? void 0 : J.toString()).replace("{total}", r == null ? void 0 : r.toString()), j = Ce(() => {
|
|
3811
3811
|
if (!u || s.isExpandable)
|
|
3812
3812
|
return null;
|
|
3813
3813
|
const Q = S == null ? void 0 : S.filter(
|
|
@@ -3818,7 +3818,7 @@ const Cl = (e) => {
|
|
|
3818
3818
|
mi,
|
|
3819
3819
|
{
|
|
3820
3820
|
total: r,
|
|
3821
|
-
pageSize:
|
|
3821
|
+
pageSize: W.current === 0 ? r : W.current,
|
|
3822
3822
|
current: n,
|
|
3823
3823
|
showSizeChanger: !1,
|
|
3824
3824
|
onChange: l
|
|
@@ -3858,18 +3858,18 @@ const Cl = (e) => {
|
|
|
3858
3858
|
const ae = ve.reduce((xe, Re) => Re[X.field] && !isNaN(Re[X.field]) ? xe + Re[X.field] : xe, 0);
|
|
3859
3859
|
me.push(`${X.label}: ${Math.round(ae * 100) / 100}`);
|
|
3860
3860
|
}), /* @__PURE__ */ o("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: me.join(", ") });
|
|
3861
|
-
}, [S, c, I]),
|
|
3862
|
-
if (I !== null &&
|
|
3863
|
-
return ul(
|
|
3864
|
-
}, [
|
|
3865
|
-
return I === null || !
|
|
3861
|
+
}, [S, c, I]), B = Ce(() => {
|
|
3862
|
+
if (I !== null && K && K.length > 0)
|
|
3863
|
+
return ul(K, S, 600);
|
|
3864
|
+
}, [K, S, I]), L = Ce(() => p && (I != null && I.columns.some((Q) => Q.sum !== void 0)) ? p - 30 : p, [p, I == null ? void 0 : I.columns]);
|
|
3865
|
+
return I === null || !B || ((se = B == null ? void 0 : B.columns) == null ? void 0 : se.length) === 0 ? /* @__PURE__ */ o(Ne, { style: { padding: "2rem" } }) : /* @__PURE__ */ D(no, { children: [
|
|
3866
3866
|
j,
|
|
3867
3867
|
/* @__PURE__ */ o(
|
|
3868
3868
|
Ji,
|
|
3869
3869
|
{
|
|
3870
3870
|
ref: F,
|
|
3871
3871
|
height: L,
|
|
3872
|
-
columns:
|
|
3872
|
+
columns: B.columns,
|
|
3873
3873
|
dataSource: S,
|
|
3874
3874
|
loading: d,
|
|
3875
3875
|
loadingComponent: /* @__PURE__ */ o(Ne, {}),
|
|
@@ -3927,13 +3927,13 @@ const Fo = (e) => {
|
|
|
3927
3927
|
searchParams: V = [],
|
|
3928
3928
|
setSearchValues: _,
|
|
3929
3929
|
clearSelection: F
|
|
3930
|
-
} = e, [S, O] = v(!1), [T, I] = v(!1), [A,
|
|
3930
|
+
} = e, [S, O] = v(!1), [T, I] = v(!1), [A, N] = v(), [W, H] = v(1), [U, E] = v(0), [K, G] = v(), [J, q] = v([]), [j, M] = v(void 0), [B, L] = v(void 0), se = re(R || vt), Q = re([]), me = z(
|
|
3931
3931
|
(ie) => {
|
|
3932
3932
|
y == null || y([...ie]), q([...ie]);
|
|
3933
3933
|
},
|
|
3934
3934
|
[y]
|
|
3935
3935
|
), ve = z(() => w || J, [w, J]), X = z(async () => {
|
|
3936
|
-
const ie = await
|
|
3936
|
+
const ie = await k.getHandler().nameSearch({
|
|
3937
3937
|
model: t,
|
|
3938
3938
|
payload: l,
|
|
3939
3939
|
limit: se.current,
|
|
@@ -3943,7 +3943,7 @@ const Fo = (e) => {
|
|
|
3943
3943
|
if (G(ie.length), u == null || u(ie.length), ie.length > 0) {
|
|
3944
3944
|
const fe = ie.map((ye) => ye == null ? void 0 : ye[0]), { colors: Ie, status: Me } = wt(c), Y = {};
|
|
3945
3945
|
Ie && (Y.colors = Ie), Me && (Y.status = Me);
|
|
3946
|
-
const be = await
|
|
3946
|
+
const be = await k.getHandler().readEvalUiObjects({
|
|
3947
3947
|
model: t,
|
|
3948
3948
|
ids: fe,
|
|
3949
3949
|
arch: c == null ? void 0 : c.arch,
|
|
@@ -3977,7 +3977,7 @@ const Fo = (e) => {
|
|
|
3977
3977
|
async (ie) => {
|
|
3978
3978
|
const { params: fe, newOffset: Ie } = ie || {}, Me = Kt(fe || V, C), { colors: Y, status: be } = wt(c), Oe = {};
|
|
3979
3979
|
Y && (Oe.colors = Y), be && (Oe.status = be);
|
|
3980
|
-
const { totalItems: he, results: pe, attrsEvaluated: ye } = await
|
|
3980
|
+
const { totalItems: he, results: pe, attrsEvaluated: ye } = await k.getHandler().searchForTree({
|
|
3981
3981
|
params: Me,
|
|
3982
3982
|
limit: se.current,
|
|
3983
3983
|
offset: Ie || U,
|
|
@@ -4023,7 +4023,7 @@ const Fo = (e) => {
|
|
|
4023
4023
|
try {
|
|
4024
4024
|
O(!0), a == null || a(!0), l && !d.current ? await X() : await ae(ie), F == null || F();
|
|
4025
4025
|
} catch (fe) {
|
|
4026
|
-
|
|
4026
|
+
N(typeof fe == "string" ? fe : fe.message), O(!1);
|
|
4027
4027
|
} finally {
|
|
4028
4028
|
i == null || i([]), I(!1), a == null || a(!1);
|
|
4029
4029
|
}
|
|
@@ -4060,7 +4060,7 @@ const Fo = (e) => {
|
|
|
4060
4060
|
), Fe = z(
|
|
4061
4061
|
(ie) => {
|
|
4062
4062
|
const { params: fe, searchValues: Ie, limit: Me, offset: Y } = ie;
|
|
4063
|
-
S || (n == null || n(void 0), i == null || i([]), _ == null || _(Ie), r == null || r(fe), s == null || s(!1), I(!0),
|
|
4063
|
+
S || (n == null || n(void 0), i == null || i([]), _ == null || _(Ie), r == null || r(fe), s == null || s(!1), I(!0), N(void 0), H(1), Me && (se.current = Me, b == null || b(Me)), Y && E(Y), xe({
|
|
4064
4064
|
params: fe,
|
|
4065
4065
|
newOffset: Y
|
|
4066
4066
|
}));
|
|
@@ -4077,11 +4077,11 @@ const Fo = (e) => {
|
|
|
4077
4077
|
]
|
|
4078
4078
|
), Ve = z(
|
|
4079
4079
|
(ie) => {
|
|
4080
|
-
O(!0),
|
|
4080
|
+
O(!0), H(ie), E((ie - 1) * R);
|
|
4081
4081
|
},
|
|
4082
|
-
[O, R,
|
|
4082
|
+
[O, R, E, H]
|
|
4083
4083
|
), ce = z(() => {
|
|
4084
|
-
S || (n == null || n(void 0), r == null || r([]), _ == null || _({}),
|
|
4084
|
+
S || (n == null || n(void 0), r == null || r([]), _ == null || _({}), N(void 0), E(0), H(1), b == null || b(R || vt));
|
|
4085
4085
|
}, [
|
|
4086
4086
|
S,
|
|
4087
4087
|
n,
|
|
@@ -4091,7 +4091,7 @@ const Fo = (e) => {
|
|
|
4091
4091
|
R
|
|
4092
4092
|
]), Se = z(
|
|
4093
4093
|
async (ie) => {
|
|
4094
|
-
const fe = ie[(c == null ? void 0 : c.field_parent) || "child_id"], Ie = await
|
|
4094
|
+
const fe = ie[(c == null ? void 0 : c.field_parent) || "child_id"], Ie = await k.getHandler().readObjects({
|
|
4095
4095
|
model: t,
|
|
4096
4096
|
ids: fe,
|
|
4097
4097
|
fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
|
|
@@ -4100,12 +4100,12 @@ const Fo = (e) => {
|
|
|
4100
4100
|
return me([...ve(), ...Ie]), fo(wt(c), Ie);
|
|
4101
4101
|
},
|
|
4102
4102
|
[c, t, f, ve, me]
|
|
4103
|
-
), ke = z(async () => await
|
|
4103
|
+
), ke = z(async () => await k.getHandler().searchAllIds({
|
|
4104
4104
|
params: Kt(V, C),
|
|
4105
4105
|
model: t,
|
|
4106
4106
|
context: f,
|
|
4107
|
-
totalItems:
|
|
4108
|
-
}), [t, f,
|
|
4107
|
+
totalItems: K
|
|
4108
|
+
}), [t, f, K, V, C]);
|
|
4109
4109
|
return {
|
|
4110
4110
|
submit: Fe,
|
|
4111
4111
|
clear: ce,
|
|
@@ -4113,7 +4113,7 @@ const Fo = (e) => {
|
|
|
4113
4113
|
tableRefreshing: S,
|
|
4114
4114
|
searchFilterLoading: T,
|
|
4115
4115
|
searchError: A,
|
|
4116
|
-
page:
|
|
4116
|
+
page: W,
|
|
4117
4117
|
offset: U,
|
|
4118
4118
|
limit: se.current,
|
|
4119
4119
|
getResults: ve,
|
|
@@ -4121,8 +4121,8 @@ const Fo = (e) => {
|
|
|
4121
4121
|
changeSort: Re,
|
|
4122
4122
|
fetchChildrenForRecord: Se,
|
|
4123
4123
|
colorsForResults: j,
|
|
4124
|
-
statusForResults:
|
|
4125
|
-
totalItems:
|
|
4124
|
+
statusForResults: B,
|
|
4125
|
+
totalItems: K,
|
|
4126
4126
|
getAllIds: ke
|
|
4127
4127
|
};
|
|
4128
4128
|
};
|
|
@@ -4140,19 +4140,19 @@ function Nl(e, t) {
|
|
|
4140
4140
|
rootTree: u = !1,
|
|
4141
4141
|
parentContext: c = {},
|
|
4142
4142
|
onChangeSelectedRowKeys: m
|
|
4143
|
-
} = e, [p, h] = v(!1), [g, y] = v(!1), w = re(!1), C = re(null), [x, R] = v(), [b, V] = v(), [_, F] = v(), [S, O] = v(), [T, I] = v(200), A = re(), { height:
|
|
4143
|
+
} = e, [p, h] = v(!1), [g, y] = v(!1), w = re(!1), C = re(null), [x, R] = v(), [b, V] = v(), [_, F] = v(), [S, O] = v(), [T, I] = v(200), A = re(), { height: N } = hn(), W = ee(
|
|
4144
4144
|
At
|
|
4145
|
-
), { processAction:
|
|
4145
|
+
), { processAction: H } = W || {}, U = ee(
|
|
4146
4146
|
ze
|
|
4147
4147
|
), {
|
|
4148
|
-
setResults:
|
|
4149
|
-
setCurrentItemIndex:
|
|
4148
|
+
setResults: E = void 0,
|
|
4149
|
+
setCurrentItemIndex: K = void 0,
|
|
4150
4150
|
currentId: G = void 0,
|
|
4151
4151
|
results: J = void 0,
|
|
4152
4152
|
selectedRowItems: q = void 0,
|
|
4153
4153
|
setSelectedRowItems: j = void 0,
|
|
4154
4154
|
searchParams: M = [],
|
|
4155
|
-
setSearchParams:
|
|
4155
|
+
setSearchParams: B = void 0,
|
|
4156
4156
|
searchVisible: L = !0,
|
|
4157
4157
|
setSearchVisible: se = void 0,
|
|
4158
4158
|
sorter: Q = void 0,
|
|
@@ -4191,7 +4191,7 @@ function Nl(e, t) {
|
|
|
4191
4191
|
model: x,
|
|
4192
4192
|
setSearchTreeNameSearch: X,
|
|
4193
4193
|
setSelectedRowItems: ce,
|
|
4194
|
-
setSearchParams:
|
|
4194
|
+
setSearchParams: B,
|
|
4195
4195
|
setSearchValues: Re,
|
|
4196
4196
|
searchParams: M,
|
|
4197
4197
|
setSearchVisible: se,
|
|
@@ -4203,8 +4203,8 @@ function Nl(e, t) {
|
|
|
4203
4203
|
treeView: b,
|
|
4204
4204
|
sorter: Q,
|
|
4205
4205
|
setSorter: me,
|
|
4206
|
-
setCurrentItemIndex:
|
|
4207
|
-
setResultsActionView:
|
|
4206
|
+
setCurrentItemIndex: K,
|
|
4207
|
+
setResultsActionView: E,
|
|
4208
4208
|
resultsActionView: J,
|
|
4209
4209
|
domain: d,
|
|
4210
4210
|
currentId: G,
|
|
@@ -4234,13 +4234,13 @@ function Nl(e, t) {
|
|
|
4234
4234
|
}, vn = async () => {
|
|
4235
4235
|
R(n);
|
|
4236
4236
|
let De = i;
|
|
4237
|
-
i || (De = await
|
|
4237
|
+
i || (De = await k.getHandler().getView({
|
|
4238
4238
|
model: n,
|
|
4239
4239
|
type: "form",
|
|
4240
4240
|
context: c
|
|
4241
4241
|
}));
|
|
4242
4242
|
let Qe = r;
|
|
4243
|
-
r || (Qe = await
|
|
4243
|
+
r || (Qe = await k.getHandler().getView({
|
|
4244
4244
|
model: n,
|
|
4245
4245
|
type: "tree",
|
|
4246
4246
|
context: c
|
|
@@ -4257,13 +4257,13 @@ function Nl(e, t) {
|
|
|
4257
4257
|
), Jt = z(
|
|
4258
4258
|
async (De) => {
|
|
4259
4259
|
const { id: Qe } = De;
|
|
4260
|
-
A.current || (A.current = await
|
|
4260
|
+
A.current || (A.current = await k.getHandler().treeButOpen({
|
|
4261
4261
|
id: b.view_id,
|
|
4262
4262
|
model: x,
|
|
4263
4263
|
context: c
|
|
4264
4264
|
}));
|
|
4265
4265
|
const st = A.current[0][2];
|
|
4266
|
-
await (
|
|
4266
|
+
await (H == null ? void 0 : H({
|
|
4267
4267
|
actionData: st,
|
|
4268
4268
|
fields: b.fields,
|
|
4269
4269
|
values: {
|
|
@@ -4273,7 +4273,7 @@ function Nl(e, t) {
|
|
|
4273
4273
|
context: c
|
|
4274
4274
|
}));
|
|
4275
4275
|
},
|
|
4276
|
-
[x, c,
|
|
4276
|
+
[x, c, H, b]
|
|
4277
4277
|
), ut = z(
|
|
4278
4278
|
async (De) => {
|
|
4279
4279
|
const { id: Qe } = De;
|
|
@@ -4293,10 +4293,10 @@ function Nl(e, t) {
|
|
|
4293
4293
|
});
|
|
4294
4294
|
},
|
|
4295
4295
|
[x, _, s, Jt, b]
|
|
4296
|
-
),
|
|
4296
|
+
), We = z(async () => {
|
|
4297
4297
|
const De = await Xe();
|
|
4298
4298
|
j == null || j(De.map((Qe) => ({ id: Qe }))), m == null || m(De);
|
|
4299
|
-
}, [Xe, m, j]), Xt = Ce(() => b != null && b.isExpandable ?
|
|
4299
|
+
}, [Xe, m, j]), Xt = Ce(() => b != null && b.isExpandable ? N - 160 : N - (T + 240), [N, T, b == null ? void 0 : b.isExpandable]), Qt = Ce(
|
|
4300
4300
|
() => q == null ? void 0 : q.map((De) => De.id),
|
|
4301
4301
|
[q]
|
|
4302
4302
|
), Zt = z(() => !b || !_ ? null : /* @__PURE__ */ D(ne, { children: [
|
|
@@ -4343,7 +4343,7 @@ function Nl(e, t) {
|
|
|
4343
4343
|
onFetchChildrenForRecord: b.isExpandable ? oe : void 0,
|
|
4344
4344
|
childField: b.field_parent,
|
|
4345
4345
|
rootTree: u,
|
|
4346
|
-
onSelectAllRecords:
|
|
4346
|
+
onSelectAllRecords: We
|
|
4347
4347
|
}
|
|
4348
4348
|
)
|
|
4349
4349
|
] }), [
|
|
@@ -4368,7 +4368,7 @@ function Nl(e, t) {
|
|
|
4368
4368
|
Ie,
|
|
4369
4369
|
xe,
|
|
4370
4370
|
L,
|
|
4371
|
-
|
|
4371
|
+
We,
|
|
4372
4372
|
Qt,
|
|
4373
4373
|
Q,
|
|
4374
4374
|
Ae,
|
|
@@ -4430,7 +4430,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4430
4430
|
/* @__PURE__ */ o(
|
|
4431
4431
|
_e,
|
|
4432
4432
|
{
|
|
4433
|
-
icon: /* @__PURE__ */ o(
|
|
4433
|
+
icon: /* @__PURE__ */ o(jt, {}),
|
|
4434
4434
|
onClick: () => {
|
|
4435
4435
|
w();
|
|
4436
4436
|
},
|
|
@@ -4438,7 +4438,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4438
4438
|
children: m("ok")
|
|
4439
4439
|
}
|
|
4440
4440
|
),
|
|
4441
|
-
/* @__PURE__ */ o(_e, { icon: /* @__PURE__ */ o(
|
|
4441
|
+
/* @__PURE__ */ o(_e, { icon: /* @__PURE__ */ o(Wt, {}), onClick: g, children: m("cancel") })
|
|
4442
4442
|
] }) })
|
|
4443
4443
|
] });
|
|
4444
4444
|
return /* @__PURE__ */ D(ne, { children: [
|
|
@@ -4497,20 +4497,20 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4497
4497
|
context: l,
|
|
4498
4498
|
id: d,
|
|
4499
4499
|
domain: f
|
|
4500
|
-
} = i, u = r && !a ? { backgroundColor: Oo.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, C] = v(), x = re(!1), [R, b] = v(""), V = re(), _ = ee(Ee), { domain: F, getValues: S, getFields: O, getContext: T, elementHasLostFocus: I } = _ || {}, A = re([]), [
|
|
4500
|
+
} = i, u = r && !a ? { backgroundColor: Oo.colorPrimaryBg } : void 0, [c, m] = v(!1), [p, h] = v(!1), [g, y] = v(!1), [w, C] = v(), x = re(!1), [R, b] = v(""), V = re(), _ = ee(Ee), { domain: F, getValues: S, getFields: O, getContext: T, elementHasLostFocus: I } = _ || {}, A = re([]), [N, W] = v([]), H = t && t[0] || void 0, U = t && t[1] || "";
|
|
4501
4501
|
le(() => {
|
|
4502
4502
|
!Array.isArray(t) && t && q(t);
|
|
4503
4503
|
}, [t]), le(() => {
|
|
4504
|
-
|
|
4504
|
+
H && U.length === 0 ? q(H) : H && U.length > 0 ? b(U) : !H && !U && b(V.current || "");
|
|
4505
4505
|
}, [t]);
|
|
4506
|
-
const
|
|
4506
|
+
const E = (L) => {
|
|
4507
4507
|
n == null || n(L), I == null || I();
|
|
4508
|
-
},
|
|
4509
|
-
V.current = L.target.value,
|
|
4508
|
+
}, K = (L) => {
|
|
4509
|
+
V.current = L.target.value, E([void 0, ""]);
|
|
4510
4510
|
}, G = async () => {
|
|
4511
4511
|
if (!g && R !== U) {
|
|
4512
4512
|
if (await new Promise((L) => setTimeout(L, 100)), x.current) {
|
|
4513
|
-
|
|
4513
|
+
E([void 0, ""]);
|
|
4514
4514
|
return;
|
|
4515
4515
|
}
|
|
4516
4516
|
y(!0);
|
|
@@ -4518,12 +4518,12 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4518
4518
|
if (A.current && A.current.length > 0)
|
|
4519
4519
|
J(V.current);
|
|
4520
4520
|
else {
|
|
4521
|
-
const L = await
|
|
4521
|
+
const L = await k.getHandler().nameSearch({
|
|
4522
4522
|
model: s,
|
|
4523
4523
|
payload: V.current,
|
|
4524
4524
|
context: { ...T == null ? void 0 : T(), ...l }
|
|
4525
4525
|
});
|
|
4526
|
-
L.length === 1 ? (V.current = void 0,
|
|
4526
|
+
L.length === 1 ? (V.current = void 0, E(L[0])) : J(V.current);
|
|
4527
4527
|
}
|
|
4528
4528
|
} catch (L) {
|
|
4529
4529
|
on(L);
|
|
@@ -4533,7 +4533,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4533
4533
|
}
|
|
4534
4534
|
}, J = async (L) => {
|
|
4535
4535
|
if (await j(), A.current && A.current.length > 0) {
|
|
4536
|
-
const se = await
|
|
4536
|
+
const se = await k.getHandler().searchAllIds({
|
|
4537
4537
|
params: A.current,
|
|
4538
4538
|
model: s,
|
|
4539
4539
|
context: { ...T == null ? void 0 : T(), ...l },
|
|
@@ -4546,13 +4546,13 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4546
4546
|
}, q = async (L) => {
|
|
4547
4547
|
y(!0);
|
|
4548
4548
|
try {
|
|
4549
|
-
const se = await
|
|
4549
|
+
const se = await k.getHandler().execute({
|
|
4550
4550
|
action: "name_get",
|
|
4551
4551
|
payload: [L],
|
|
4552
4552
|
model: s,
|
|
4553
4553
|
context: { ...T == null ? void 0 : T(), ...l }
|
|
4554
4554
|
});
|
|
4555
|
-
|
|
4555
|
+
E([L, se[0][1]]);
|
|
4556
4556
|
} catch (se) {
|
|
4557
4557
|
on(se);
|
|
4558
4558
|
} finally {
|
|
@@ -4560,7 +4560,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4560
4560
|
}
|
|
4561
4561
|
};
|
|
4562
4562
|
async function j() {
|
|
4563
|
-
f && (A.current = await
|
|
4563
|
+
f && (A.current = await k.getHandler().evalDomain({
|
|
4564
4564
|
domain: f,
|
|
4565
4565
|
values: Vt({
|
|
4566
4566
|
fields: O(),
|
|
@@ -4573,10 +4573,10 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4573
4573
|
domain: F,
|
|
4574
4574
|
widgetFieldName: d
|
|
4575
4575
|
})
|
|
4576
|
-
)),
|
|
4576
|
+
)), W(A.current);
|
|
4577
4577
|
}
|
|
4578
4578
|
async function M(L) {
|
|
4579
|
-
L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await G()) : L.code === "Backspace" &&
|
|
4579
|
+
L.keyCode === 13 ? (L.preventDefault(), L.stopPropagation(), await G()) : L.code === "Backspace" && H !== void 0 && (L.preventDefault(), L.stopPropagation(), E([void 0, ""]));
|
|
4580
4580
|
}
|
|
4581
4581
|
return /* @__PURE__ */ D(Te, { gutter: 8, wrap: !1, children: [
|
|
4582
4582
|
/* @__PURE__ */ o(de, { flex: "auto", style: { paddingRight: 0 }, children: /* @__PURE__ */ o(
|
|
@@ -4585,7 +4585,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4585
4585
|
type: "text",
|
|
4586
4586
|
value: R,
|
|
4587
4587
|
disabled: a,
|
|
4588
|
-
onChange:
|
|
4588
|
+
onChange: K,
|
|
4589
4589
|
style: {
|
|
4590
4590
|
...u,
|
|
4591
4591
|
borderTopRightRadius: 0,
|
|
@@ -4596,7 +4596,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4596
4596
|
suffix: /* @__PURE__ */ o(
|
|
4597
4597
|
nr,
|
|
4598
4598
|
{
|
|
4599
|
-
id:
|
|
4599
|
+
id: H,
|
|
4600
4600
|
model: s,
|
|
4601
4601
|
context: { ...T == null ? void 0 : T(), ...l }
|
|
4602
4602
|
}
|
|
@@ -4606,8 +4606,8 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4606
4606
|
/* @__PURE__ */ o(de, { flex: "none", style: { paddingRight: 0, paddingLeft: 0 }, children: /* @__PURE__ */ o(
|
|
4607
4607
|
_e,
|
|
4608
4608
|
{
|
|
4609
|
-
icon: /* @__PURE__ */ o(
|
|
4610
|
-
disabled:
|
|
4609
|
+
icon: /* @__PURE__ */ o(Wn, {}),
|
|
4610
|
+
disabled: H === void 0 || U === "" || R === void 0,
|
|
4611
4611
|
onClick: () => {
|
|
4612
4612
|
h(!0);
|
|
4613
4613
|
},
|
|
@@ -4631,10 +4631,10 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4631
4631
|
Io,
|
|
4632
4632
|
{
|
|
4633
4633
|
model: s,
|
|
4634
|
-
domain:
|
|
4634
|
+
domain: N,
|
|
4635
4635
|
context: { ...T == null ? void 0 : T(), ...l },
|
|
4636
4636
|
visible: c,
|
|
4637
|
-
nameSearch:
|
|
4637
|
+
nameSearch: H ? void 0 : w,
|
|
4638
4638
|
onSelectValues: (L) => {
|
|
4639
4639
|
m(!1), q(L[0]), x.current = !1, V.current = void 0;
|
|
4640
4640
|
},
|
|
@@ -4667,7 +4667,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4667
4667
|
}
|
|
4668
4668
|
`, zt = Je.createContext(
|
|
4669
4669
|
null
|
|
4670
|
-
),
|
|
4670
|
+
), Wl = ({
|
|
4671
4671
|
children: e,
|
|
4672
4672
|
initialView: t
|
|
4673
4673
|
}) => {
|
|
@@ -4686,7 +4686,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4686
4686
|
children: e
|
|
4687
4687
|
}
|
|
4688
4688
|
);
|
|
4689
|
-
},
|
|
4689
|
+
}, jl = ({ model: e }) => {
|
|
4690
4690
|
const t = z(() => {
|
|
4691
4691
|
const i = localStorage.getItem(`columnState-${e}`);
|
|
4692
4692
|
return i ? JSON.parse(i) : void 0;
|
|
@@ -4731,24 +4731,24 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4731
4731
|
s
|
|
4732
4732
|
), [s, r]), V = z(
|
|
4733
4733
|
async (O, T) => {
|
|
4734
|
-
const I = x.current,
|
|
4735
|
-
const G = I.find((J) => J.id ===
|
|
4734
|
+
const I = x.current, N = I.map((K) => K.id).slice(O, T), W = N.filter((K) => {
|
|
4735
|
+
const G = I.find((J) => J.id === K);
|
|
4736
4736
|
return G && (G.operation === "original" || G.operation === "pendingLink");
|
|
4737
4737
|
});
|
|
4738
|
-
if (
|
|
4738
|
+
if (W.length === 0)
|
|
4739
4739
|
return [];
|
|
4740
|
-
const { results:
|
|
4740
|
+
const { results: H, colors: U } = await a(W), E = N.map((K) => {
|
|
4741
4741
|
var J;
|
|
4742
|
-
const G =
|
|
4743
|
-
return G || ((J = I.find((q) => q.id ===
|
|
4742
|
+
const G = H.find((q) => q.id === K);
|
|
4743
|
+
return G || ((J = I.find((q) => q.id === K)) == null ? void 0 : J.treeValues);
|
|
4744
4744
|
});
|
|
4745
|
-
return w.current = { ...w.current, ...U },
|
|
4745
|
+
return w.current = { ...w.current, ...U }, E;
|
|
4746
4746
|
},
|
|
4747
4747
|
[a]
|
|
4748
4748
|
), _ = z((O) => {
|
|
4749
4749
|
if (w.current[O.id])
|
|
4750
4750
|
return { color: w.current[O.id] };
|
|
4751
|
-
}, []), { getColumnState: F, updateColumnState: S } =
|
|
4751
|
+
}, []), { getColumnState: F, updateColumnState: S } = jl({
|
|
4752
4752
|
model: f
|
|
4753
4753
|
});
|
|
4754
4754
|
return /* @__PURE__ */ o(
|
|
@@ -4786,7 +4786,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4786
4786
|
l();
|
|
4787
4787
|
}, [a]);
|
|
4788
4788
|
async function l() {
|
|
4789
|
-
t && (n.current = await
|
|
4789
|
+
t && (n.current = await k.getHandler().evalDomain({
|
|
4790
4790
|
domain: t,
|
|
4791
4791
|
values: Vt({
|
|
4792
4792
|
fields: i(),
|
|
@@ -4819,7 +4819,7 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4819
4819
|
return {
|
|
4820
4820
|
onTreeFetchRows: $t(
|
|
4821
4821
|
async (h) => {
|
|
4822
|
-
const g = await
|
|
4822
|
+
const g = await k.getHandler().readEvalUiObjects({
|
|
4823
4823
|
model: t,
|
|
4824
4824
|
ids: h,
|
|
4825
4825
|
arch: e.arch,
|
|
@@ -4969,12 +4969,12 @@ const Ro = ct(Nl), Io = (e) => {
|
|
|
4969
4969
|
}, [d, e]);
|
|
4970
4970
|
const u = z(
|
|
4971
4971
|
async ({ id: h }) => {
|
|
4972
|
-
const g = (await
|
|
4972
|
+
const g = (await k.getHandler().readObjects({
|
|
4973
4973
|
model: t,
|
|
4974
4974
|
ids: [h],
|
|
4975
4975
|
fields: r.fields,
|
|
4976
4976
|
context: n
|
|
4977
|
-
}))[0], y = (await
|
|
4977
|
+
}))[0], y = (await k.getHandler().readObjects({
|
|
4978
4978
|
model: t,
|
|
4979
4979
|
ids: [h],
|
|
4980
4980
|
fields: i.fields,
|
|
@@ -5264,7 +5264,7 @@ const ic = ({
|
|
|
5264
5264
|
const { id: V } = b;
|
|
5265
5265
|
let _ = r;
|
|
5266
5266
|
const F = r.find((S) => S.id === V);
|
|
5267
|
-
(F == null ? void 0 : F.values) === void 0 && (_ = await
|
|
5267
|
+
(F == null ? void 0 : F.values) === void 0 && (_ = await k.getHandler().readObjects({
|
|
5268
5268
|
model: d,
|
|
5269
5269
|
ids: [b.id],
|
|
5270
5270
|
fields: f.fields,
|
|
@@ -5302,12 +5302,12 @@ const ic = ({
|
|
|
5302
5302
|
const h = n, g = p.filter((y) => !n.find((w) => w.id === y));
|
|
5303
5303
|
try {
|
|
5304
5304
|
for (const y of g) {
|
|
5305
|
-
const w = (await
|
|
5305
|
+
const w = (await k.getHandler().readObjects({
|
|
5306
5306
|
model: a,
|
|
5307
5307
|
ids: [y],
|
|
5308
5308
|
fields: s.get("form").fields,
|
|
5309
5309
|
context: r
|
|
5310
|
-
}))[0], C = (await
|
|
5310
|
+
}))[0], C = (await k.getHandler().readObjects({
|
|
5311
5311
|
model: a,
|
|
5312
5312
|
ids: [y],
|
|
5313
5313
|
fields: s.get("tree").fields,
|
|
@@ -5358,9 +5358,9 @@ const ic = ({
|
|
|
5358
5358
|
setSelectedRowKeys: T,
|
|
5359
5359
|
onChangeFirstVisibleRowIndex: I,
|
|
5360
5360
|
onGetFirstVisibileRowIndex: A,
|
|
5361
|
-
onGetSelectedRowKeys:
|
|
5362
|
-
allRowSelectedMode:
|
|
5363
|
-
onChangeAllRowSelectedMode:
|
|
5361
|
+
onGetSelectedRowKeys: N,
|
|
5362
|
+
allRowSelectedMode: W,
|
|
5363
|
+
onChangeAllRowSelectedMode: H
|
|
5364
5364
|
} = ql({
|
|
5365
5365
|
treeView: s.get("tree"),
|
|
5366
5366
|
relation: p,
|
|
@@ -5368,7 +5368,7 @@ const ic = ({
|
|
|
5368
5368
|
}), U = Ce(() => {
|
|
5369
5369
|
const { title: fe } = s.get(d) || {};
|
|
5370
5370
|
return fe || r.label;
|
|
5371
|
-
}, [d, r.label, s]),
|
|
5371
|
+
}, [d, r.label, s]), E = r.type === "many2many", K = z(
|
|
5372
5372
|
(fe) => {
|
|
5373
5373
|
var Ie, Me;
|
|
5374
5374
|
i == null || i({
|
|
@@ -5388,10 +5388,10 @@ const ic = ({
|
|
|
5388
5388
|
treeView: s.get("tree"),
|
|
5389
5389
|
relation: p,
|
|
5390
5390
|
context: V,
|
|
5391
|
-
triggerChange:
|
|
5391
|
+
triggerChange: K
|
|
5392
5392
|
}), {
|
|
5393
5393
|
showFormModal: M,
|
|
5394
|
-
modalItem:
|
|
5394
|
+
modalItem: B,
|
|
5395
5395
|
continuousEntryMode: L,
|
|
5396
5396
|
onCancelFormModal: se,
|
|
5397
5397
|
onFormModalSubmitSucceed: Q,
|
|
@@ -5402,7 +5402,7 @@ const ic = ({
|
|
|
5402
5402
|
inv_field: r.inv_field,
|
|
5403
5403
|
showFormChangesDialogIfNeeded: q,
|
|
5404
5404
|
currentView: d,
|
|
5405
|
-
triggerChange:
|
|
5405
|
+
triggerChange: K,
|
|
5406
5406
|
items: l,
|
|
5407
5407
|
setCurrentView: f,
|
|
5408
5408
|
setItemIndex: c,
|
|
@@ -5417,15 +5417,15 @@ const ic = ({
|
|
|
5417
5417
|
} = sc({
|
|
5418
5418
|
showFormChangesDialogIfNeeded: q,
|
|
5419
5419
|
currentView: d,
|
|
5420
|
-
triggerChange:
|
|
5420
|
+
triggerChange: K,
|
|
5421
5421
|
items: l,
|
|
5422
5422
|
views: s,
|
|
5423
5423
|
context: V,
|
|
5424
5424
|
relation: p
|
|
5425
5425
|
}), { showRemoveConfirm: Fe } = rc({
|
|
5426
|
-
isMany2many:
|
|
5426
|
+
isMany2many: E,
|
|
5427
5427
|
items: l,
|
|
5428
|
-
triggerChange:
|
|
5428
|
+
triggerChange: K,
|
|
5429
5429
|
setFormHasChanges: j,
|
|
5430
5430
|
selectedRowKeys: O,
|
|
5431
5431
|
setSelectedRowKeys: T
|
|
@@ -5464,7 +5464,7 @@ const ic = ({
|
|
|
5464
5464
|
mode: d,
|
|
5465
5465
|
title: U,
|
|
5466
5466
|
readOnly: m || !1,
|
|
5467
|
-
isMany2Many:
|
|
5467
|
+
isMany2Many: E,
|
|
5468
5468
|
formHasChanges: G,
|
|
5469
5469
|
totalItems: l.length,
|
|
5470
5470
|
currentItemIndex: u,
|
|
@@ -5493,9 +5493,9 @@ const ic = ({
|
|
|
5493
5493
|
relation: p,
|
|
5494
5494
|
onChangeFirstVisibleRowIndex: I,
|
|
5495
5495
|
onGetFirstVisibleRowIndex: A,
|
|
5496
|
-
onGetSelectedRowKeys:
|
|
5497
|
-
allRowSelectedMode:
|
|
5498
|
-
onAllRowSelectedModeChange:
|
|
5496
|
+
onGetSelectedRowKeys: N,
|
|
5497
|
+
allRowSelectedMode: W,
|
|
5498
|
+
onAllRowSelectedModeChange: H
|
|
5499
5499
|
}
|
|
5500
5500
|
),
|
|
5501
5501
|
d === "form" && /* @__PURE__ */ o(
|
|
@@ -5514,10 +5514,10 @@ const ic = ({
|
|
|
5514
5514
|
{
|
|
5515
5515
|
formView: s.get("form"),
|
|
5516
5516
|
model: p,
|
|
5517
|
-
id:
|
|
5517
|
+
id: B == null ? void 0 : B.id,
|
|
5518
5518
|
submitMode: "2many",
|
|
5519
|
-
values:
|
|
5520
|
-
defaultValues:
|
|
5519
|
+
values: B == null ? void 0 : B.values,
|
|
5520
|
+
defaultValues: B == null ? void 0 : B.defaultValues,
|
|
5521
5521
|
visible: M,
|
|
5522
5522
|
onSubmitSucceed: Q,
|
|
5523
5523
|
parentContext: V,
|
|
@@ -5549,7 +5549,7 @@ const ic = ({
|
|
|
5549
5549
|
pt(() => {
|
|
5550
5550
|
w();
|
|
5551
5551
|
}, [t]);
|
|
5552
|
-
const y = async (x) => r && r[x] ? r[x] : await
|
|
5552
|
+
const y = async (x) => r && r[x] ? r[x] : await k.getHandler().getView({
|
|
5553
5553
|
model: i,
|
|
5554
5554
|
type: x,
|
|
5555
5555
|
context: { ...g == null ? void 0 : g(), ...a }
|
|
@@ -5572,7 +5572,7 @@ const ic = ({
|
|
|
5572
5572
|
f(!1);
|
|
5573
5573
|
}
|
|
5574
5574
|
};
|
|
5575
|
-
return n && n.length > 0 ? l = n[0] : l = "tree", d ? /* @__PURE__ */ o(Ne, {}) : u ? /* @__PURE__ */ o(qe, { className: "mt-10", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ o(
|
|
5575
|
+
return n && n.length > 0 ? l = n[0] : l = "tree", d ? /* @__PURE__ */ o(Ne, {}) : u ? /* @__PURE__ */ o(qe, { className: "mt-10", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ o(Wl, { initialView: l, children: /* @__PURE__ */ o(
|
|
5576
5576
|
ge,
|
|
5577
5577
|
{
|
|
5578
5578
|
required: s,
|
|
@@ -5802,7 +5802,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5802
5802
|
y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
|
|
5803
5803
|
["id", "in", n == null ? void 0 : n.map((R) => R.id)]
|
|
5804
5804
|
]);
|
|
5805
|
-
const { datas: C } = await
|
|
5805
|
+
const { datas: C } = await k.getHandler().exportData({
|
|
5806
5806
|
model: e,
|
|
5807
5807
|
fields: Fc({
|
|
5808
5808
|
keys: y.selectedKeys,
|
|
@@ -5819,7 +5819,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5819
5819
|
},
|
|
5820
5820
|
[i, n, e, r, t, s, d]
|
|
5821
5821
|
), u = z(async () => {
|
|
5822
|
-
const y = await
|
|
5822
|
+
const y = await k.getHandler().getFields({
|
|
5823
5823
|
model: e,
|
|
5824
5824
|
context: t,
|
|
5825
5825
|
fields: []
|
|
@@ -5827,7 +5827,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5827
5827
|
return a.current["/"] = y, _r({ fields: y });
|
|
5828
5828
|
}, [e, t, a]), c = z(
|
|
5829
5829
|
async (y) => {
|
|
5830
|
-
const C = Ln(y, a.current)[Nn(y)], x = C.relation, R = await
|
|
5830
|
+
const C = Ln(y, a.current)[Nn(y)], x = C.relation, R = await k.getHandler().getFields({
|
|
5831
5831
|
model: x,
|
|
5832
5832
|
context: t,
|
|
5833
5833
|
fields: []
|
|
@@ -5866,7 +5866,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5866
5866
|
};
|
|
5867
5867
|
}, [t, e, c]), p = z(
|
|
5868
5868
|
async (y) => {
|
|
5869
|
-
await
|
|
5869
|
+
await k.getHandler().deleteObjects({
|
|
5870
5870
|
model: "ir.exports",
|
|
5871
5871
|
ids: [y.id],
|
|
5872
5872
|
context: t
|
|
@@ -5877,7 +5877,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5877
5877
|
async (y) => {
|
|
5878
5878
|
if (l.current.has(y))
|
|
5879
5879
|
return l.current.get(y);
|
|
5880
|
-
const w =
|
|
5880
|
+
const w = k.getHandler().getFields({
|
|
5881
5881
|
model: y,
|
|
5882
5882
|
context: t,
|
|
5883
5883
|
fields: []
|
|
@@ -5887,7 +5887,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5887
5887
|
[l, t]
|
|
5888
5888
|
), g = z(
|
|
5889
5889
|
async (y) => {
|
|
5890
|
-
const w = await h("ir.exports"), C = await h("ir.exports.line"), x = await
|
|
5890
|
+
const w = await h("ir.exports"), C = await h("ir.exports.line"), x = await k.getHandler().create({
|
|
5891
5891
|
model: "ir.exports",
|
|
5892
5892
|
values: {
|
|
5893
5893
|
name: y.name,
|
|
@@ -5897,7 +5897,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5897
5897
|
context: t
|
|
5898
5898
|
});
|
|
5899
5899
|
return await Promise.all(
|
|
5900
|
-
y.fields.map(async (R) => await
|
|
5900
|
+
y.fields.map(async (R) => await k.getHandler().create({
|
|
5901
5901
|
model: "ir.exports.line",
|
|
5902
5902
|
values: {
|
|
5903
5903
|
name: R.key,
|
|
@@ -5952,11 +5952,11 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
5952
5952
|
model: e,
|
|
5953
5953
|
context: t
|
|
5954
5954
|
}) => {
|
|
5955
|
-
const n = await
|
|
5955
|
+
const n = await k.getHandler().search({
|
|
5956
5956
|
model: "ir.exports",
|
|
5957
5957
|
params: [["resource", "=", e]],
|
|
5958
5958
|
context: t
|
|
5959
|
-
}), i = n.flatMap((s) => s.export_fields), r = await
|
|
5959
|
+
}), i = n.flatMap((s) => s.export_fields), r = await k.getHandler().readObjects({
|
|
5960
5960
|
model: "ir.exports.line",
|
|
5961
5961
|
ids: i,
|
|
5962
5962
|
context: t
|
|
@@ -6046,7 +6046,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
6046
6046
|
onClose: n
|
|
6047
6047
|
});
|
|
6048
6048
|
return /* @__PURE__ */ o(
|
|
6049
|
-
|
|
6049
|
+
Wi,
|
|
6050
6050
|
{
|
|
6051
6051
|
visible: t,
|
|
6052
6052
|
onSucceed: u,
|
|
@@ -6179,7 +6179,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
6179
6179
|
/* @__PURE__ */ o(
|
|
6180
6180
|
_e,
|
|
6181
6181
|
{
|
|
6182
|
-
icon: /* @__PURE__ */ o(
|
|
6182
|
+
icon: /* @__PURE__ */ o(Wn, {}),
|
|
6183
6183
|
disabled: r,
|
|
6184
6184
|
onClick: () => {
|
|
6185
6185
|
f.current.click();
|
|
@@ -6194,7 +6194,7 @@ const { useToken: pc } = Pe, { TextArea: Mn } = Ze, gc = (e) => {
|
|
|
6194
6194
|
tooltip: m("download"),
|
|
6195
6195
|
disabled: !n,
|
|
6196
6196
|
onClick: g,
|
|
6197
|
-
icon: /* @__PURE__ */ o(
|
|
6197
|
+
icon: /* @__PURE__ */ o(jn, {})
|
|
6198
6198
|
}
|
|
6199
6199
|
),
|
|
6200
6200
|
/* @__PURE__ */ o(
|
|
@@ -6365,7 +6365,7 @@ const { confirm: Nc } = Ge, Lc = ({
|
|
|
6365
6365
|
});
|
|
6366
6366
|
};
|
|
6367
6367
|
async function ko(e, t, n) {
|
|
6368
|
-
const i = (await
|
|
6368
|
+
const i = (await k.getHandler().getLogInfo({
|
|
6369
6369
|
model: e,
|
|
6370
6370
|
ids: [t]
|
|
6371
6371
|
}))[0], { create_date: r, create_uid: s, id: a, write_date: l, write_uid: d } = i;
|
|
@@ -6408,7 +6408,7 @@ const $c = (e) => {
|
|
|
6408
6408
|
onRetrieveData: async () => [
|
|
6409
6409
|
{
|
|
6410
6410
|
items: n.map((c) => {
|
|
6411
|
-
const m = c.link ? fr :
|
|
6411
|
+
const m = c.link ? fr : jn, p = /* @__PURE__ */ D(Te, { wrap: !1, align: "middle", gutter: 8, children: [
|
|
6412
6412
|
/* @__PURE__ */ o(de, { style: { textAlign: "center" }, children: (c.datas_fname || c.link) && /* @__PURE__ */ o(
|
|
6413
6413
|
mt,
|
|
6414
6414
|
{
|
|
@@ -6496,7 +6496,7 @@ function Hc(e) {
|
|
|
6496
6496
|
if (!(!t || t.length === 0)) {
|
|
6497
6497
|
d(!0);
|
|
6498
6498
|
try {
|
|
6499
|
-
const w = await
|
|
6499
|
+
const w = await k.getHandler().readObjects({
|
|
6500
6500
|
model: "ir.attachment",
|
|
6501
6501
|
ids: t.map((C) => C.id),
|
|
6502
6502
|
fieldsToRetrieve: ["name", "datas_fname", "link"],
|
|
@@ -6524,7 +6524,7 @@ function Hc(e) {
|
|
|
6524
6524
|
m(!0);
|
|
6525
6525
|
let C;
|
|
6526
6526
|
try {
|
|
6527
|
-
C = (await
|
|
6527
|
+
C = (await k.getHandler().readObjects({
|
|
6528
6528
|
model: "ir.attachment",
|
|
6529
6529
|
ids: [w.id],
|
|
6530
6530
|
context: a.current.getContext()
|
|
@@ -6606,8 +6606,8 @@ function Bc({ toolbar: e }) {
|
|
|
6606
6606
|
At
|
|
6607
6607
|
), { processAction: T } = O || {}, I = ee(
|
|
6608
6608
|
ot
|
|
6609
|
-
), { openRelate: A, openDefaultActionForModel:
|
|
6610
|
-
function
|
|
6609
|
+
), { openRelate: A, openDefaultActionForModel: N } = I || {};
|
|
6610
|
+
function W(M) {
|
|
6611
6611
|
if (s) {
|
|
6612
6612
|
Lc({
|
|
6613
6613
|
t: S,
|
|
@@ -6619,7 +6619,7 @@ function Bc({ toolbar: e }) {
|
|
|
6619
6619
|
}
|
|
6620
6620
|
M();
|
|
6621
6621
|
}
|
|
6622
|
-
function
|
|
6622
|
+
function H(M) {
|
|
6623
6623
|
if (s) {
|
|
6624
6624
|
Gt({
|
|
6625
6625
|
t: S,
|
|
@@ -6634,10 +6634,10 @@ function Bc({ toolbar: e }) {
|
|
|
6634
6634
|
function U() {
|
|
6635
6635
|
d && d.length > u + 1 ? (f == null || f(u + 1), c == null || c(d[u + 1].id)) : d && u + 1 === d.length && (f == null || f(0), c == null || c(d[0].id));
|
|
6636
6636
|
}
|
|
6637
|
-
function
|
|
6637
|
+
function E() {
|
|
6638
6638
|
d && u > 0 ? (f == null || f(u - 1), c == null || c(d[u - 1].id)) : d && u === 0 && (f == null || f(d.length - 1), c == null || c(d[d.length - 1].id));
|
|
6639
6639
|
}
|
|
6640
|
-
function
|
|
6640
|
+
function K() {
|
|
6641
6641
|
Ut({
|
|
6642
6642
|
confirmMessage: S("confirmRemoveItem"),
|
|
6643
6643
|
t: S,
|
|
@@ -6648,15 +6648,15 @@ function Bc({ toolbar: e }) {
|
|
|
6648
6648
|
}
|
|
6649
6649
|
async function G() {
|
|
6650
6650
|
try {
|
|
6651
|
-
p == null || p(!0), await
|
|
6651
|
+
p == null || p(!0), await k.getHandler().deleteObjects({
|
|
6652
6652
|
model: m,
|
|
6653
6653
|
ids: [l],
|
|
6654
6654
|
context: R.current.getContext()
|
|
6655
6655
|
});
|
|
6656
6656
|
const M = d == null ? void 0 : d.filter((L) => L.id !== l);
|
|
6657
6657
|
w == null || w(M);
|
|
6658
|
-
let
|
|
6659
|
-
u > 0 && u <= d.length - 1 && (
|
|
6658
|
+
let B = 0;
|
|
6659
|
+
u > 0 && u <= d.length - 1 && (B = u - 1), M != null && M[B] ? (c == null || c(M == null ? void 0 : M[B].id), f == null || f(B)) : (c == null || c(void 0), f == null || f(void 0));
|
|
6660
6660
|
} catch (M) {
|
|
6661
6661
|
on(JSON.stringify(M));
|
|
6662
6662
|
} finally {
|
|
@@ -6666,7 +6666,7 @@ function Bc({ toolbar: e }) {
|
|
|
6666
6666
|
async function J() {
|
|
6667
6667
|
try {
|
|
6668
6668
|
y == null || y(!0);
|
|
6669
|
-
const M = await
|
|
6669
|
+
const M = await k.getHandler().duplicate({
|
|
6670
6670
|
id: l,
|
|
6671
6671
|
model: m,
|
|
6672
6672
|
context: R.current.getContext()
|
|
@@ -6729,7 +6729,7 @@ function Bc({ toolbar: e }) {
|
|
|
6729
6729
|
tooltip: S("delete"),
|
|
6730
6730
|
disabled: a || l === void 0 || h || g || C,
|
|
6731
6731
|
loading: h,
|
|
6732
|
-
onClick:
|
|
6732
|
+
onClick: K
|
|
6733
6733
|
}
|
|
6734
6734
|
),
|
|
6735
6735
|
Ct(),
|
|
@@ -6753,7 +6753,7 @@ function Bc({ toolbar: e }) {
|
|
|
6753
6753
|
disabled: a || l === void 0 || h || g || C,
|
|
6754
6754
|
loading: !1,
|
|
6755
6755
|
onClick: () => {
|
|
6756
|
-
|
|
6756
|
+
W(() => {
|
|
6757
6757
|
R.current.fetchValues();
|
|
6758
6758
|
});
|
|
6759
6759
|
}
|
|
@@ -6783,7 +6783,7 @@ function Bc({ toolbar: e }) {
|
|
|
6783
6783
|
disabled: q,
|
|
6784
6784
|
loading: !1,
|
|
6785
6785
|
onClick: () => {
|
|
6786
|
-
|
|
6786
|
+
H(E);
|
|
6787
6787
|
}
|
|
6788
6788
|
}
|
|
6789
6789
|
),
|
|
@@ -6795,7 +6795,7 @@ function Bc({ toolbar: e }) {
|
|
|
6795
6795
|
disabled: q,
|
|
6796
6796
|
loading: !1,
|
|
6797
6797
|
onClick: () => {
|
|
6798
|
-
|
|
6798
|
+
H(U);
|
|
6799
6799
|
}
|
|
6800
6800
|
}
|
|
6801
6801
|
)
|
|
@@ -6829,14 +6829,14 @@ function Bc({ toolbar: e }) {
|
|
|
6829
6829
|
onItemClick: async (M) => {
|
|
6830
6830
|
if (!M)
|
|
6831
6831
|
return;
|
|
6832
|
-
const
|
|
6832
|
+
const B = await xt({
|
|
6833
6833
|
onFormSave: r
|
|
6834
6834
|
});
|
|
6835
|
-
|
|
6835
|
+
B.succeed && j({
|
|
6836
6836
|
...M,
|
|
6837
6837
|
datas: {
|
|
6838
6838
|
...M.datas || {},
|
|
6839
|
-
ids: [
|
|
6839
|
+
ids: [B.currentId]
|
|
6840
6840
|
}
|
|
6841
6841
|
});
|
|
6842
6842
|
}
|
|
@@ -6875,9 +6875,9 @@ function Bc({ toolbar: e }) {
|
|
|
6875
6875
|
});
|
|
6876
6876
|
if (!M.succeed)
|
|
6877
6877
|
return;
|
|
6878
|
-
const
|
|
6879
|
-
|
|
6880
|
-
...Ar(m,
|
|
6878
|
+
const B = M.currentId;
|
|
6879
|
+
N({
|
|
6880
|
+
...Ar(m, B),
|
|
6881
6881
|
initialViewType: "form"
|
|
6882
6882
|
});
|
|
6883
6883
|
},
|
|
@@ -6887,16 +6887,16 @@ function Bc({ toolbar: e }) {
|
|
|
6887
6887
|
});
|
|
6888
6888
|
if (!M.succeed)
|
|
6889
6889
|
return;
|
|
6890
|
-
const
|
|
6891
|
-
|
|
6892
|
-
...Ar(m,
|
|
6890
|
+
const B = M.currentId;
|
|
6891
|
+
N({
|
|
6892
|
+
...Ar(m, B),
|
|
6893
6893
|
initialViewType: "tree"
|
|
6894
6894
|
});
|
|
6895
6895
|
},
|
|
6896
6896
|
onViewAttachmentDetails: async (M) => {
|
|
6897
6897
|
(await xt({
|
|
6898
6898
|
onFormSave: r
|
|
6899
|
-
})).succeed &&
|
|
6899
|
+
})).succeed && N({
|
|
6900
6900
|
model: "ir.attachment",
|
|
6901
6901
|
res_id: M.id,
|
|
6902
6902
|
initialViewType: "form"
|
|
@@ -6943,7 +6943,7 @@ const { useToken: Kc } = Pe, Mo = (e) => {
|
|
|
6943
6943
|
l ? null : /* @__PURE__ */ o(de, { flex: "none", children: p ? /* @__PURE__ */ o(
|
|
6944
6944
|
_e,
|
|
6945
6945
|
{
|
|
6946
|
-
icon: /* @__PURE__ */ o(
|
|
6946
|
+
icon: /* @__PURE__ */ o(jt, {}),
|
|
6947
6947
|
onClick: () => {
|
|
6948
6948
|
r(n) && (h(!1), y(!1));
|
|
6949
6949
|
},
|
|
@@ -6987,7 +6987,7 @@ const { useToken: Kc } = Pe, Mo = (e) => {
|
|
|
6987
6987
|
}
|
|
6988
6988
|
) })
|
|
6989
6989
|
] });
|
|
6990
|
-
},
|
|
6990
|
+
}, Wc = (e) => {
|
|
6991
6991
|
const { ooui: t } = e, { required: n } = t;
|
|
6992
6992
|
return /* @__PURE__ */ o(ge, { required: n, ...e, children: /* @__PURE__ */ o(
|
|
6993
6993
|
Mo,
|
|
@@ -6996,7 +6996,7 @@ const { useToken: Kc } = Pe, Mo = (e) => {
|
|
|
6996
6996
|
valueValidator: (i) => i ? us(i) : !1
|
|
6997
6997
|
}
|
|
6998
6998
|
) });
|
|
6999
|
-
},
|
|
6999
|
+
}, jc = (e) => {
|
|
7000
7000
|
const { ooui: t } = e, { required: n } = t;
|
|
7001
7001
|
return /* @__PURE__ */ o(ge, { required: n, ...e, children: /* @__PURE__ */ o(
|
|
7002
7002
|
Mo,
|
|
@@ -7045,7 +7045,7 @@ const { useToken: Kc } = Pe, Mo = (e) => {
|
|
|
7045
7045
|
/* @__PURE__ */ o(
|
|
7046
7046
|
_e,
|
|
7047
7047
|
{
|
|
7048
|
-
icon: /* @__PURE__ */ o(
|
|
7048
|
+
icon: /* @__PURE__ */ o(Wt, {}),
|
|
7049
7049
|
htmlType: "button",
|
|
7050
7050
|
onClick: i,
|
|
7051
7051
|
disabled: r,
|
|
@@ -7057,7 +7057,7 @@ const { useToken: Kc } = Pe, Mo = (e) => {
|
|
|
7057
7057
|
{
|
|
7058
7058
|
loading: r,
|
|
7059
7059
|
style: { marginLeft: 15 },
|
|
7060
|
-
icon: /* @__PURE__ */ o(
|
|
7060
|
+
icon: /* @__PURE__ */ o(jt, {}),
|
|
7061
7061
|
htmlType: "submit",
|
|
7062
7062
|
type: "primary",
|
|
7063
7063
|
disabled: r,
|
|
@@ -7421,29 +7421,29 @@ const { getValueForOperator: Dr } = Kr, Qc = (e) => {
|
|
|
7421
7421
|
field: f,
|
|
7422
7422
|
operator: u,
|
|
7423
7423
|
manualIds: c
|
|
7424
|
-
} = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [C, x] = v(), [R, b] = v(), [V, _] = v(), [F, S] = v(), [O] =
|
|
7425
|
-
|
|
7426
|
-
), [T] =
|
|
7427
|
-
|
|
7428
|
-
), [I] =
|
|
7429
|
-
|
|
7430
|
-
), [A] =
|
|
7431
|
-
|
|
7432
|
-
), [
|
|
7433
|
-
|
|
7424
|
+
} = e, [m, p] = v(!1), [h, g] = v(), [y, w] = v(), [C, x] = v(), [R, b] = v(), [V, _] = v(), [F, S] = v(), [O] = je(
|
|
7425
|
+
k.getHandler().searchAllIds
|
|
7426
|
+
), [T] = je(
|
|
7427
|
+
k.getHandler().readObjects
|
|
7428
|
+
), [I] = je(
|
|
7429
|
+
k.getHandler().searchCount
|
|
7430
|
+
), [A] = je(
|
|
7431
|
+
k.getHandler().evalDomain
|
|
7432
|
+
), [N] = je(
|
|
7433
|
+
k.getHandler().parseCondition
|
|
7434
7434
|
);
|
|
7435
7435
|
le(() => {
|
|
7436
7436
|
U();
|
|
7437
7437
|
}, [t, r]);
|
|
7438
|
-
async function
|
|
7439
|
-
domain:
|
|
7440
|
-
isTotal:
|
|
7438
|
+
async function W({
|
|
7439
|
+
domain: E,
|
|
7440
|
+
isTotal: K
|
|
7441
7441
|
}) {
|
|
7442
|
-
if (
|
|
7443
|
-
return await
|
|
7442
|
+
if (K)
|
|
7443
|
+
return await H({ domain: E });
|
|
7444
7444
|
if (f && u) {
|
|
7445
7445
|
const G = c || await O({
|
|
7446
|
-
params:
|
|
7446
|
+
params: E,
|
|
7447
7447
|
model: t,
|
|
7448
7448
|
context: i
|
|
7449
7449
|
}), J = await T({
|
|
@@ -7459,19 +7459,19 @@ const { getValueForOperator: Dr } = Kr, Qc = (e) => {
|
|
|
7459
7459
|
} else
|
|
7460
7460
|
return c ? c.length : await I({
|
|
7461
7461
|
model: t,
|
|
7462
|
-
params:
|
|
7462
|
+
params: E,
|
|
7463
7463
|
context: i
|
|
7464
7464
|
});
|
|
7465
7465
|
}
|
|
7466
|
-
async function
|
|
7466
|
+
async function H({ domain: E }) {
|
|
7467
7467
|
if (f && u) {
|
|
7468
|
-
const
|
|
7469
|
-
params:
|
|
7468
|
+
const K = await O({
|
|
7469
|
+
params: E,
|
|
7470
7470
|
model: t,
|
|
7471
7471
|
context: i
|
|
7472
7472
|
}), G = await T({
|
|
7473
7473
|
model: t,
|
|
7474
|
-
ids:
|
|
7474
|
+
ids: K,
|
|
7475
7475
|
fieldsToRetrieve: [f],
|
|
7476
7476
|
context: i
|
|
7477
7477
|
});
|
|
@@ -7482,39 +7482,39 @@ const { getValueForOperator: Dr } = Kr, Qc = (e) => {
|
|
|
7482
7482
|
} else
|
|
7483
7483
|
return await I({
|
|
7484
7484
|
model: t,
|
|
7485
|
-
params:
|
|
7485
|
+
params: E,
|
|
7486
7486
|
context: i
|
|
7487
7487
|
});
|
|
7488
7488
|
}
|
|
7489
7489
|
async function U() {
|
|
7490
7490
|
p(!0), S(void 0);
|
|
7491
|
-
let
|
|
7491
|
+
let E, K;
|
|
7492
7492
|
try {
|
|
7493
|
-
const G = await
|
|
7493
|
+
const G = await W({ domain: n, isTotal: !1 });
|
|
7494
7494
|
if (g(G), s) {
|
|
7495
7495
|
const J = await A({
|
|
7496
7496
|
domain: s,
|
|
7497
7497
|
values: {},
|
|
7498
7498
|
context: i
|
|
7499
7499
|
});
|
|
7500
|
-
|
|
7500
|
+
E = await W({
|
|
7501
7501
|
domain: J,
|
|
7502
7502
|
isTotal: !0
|
|
7503
|
-
}), x(
|
|
7503
|
+
}), x(E);
|
|
7504
7504
|
}
|
|
7505
|
-
if (
|
|
7506
|
-
const J = await
|
|
7505
|
+
if (E ? (K = Math.round(G / E * 100 * 100) / 100, w(K)) : w(0), r) {
|
|
7506
|
+
const J = await N({
|
|
7507
7507
|
condition: r,
|
|
7508
|
-
values: { value: G, percent:
|
|
7508
|
+
values: { value: G, percent: K },
|
|
7509
7509
|
context: i
|
|
7510
7510
|
});
|
|
7511
7511
|
b(J);
|
|
7512
7512
|
}
|
|
7513
7513
|
if (l)
|
|
7514
7514
|
if (l.indexOf(":") !== -1) {
|
|
7515
|
-
const J = await
|
|
7515
|
+
const J = await N({
|
|
7516
7516
|
condition: l,
|
|
7517
|
-
values: { value: G, percent:
|
|
7517
|
+
values: { value: G, percent: K },
|
|
7518
7518
|
context: i
|
|
7519
7519
|
});
|
|
7520
7520
|
_(J);
|
|
@@ -7547,13 +7547,13 @@ const { getValueForOperator: Dr } = Kr, Qc = (e) => {
|
|
|
7547
7547
|
limit: s,
|
|
7548
7548
|
uninformedString: a,
|
|
7549
7549
|
manualIds: l
|
|
7550
|
-
} = e, [d, f] = v(!1), [u, c] = v(), [m, p] = v(), [h, g] = v(), [y, w] = v("line"), [C] =
|
|
7551
|
-
|
|
7552
|
-
), [x] =
|
|
7553
|
-
|
|
7554
|
-
), [R] =
|
|
7550
|
+
} = e, [d, f] = v(!1), [u, c] = v(), [m, p] = v(), [h, g] = v(), [y, w] = v("line"), [C] = je(
|
|
7551
|
+
k.getHandler().getFields
|
|
7552
|
+
), [x] = je(
|
|
7553
|
+
k.getHandler().readObjects
|
|
7554
|
+
), [R] = je(k.getHandler().search), b = z(async () => {
|
|
7555
7555
|
f(!0), c(void 0);
|
|
7556
|
-
const V =
|
|
7556
|
+
const V = Wr(r);
|
|
7557
7557
|
w(V.type || "line");
|
|
7558
7558
|
const _ = ed({ ooui: V });
|
|
7559
7559
|
let F, S;
|
|
@@ -7904,7 +7904,7 @@ const cd = (e) => {
|
|
|
7904
7904
|
}, dd = (e, t) => {
|
|
7905
7905
|
const { view_id: n, model: i, context: r, domain: s, limit: a, manualIds: l } = e, [d, f] = v(!1), [u, c] = v(), [m, p] = v(), h = ee(
|
|
7906
7906
|
ze
|
|
7907
|
-
), { setGraphIsLoading: g = void 0 } = h || {}, [y] =
|
|
7907
|
+
), { setGraphIsLoading: g = void 0 } = h || {}, [y] = je(k.getHandler().getView);
|
|
7908
7908
|
dt(t, () => ({
|
|
7909
7909
|
refresh: () => {
|
|
7910
7910
|
w();
|
|
@@ -7922,7 +7922,7 @@ const cd = (e) => {
|
|
|
7922
7922
|
context: r
|
|
7923
7923
|
});
|
|
7924
7924
|
p(C.arch);
|
|
7925
|
-
const x =
|
|
7925
|
+
const x = Wr(C.arch);
|
|
7926
7926
|
c(x), f(!1), g == null || g(!1);
|
|
7927
7927
|
} catch (C) {
|
|
7928
7928
|
return console.error(C), f(!1), g == null || g(!1), /* @__PURE__ */ o(ne, { children: JSON.stringify(C) });
|
|
@@ -8008,14 +8008,14 @@ const cd = (e) => {
|
|
|
8008
8008
|
searchValues: O,
|
|
8009
8009
|
setSearchValues: T,
|
|
8010
8010
|
currentView: I
|
|
8011
|
-
} = f || {}, [A,
|
|
8011
|
+
} = f || {}, [A, N] = v(!0);
|
|
8012
8012
|
le(() => {
|
|
8013
8013
|
var G;
|
|
8014
8014
|
(G = d.current) == null || G.refresh();
|
|
8015
8015
|
}, [S]), le(() => {
|
|
8016
|
-
t.view_id !== I.view_id &&
|
|
8016
|
+
t.view_id !== I.view_id && N(!0);
|
|
8017
8017
|
}, [I]);
|
|
8018
|
-
const { clear:
|
|
8018
|
+
const { clear: W, searchFilterLoading: H, searchError: U, offset: E, tableRefreshing: K } = Fo({
|
|
8019
8019
|
model: i,
|
|
8020
8020
|
setSearchTreeNameSearch: b,
|
|
8021
8021
|
setSelectedRowItems: h,
|
|
@@ -8056,11 +8056,11 @@ const cd = (e) => {
|
|
|
8056
8056
|
l.search_fields
|
|
8057
8057
|
]),
|
|
8058
8058
|
limit: _,
|
|
8059
|
-
onClear:
|
|
8060
|
-
offset:
|
|
8061
|
-
isSearching:
|
|
8059
|
+
onClear: W,
|
|
8060
|
+
offset: E,
|
|
8061
|
+
isSearching: H,
|
|
8062
8062
|
onSubmit: (G) => {
|
|
8063
|
-
|
|
8063
|
+
N(!1), g == null || g(G.params), w == null || w(!1);
|
|
8064
8064
|
},
|
|
8065
8065
|
searchError: U,
|
|
8066
8066
|
searchVisible: y,
|
|
@@ -8068,7 +8068,7 @@ const cd = (e) => {
|
|
|
8068
8068
|
showLimitOptions: !1
|
|
8069
8069
|
}
|
|
8070
8070
|
),
|
|
8071
|
-
|
|
8071
|
+
K ? /* @__PURE__ */ o(Ne, {}) : /* @__PURE__ */ o(
|
|
8072
8072
|
Bo,
|
|
8073
8073
|
{
|
|
8074
8074
|
ref: d,
|
|
@@ -8443,15 +8443,15 @@ const hd = {
|
|
|
8443
8443
|
globalValues: {},
|
|
8444
8444
|
rootContext: {},
|
|
8445
8445
|
devMode: !1
|
|
8446
|
-
}, Ko = Je.createContext(wd),
|
|
8446
|
+
}, Ko = Je.createContext(wd), Wo = () => {
|
|
8447
8447
|
const e = ee(Ko);
|
|
8448
8448
|
if (!e)
|
|
8449
8449
|
throw new Error(
|
|
8450
8450
|
"useConfigContext must be used within a ConfigContextProvider"
|
|
8451
8451
|
);
|
|
8452
8452
|
return e;
|
|
8453
|
-
},
|
|
8454
|
-
const { erpFeatures: t } =
|
|
8453
|
+
}, jo = (e) => {
|
|
8454
|
+
const { erpFeatures: t } = Wo();
|
|
8455
8455
|
return !!t[e];
|
|
8456
8456
|
}, vd = $n(
|
|
8457
8457
|
({
|
|
@@ -8473,7 +8473,7 @@ const hd = {
|
|
|
8473
8473
|
[e, i, r, s]
|
|
8474
8474
|
);
|
|
8475
8475
|
return /* @__PURE__ */ o(Ko.Provider, { value: l, children: /* @__PURE__ */ o(
|
|
8476
|
-
|
|
8476
|
+
ji,
|
|
8477
8477
|
{
|
|
8478
8478
|
locale: t,
|
|
8479
8479
|
localizedStrings: Ui(yd, n),
|
|
@@ -8511,24 +8511,24 @@ function bd(e) {
|
|
|
8511
8511
|
results: b,
|
|
8512
8512
|
limit: V,
|
|
8513
8513
|
totalItems: _
|
|
8514
|
-
} = ee(ze), { parentContext: F = {}, treeExpandable: S, toolbar: O } = e, T =
|
|
8514
|
+
} = ee(ze), { parentContext: F = {}, treeExpandable: S, toolbar: O } = e, T = jo(
|
|
8515
8515
|
wn.FEATURE_ADVANCED_EXPORT
|
|
8516
8516
|
), { t: I } = ue(), A = ee(
|
|
8517
8517
|
At
|
|
8518
|
-
), { processAction:
|
|
8519
|
-
function
|
|
8518
|
+
), { processAction: N } = A || {}, [W, H] = v(!1), U = w !== void 0 && w.trim().length > 0;
|
|
8519
|
+
function E() {
|
|
8520
8520
|
Ut({
|
|
8521
8521
|
confirmMessage: I("confirmRemove"),
|
|
8522
8522
|
t: I,
|
|
8523
8523
|
onOk: () => {
|
|
8524
|
-
|
|
8524
|
+
K();
|
|
8525
8525
|
}
|
|
8526
8526
|
});
|
|
8527
8527
|
}
|
|
8528
|
-
async function
|
|
8528
|
+
async function K() {
|
|
8529
8529
|
var j;
|
|
8530
8530
|
try {
|
|
8531
|
-
s == null || s(!0), await
|
|
8531
|
+
s == null || s(!0), await k.getHandler().deleteObjects({
|
|
8532
8532
|
model: f,
|
|
8533
8533
|
ids: r.map((M) => M.id),
|
|
8534
8534
|
context: { ...F }
|
|
@@ -8544,7 +8544,7 @@ function bd(e) {
|
|
|
8544
8544
|
try {
|
|
8545
8545
|
d == null || d(!0);
|
|
8546
8546
|
const M = r[0].id;
|
|
8547
|
-
await
|
|
8547
|
+
await k.getHandler().duplicate({
|
|
8548
8548
|
id: M,
|
|
8549
8549
|
model: f,
|
|
8550
8550
|
context: { ...F }
|
|
@@ -8556,7 +8556,7 @@ function bd(e) {
|
|
|
8556
8556
|
}
|
|
8557
8557
|
}
|
|
8558
8558
|
function J(j) {
|
|
8559
|
-
|
|
8559
|
+
N == null || N({
|
|
8560
8560
|
actionData: j,
|
|
8561
8561
|
values: {
|
|
8562
8562
|
active_id: r == null ? void 0 : r.map((M) => M.id)[0],
|
|
@@ -8628,7 +8628,7 @@ function bd(e) {
|
|
|
8628
8628
|
tooltip: I("delete"),
|
|
8629
8629
|
disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
|
|
8630
8630
|
loading: a,
|
|
8631
|
-
onClick:
|
|
8631
|
+
onClick: E
|
|
8632
8632
|
}
|
|
8633
8633
|
),
|
|
8634
8634
|
gt()
|
|
@@ -8714,7 +8714,7 @@ function bd(e) {
|
|
|
8714
8714
|
{
|
|
8715
8715
|
placement: "bottomRight",
|
|
8716
8716
|
icon: /* @__PURE__ */ o(
|
|
8717
|
-
|
|
8717
|
+
jr,
|
|
8718
8718
|
{
|
|
8719
8719
|
component: () => /* @__PURE__ */ D(
|
|
8720
8720
|
"svg",
|
|
@@ -8756,8 +8756,8 @@ function bd(e) {
|
|
|
8756
8756
|
],
|
|
8757
8757
|
onItemClick: (j) => {
|
|
8758
8758
|
if (j.id === "print_screen") {
|
|
8759
|
-
let M = (r == null ? void 0 : r.map((
|
|
8760
|
-
M.length === 0 && (M = (b == null ? void 0 : b.map((
|
|
8759
|
+
let M = (r == null ? void 0 : r.map((B) => B.id)) || [];
|
|
8760
|
+
M.length === 0 && (M = (b == null ? void 0 : b.map((B) => B.id)) || []), J({
|
|
8761
8761
|
id: -1,
|
|
8762
8762
|
model: f,
|
|
8763
8763
|
report_name: "printscreen.list",
|
|
@@ -8769,7 +8769,7 @@ function bd(e) {
|
|
|
8769
8769
|
});
|
|
8770
8770
|
return;
|
|
8771
8771
|
}
|
|
8772
|
-
|
|
8772
|
+
H(!0);
|
|
8773
8773
|
},
|
|
8774
8774
|
disabled: l || a || C || U
|
|
8775
8775
|
}
|
|
@@ -8777,8 +8777,8 @@ function bd(e) {
|
|
|
8777
8777
|
/* @__PURE__ */ o(
|
|
8778
8778
|
Ic,
|
|
8779
8779
|
{
|
|
8780
|
-
visible:
|
|
8781
|
-
onClose: () =>
|
|
8780
|
+
visible: W,
|
|
8781
|
+
onClose: () => H(!1),
|
|
8782
8782
|
model: f,
|
|
8783
8783
|
domain: Kt(
|
|
8784
8784
|
((q = u == null ? void 0 : u.current) == null ? void 0 : q.getDomain()) || [],
|
|
@@ -8977,7 +8977,7 @@ function Id(e, t) {
|
|
|
8977
8977
|
limit: y
|
|
8978
8978
|
} = e, [w, C] = v(), [x, R] = v([]), [b, V] = v(!0), _ = m || void 0, [F, S] = v(
|
|
8979
8979
|
_
|
|
8980
|
-
), [O, T] = v([]), [I, A] = v(), [
|
|
8980
|
+
), [O, T] = v([]), [I, A] = v(), [N, W] = v([]), [H, U] = v(), [E, K] = v(0), [G, J] = v(!1), [q, j] = v(!1), [M, B] = v(), { t: L } = ue(), se = re(), Q = re(), me = ee(
|
|
8981
8981
|
ot
|
|
8982
8982
|
), {
|
|
8983
8983
|
setCurrentView: ve,
|
|
@@ -8992,7 +8992,7 @@ function Id(e, t) {
|
|
|
8992
8992
|
(Y) => {
|
|
8993
8993
|
Y.preventDefault(), ie();
|
|
8994
8994
|
},
|
|
8995
|
-
[xe, ae, w, I,
|
|
8995
|
+
[xe, ae, w, I, N]
|
|
8996
8996
|
);
|
|
8997
8997
|
function Ve(Y) {
|
|
8998
8998
|
S(Y), X == null || X(Y);
|
|
@@ -9012,7 +9012,7 @@ function Id(e, t) {
|
|
|
9012
9012
|
const [ye, oe] = pe;
|
|
9013
9013
|
oe !== "dashboard" ? be.push({
|
|
9014
9014
|
viewTuple: pe,
|
|
9015
|
-
promise:
|
|
9015
|
+
promise: k.getHandler().getView({
|
|
9016
9016
|
model: i,
|
|
9017
9017
|
type: oe,
|
|
9018
9018
|
id: ye,
|
|
@@ -9107,11 +9107,11 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9107
9107
|
let be, Oe;
|
|
9108
9108
|
if (Y.length === 1) {
|
|
9109
9109
|
be = "form", Oe = [];
|
|
9110
|
-
const ye = Y[0], oe =
|
|
9110
|
+
const ye = Y[0], oe = N.findIndex((Ae) => Ae.id === ye);
|
|
9111
9111
|
let $e;
|
|
9112
9112
|
if (oe === -1) {
|
|
9113
9113
|
try {
|
|
9114
|
-
$e = (pe = await
|
|
9114
|
+
$e = (pe = await k.getHandler().readObjects({
|
|
9115
9115
|
model: i,
|
|
9116
9116
|
ids: [ye],
|
|
9117
9117
|
context: r
|
|
@@ -9123,7 +9123,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9123
9123
|
return;
|
|
9124
9124
|
}
|
|
9125
9125
|
} else
|
|
9126
|
-
$e =
|
|
9126
|
+
$e = N[oe];
|
|
9127
9127
|
} else
|
|
9128
9128
|
be = "tree", Oe = [["id", "in", Y]];
|
|
9129
9129
|
j(!1), J(!1);
|
|
@@ -9157,8 +9157,8 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9157
9157
|
domain: n,
|
|
9158
9158
|
defaultValues: u,
|
|
9159
9159
|
forcedValues: c,
|
|
9160
|
-
results:
|
|
9161
|
-
setResults:
|
|
9160
|
+
results: N,
|
|
9161
|
+
setResults: W,
|
|
9162
9162
|
setCurrentItemIndex: A
|
|
9163
9163
|
},
|
|
9164
9164
|
`${Y.type}-${Y.view_id}`
|
|
@@ -9177,7 +9177,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9177
9177
|
searchTreeRef: Q,
|
|
9178
9178
|
searchTreeNameSearch: M,
|
|
9179
9179
|
availableViews: x,
|
|
9180
|
-
results:
|
|
9180
|
+
results: N,
|
|
9181
9181
|
setCurrentItemIndex: A,
|
|
9182
9182
|
setCurrentId: Ve,
|
|
9183
9183
|
setCurrentView: ce
|
|
@@ -9235,16 +9235,16 @@ Please, make sure the view ids on the fields_view_get responses are the same as
|
|
|
9235
9235
|
setCurrentId: Ve,
|
|
9236
9236
|
setCurrentItemIndex: A,
|
|
9237
9237
|
currentItemIndex: I,
|
|
9238
|
-
results:
|
|
9239
|
-
setResults:
|
|
9238
|
+
results: N,
|
|
9239
|
+
setResults: W,
|
|
9240
9240
|
currentModel: i,
|
|
9241
|
-
sorter:
|
|
9241
|
+
sorter: H,
|
|
9242
9242
|
setSorter: U,
|
|
9243
|
-
totalItems:
|
|
9244
|
-
setTotalItems:
|
|
9243
|
+
totalItems: E,
|
|
9244
|
+
setTotalItems: K,
|
|
9245
9245
|
selectedRowItems: O,
|
|
9246
9246
|
setSelectedRowItems: T,
|
|
9247
|
-
setSearchTreeNameSearch:
|
|
9247
|
+
setSearchTreeNameSearch: B,
|
|
9248
9248
|
searchTreeNameSearch: M,
|
|
9249
9249
|
goToResourceId: fe,
|
|
9250
9250
|
limit: y,
|
|
@@ -9271,14 +9271,14 @@ async function Od({
|
|
|
9271
9271
|
rootContext: t = {},
|
|
9272
9272
|
globalValues: n = {}
|
|
9273
9273
|
}) {
|
|
9274
|
-
const i = "ir.actions.act_window", r = `${i},${e}`, s = await
|
|
9274
|
+
const i = "ir.actions.act_window", r = `${i},${e}`, s = await k.getHandler().getActionData({
|
|
9275
9275
|
action: r,
|
|
9276
9276
|
context: t
|
|
9277
9277
|
}), a = yt({
|
|
9278
9278
|
context: s.context,
|
|
9279
9279
|
values: n,
|
|
9280
9280
|
fields: {}
|
|
9281
|
-
}), l = s.domain ? await
|
|
9281
|
+
}), l = s.domain ? await k.getHandler().evalDomain({
|
|
9282
9282
|
domain: s.domain,
|
|
9283
9283
|
values: n,
|
|
9284
9284
|
context: { ...t, ...a }
|
|
@@ -9294,7 +9294,7 @@ async function Od({
|
|
|
9294
9294
|
if (x)
|
|
9295
9295
|
h.push(C);
|
|
9296
9296
|
else {
|
|
9297
|
-
const { view_id: b } = await
|
|
9297
|
+
const { view_id: b } = await k.getHandler().getView({
|
|
9298
9298
|
model: d,
|
|
9299
9299
|
type: R,
|
|
9300
9300
|
id: x,
|
|
@@ -9413,10 +9413,10 @@ function kd(e) {
|
|
|
9413
9413
|
domain: s = [],
|
|
9414
9414
|
visible: a = !0,
|
|
9415
9415
|
parentContext: l = {}
|
|
9416
|
-
} = e, [d, f] = v(!1), [u, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [C, x] = v(1), [R, b] = v(0), V = re(vt), _ = re([]), [F, S] = v(0), [O, T] = v([]), [I, A] = v(void 0), [
|
|
9416
|
+
} = e, [d, f] = v(!1), [u, c] = v(!1), [m, p] = v(), [h, g] = v(), [y, w] = v(), [C, x] = v(1), [R, b] = v(0), V = re(vt), _ = re([]), [F, S] = v(0), [O, T] = v([]), [I, A] = v(void 0), [N, W] = v(), [H, U] = v(), [E, K] = v(), [G, J] = v(!1), q = re([]), j = (X) => {
|
|
9417
9417
|
J(!0), x(X), b((X - 1) * V.current);
|
|
9418
9418
|
}, M = async () => {
|
|
9419
|
-
const X = q.current.length > 0 ? q.current : s, ae = Kt(_.current, X), { colors: xe } = wt(h), { totalItems: Re, results: Fe, attrsEvaluated: Ve } = await
|
|
9419
|
+
const X = q.current.length > 0 ? q.current : s, ae = Kt(_.current, X), { colors: xe } = wt(h), { totalItems: Re, results: Fe, attrsEvaluated: Ve } = await k.getHandler().searchForTree({
|
|
9420
9420
|
params: ae,
|
|
9421
9421
|
limit: V.current,
|
|
9422
9422
|
offset: R,
|
|
@@ -9428,13 +9428,13 @@ function kd(e) {
|
|
|
9428
9428
|
A(Ht(Ve));
|
|
9429
9429
|
const ce = Pt({
|
|
9430
9430
|
resultsToSort: Fe,
|
|
9431
|
-
sorter:
|
|
9431
|
+
sorter: N,
|
|
9432
9432
|
fields: { ...h.fields, ...y.fields }
|
|
9433
9433
|
});
|
|
9434
9434
|
J(!1), T(ce);
|
|
9435
9435
|
const Se = await Re;
|
|
9436
9436
|
S(Se);
|
|
9437
|
-
},
|
|
9437
|
+
}, B = async () => {
|
|
9438
9438
|
try {
|
|
9439
9439
|
J(!0), await M();
|
|
9440
9440
|
} catch (X) {
|
|
@@ -9442,32 +9442,32 @@ function kd(e) {
|
|
|
9442
9442
|
}
|
|
9443
9443
|
};
|
|
9444
9444
|
le(() => {
|
|
9445
|
-
u && a &&
|
|
9445
|
+
u && a && B();
|
|
9446
9446
|
}, [C, R, u, a]);
|
|
9447
9447
|
const L = async (X) => {
|
|
9448
|
-
c(!1), f(!0),
|
|
9448
|
+
c(!1), f(!0), K(void 0);
|
|
9449
9449
|
try {
|
|
9450
9450
|
X === "action" ? await se() : await Q(), c(!0);
|
|
9451
9451
|
} catch (ae) {
|
|
9452
|
-
|
|
9452
|
+
K(ae);
|
|
9453
9453
|
} finally {
|
|
9454
9454
|
f(!1);
|
|
9455
9455
|
}
|
|
9456
9456
|
}, se = async () => {
|
|
9457
|
-
const X = await
|
|
9457
|
+
const X = await k.getHandler().getViewsForAction({
|
|
9458
9458
|
action: t,
|
|
9459
9459
|
context: l
|
|
9460
9460
|
});
|
|
9461
9461
|
q.current = X.domain, w(X.views.get("form")), g(X.views.get("tree")), p(X.model), V.current = X.limit;
|
|
9462
9462
|
}, Q = async () => {
|
|
9463
9463
|
p(n);
|
|
9464
|
-
const X = await
|
|
9464
|
+
const X = await k.getHandler().getView({
|
|
9465
9465
|
model: n,
|
|
9466
9466
|
type: "form",
|
|
9467
9467
|
context: l
|
|
9468
9468
|
});
|
|
9469
9469
|
w(X);
|
|
9470
|
-
const ae = await
|
|
9470
|
+
const ae = await k.getHandler().getView({
|
|
9471
9471
|
model: n,
|
|
9472
9472
|
type: "tree",
|
|
9473
9473
|
id: i,
|
|
@@ -9486,7 +9486,7 @@ function kd(e) {
|
|
|
9486
9486
|
treeView: h
|
|
9487
9487
|
});
|
|
9488
9488
|
}, ve = () => !h || !y ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
|
|
9489
|
-
|
|
9489
|
+
H && /* @__PURE__ */ o(qe, { className: "mt-10", message: H, type: "error", banner: !0 }),
|
|
9490
9490
|
/* @__PURE__ */ o(
|
|
9491
9491
|
gn,
|
|
9492
9492
|
{
|
|
@@ -9500,9 +9500,9 @@ function kd(e) {
|
|
|
9500
9500
|
loading: G,
|
|
9501
9501
|
onRowClicked: me,
|
|
9502
9502
|
colorsForResults: I,
|
|
9503
|
-
sorter:
|
|
9503
|
+
sorter: N,
|
|
9504
9504
|
onChangeSort: (X) => {
|
|
9505
|
-
|
|
9505
|
+
W == null || W(X);
|
|
9506
9506
|
const ae = Pt({
|
|
9507
9507
|
resultsToSort: O,
|
|
9508
9508
|
sorter: X,
|
|
@@ -9514,7 +9514,7 @@ function kd(e) {
|
|
|
9514
9514
|
}
|
|
9515
9515
|
)
|
|
9516
9516
|
] });
|
|
9517
|
-
return
|
|
9517
|
+
return E ? /* @__PURE__ */ o(qe, { className: "mt-10", message: E, type: "error", banner: !0 }) : d ? /* @__PURE__ */ o(Ne, { style: { padding: "2rem" } }) : ve();
|
|
9518
9518
|
}
|
|
9519
9519
|
const Md = $n(kd), Pd = (e) => {
|
|
9520
9520
|
const { model: t } = e, [n, i] = v();
|
|
@@ -9522,7 +9522,7 @@ const Md = $n(kd), Pd = (e) => {
|
|
|
9522
9522
|
r();
|
|
9523
9523
|
}, [t]);
|
|
9524
9524
|
async function r() {
|
|
9525
|
-
const s = await
|
|
9525
|
+
const s = await k.getHandler().search({
|
|
9526
9526
|
params: [],
|
|
9527
9527
|
model: t,
|
|
9528
9528
|
limit: 1
|
|
@@ -9531,8 +9531,8 @@ const Md = $n(kd), Pd = (e) => {
|
|
|
9531
9531
|
}
|
|
9532
9532
|
return /* @__PURE__ */ o("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ o(Yt, { ...e, model: t, id: n, readOnly: !0 }) });
|
|
9533
9533
|
}, Nd = (e) => {
|
|
9534
|
-
const { model: t, domain: n = [], context: i = {}, view_id: r, manualIds: s } = e, [a, l] = v(!1), [d, f] = v(), [u, c] = v(), [m] =
|
|
9535
|
-
|
|
9534
|
+
const { model: t, domain: n = [], context: i = {}, view_id: r, manualIds: s } = e, [a, l] = v(!1), [d, f] = v(), [u, c] = v(), [m] = je(
|
|
9535
|
+
k.getHandler().readForView
|
|
9536
9536
|
), p = z(async () => {
|
|
9537
9537
|
l(!0), f(void 0), s && n.push(["id", "in", s]);
|
|
9538
9538
|
try {
|
|
@@ -9632,9 +9632,9 @@ function Hd(e, t) {
|
|
|
9632
9632
|
setIsLoading: m,
|
|
9633
9633
|
openAction: p,
|
|
9634
9634
|
moveItemsEnabled: h
|
|
9635
|
-
} = ee(or), g = re(), y = re(), [w] =
|
|
9636
|
-
|
|
9637
|
-
), [x] =
|
|
9635
|
+
} = ee(or), g = re(), y = re(), [w] = je(k.getHandler().getView), [C] = je(
|
|
9636
|
+
k.getHandler().readObjects
|
|
9637
|
+
), [x] = je(k.getHandler().update), R = jo(
|
|
9638
9638
|
wn.FEATURE_READFORVIEW
|
|
9639
9639
|
);
|
|
9640
9640
|
le(() => {
|
|
@@ -9648,13 +9648,13 @@ function Hd(e, t) {
|
|
|
9648
9648
|
async function b() {
|
|
9649
9649
|
f(!0), m(!0), c(void 0);
|
|
9650
9650
|
try {
|
|
9651
|
-
const I = await V(), A = await F(I),
|
|
9651
|
+
const I = await V(), A = await F(I), N = I.fields[On].relation, W = A[On].items;
|
|
9652
9652
|
y.current = I.fields;
|
|
9653
|
-
const
|
|
9654
|
-
items:
|
|
9655
|
-
model:
|
|
9653
|
+
const H = await _({
|
|
9654
|
+
items: W,
|
|
9655
|
+
model: N,
|
|
9656
9656
|
context: i
|
|
9657
|
-
}), U = await S(
|
|
9657
|
+
}), U = await S(H);
|
|
9658
9658
|
c(void 0), l(U), f(!1), m(!1);
|
|
9659
9659
|
} catch (I) {
|
|
9660
9660
|
c(JSON.stringify(I));
|
|
@@ -9670,14 +9670,14 @@ function Hd(e, t) {
|
|
|
9670
9670
|
async function _({
|
|
9671
9671
|
items: I,
|
|
9672
9672
|
model: A,
|
|
9673
|
-
context:
|
|
9673
|
+
context: N
|
|
9674
9674
|
}) {
|
|
9675
9675
|
g.current = (await w({
|
|
9676
9676
|
model: A,
|
|
9677
9677
|
type: "form",
|
|
9678
|
-
context:
|
|
9678
|
+
context: N
|
|
9679
9679
|
})).fields;
|
|
9680
|
-
const [
|
|
9680
|
+
const [W] = await ho({
|
|
9681
9681
|
treeView: {
|
|
9682
9682
|
fields: g.current
|
|
9683
9683
|
},
|
|
@@ -9686,10 +9686,10 @@ function Hd(e, t) {
|
|
|
9686
9686
|
},
|
|
9687
9687
|
model: A,
|
|
9688
9688
|
items: I,
|
|
9689
|
-
context:
|
|
9689
|
+
context: N,
|
|
9690
9690
|
currentView: "form"
|
|
9691
9691
|
});
|
|
9692
|
-
return
|
|
9692
|
+
return W;
|
|
9693
9693
|
}
|
|
9694
9694
|
async function F(I) {
|
|
9695
9695
|
return (await C({
|
|
@@ -9701,57 +9701,57 @@ function Hd(e, t) {
|
|
|
9701
9701
|
}
|
|
9702
9702
|
async function S(I) {
|
|
9703
9703
|
const A = [];
|
|
9704
|
-
for (const
|
|
9705
|
-
const { values:
|
|
9706
|
-
if (
|
|
9707
|
-
const
|
|
9708
|
-
actionId:
|
|
9704
|
+
for (const W of I) {
|
|
9705
|
+
const { values: H } = W;
|
|
9706
|
+
if (H.action_id && H.action_id.length > 0) {
|
|
9707
|
+
const U = parseInt(H.action_id[0], 10), E = Od({
|
|
9708
|
+
actionId: U,
|
|
9709
9709
|
rootContext: i
|
|
9710
|
-
});
|
|
9711
|
-
A.push(
|
|
9710
|
+
}).then((K) => ({ ...W, actionData: K }));
|
|
9711
|
+
A.push(E);
|
|
9712
9712
|
}
|
|
9713
9713
|
}
|
|
9714
|
-
return A;
|
|
9714
|
+
return await Promise.all(A);
|
|
9715
9715
|
}
|
|
9716
9716
|
async function O(I) {
|
|
9717
9717
|
if (!h)
|
|
9718
9718
|
return;
|
|
9719
9719
|
const A = I.filter((U) => {
|
|
9720
|
-
const
|
|
9720
|
+
const E = a.find(
|
|
9721
9721
|
(G) => G.id === U.id
|
|
9722
9722
|
);
|
|
9723
|
-
if (!
|
|
9723
|
+
if (!E)
|
|
9724
9724
|
return !1;
|
|
9725
|
-
if (!
|
|
9725
|
+
if (!E.position)
|
|
9726
9726
|
return !0;
|
|
9727
|
-
const
|
|
9728
|
-
...JSON.parse(
|
|
9729
|
-
id:
|
|
9727
|
+
const K = {
|
|
9728
|
+
...JSON.parse(E.position.replace(/'/g, '"')),
|
|
9729
|
+
id: E.id
|
|
9730
9730
|
};
|
|
9731
|
-
return JSON.stringify(U) !== JSON.stringify(
|
|
9731
|
+
return JSON.stringify(U) !== JSON.stringify(K);
|
|
9732
9732
|
});
|
|
9733
9733
|
if (A.length === 0)
|
|
9734
9734
|
return;
|
|
9735
|
-
const
|
|
9736
|
-
const
|
|
9737
|
-
...A.find((
|
|
9735
|
+
const W = a.filter((U) => A.map((E) => E.id).includes(U.id)).map((U) => {
|
|
9736
|
+
const E = {
|
|
9737
|
+
...A.find((K) => K.id === U.id)
|
|
9738
9738
|
};
|
|
9739
|
-
return delete
|
|
9739
|
+
return delete E.id, { ...U }, {
|
|
9740
9740
|
...U,
|
|
9741
9741
|
operation: "pendingUpdate",
|
|
9742
9742
|
values: {
|
|
9743
9743
|
...U.values,
|
|
9744
|
-
position: JSON.stringify(
|
|
9744
|
+
position: JSON.stringify(E).replace(/"/g, "'")
|
|
9745
9745
|
}
|
|
9746
9746
|
};
|
|
9747
|
-
}),
|
|
9747
|
+
}), H = {
|
|
9748
9748
|
fields: g.current,
|
|
9749
|
-
items:
|
|
9749
|
+
items: W
|
|
9750
9750
|
};
|
|
9751
9751
|
await x({
|
|
9752
9752
|
model: n,
|
|
9753
9753
|
id: r,
|
|
9754
|
-
values: { [On]:
|
|
9754
|
+
values: { [On]: H },
|
|
9755
9755
|
fields: y.current,
|
|
9756
9756
|
context: i
|
|
9757
9757
|
});
|
|
@@ -9760,27 +9760,27 @@ function Hd(e, t) {
|
|
|
9760
9760
|
p(s);
|
|
9761
9761
|
}
|
|
9762
9762
|
return d ? /* @__PURE__ */ o(et, {}) : u ? /* @__PURE__ */ o(qe, { className: "mt-10 mb-20", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ o(Vd, { onPositionItemsChanged: O, children: a.map((I, A) => {
|
|
9763
|
-
const { actionData:
|
|
9764
|
-
actionId:
|
|
9765
|
-
actionType:
|
|
9763
|
+
const { actionData: N, values: W } = I, { position: H, id: U } = W, {
|
|
9764
|
+
actionId: E,
|
|
9765
|
+
actionType: K,
|
|
9766
9766
|
key: G,
|
|
9767
9767
|
title: J,
|
|
9768
9768
|
views: q,
|
|
9769
9769
|
model: j,
|
|
9770
9770
|
context: M,
|
|
9771
|
-
domain:
|
|
9771
|
+
domain: B,
|
|
9772
9772
|
initialView: L,
|
|
9773
9773
|
limit: se
|
|
9774
|
-
} =
|
|
9774
|
+
} = N;
|
|
9775
9775
|
let Q = {};
|
|
9776
9776
|
try {
|
|
9777
|
-
Q = JSON.parse(
|
|
9777
|
+
Q = JSON.parse(H.replace(/'/g, '"'));
|
|
9778
9778
|
} catch {
|
|
9779
9779
|
Q = { x: A * 2, y: 0, w: 2, h: 3 };
|
|
9780
9780
|
}
|
|
9781
9781
|
let me = null;
|
|
9782
9782
|
if ((L == null ? void 0 : L.type) === "graph") {
|
|
9783
|
-
const xe =
|
|
9783
|
+
const xe = W.server_action === !0 && R ? $d : Bo;
|
|
9784
9784
|
me = /* @__PURE__ */ o(
|
|
9785
9785
|
xe,
|
|
9786
9786
|
{
|
|
@@ -9789,19 +9789,19 @@ function Hd(e, t) {
|
|
|
9789
9789
|
)[0][0],
|
|
9790
9790
|
model: j,
|
|
9791
9791
|
context: M,
|
|
9792
|
-
domain:
|
|
9792
|
+
domain: B,
|
|
9793
9793
|
limit: se
|
|
9794
9794
|
},
|
|
9795
9795
|
U
|
|
9796
9796
|
);
|
|
9797
9797
|
} else if ((L == null ? void 0 : L.type) === "form")
|
|
9798
|
-
me = /* @__PURE__ */ o(Pd, { model: j, actionDomain:
|
|
9798
|
+
me = /* @__PURE__ */ o(Pd, { model: j, actionDomain: B }, U);
|
|
9799
9799
|
else if ((L == null ? void 0 : L.type) === "tree")
|
|
9800
9800
|
me = /* @__PURE__ */ o(
|
|
9801
9801
|
Md,
|
|
9802
9802
|
{
|
|
9803
9803
|
model: j,
|
|
9804
|
-
domain:
|
|
9804
|
+
domain: B,
|
|
9805
9805
|
view_id: q.filter(
|
|
9806
9806
|
(ae) => ae[1] === "tree"
|
|
9807
9807
|
)[0][0],
|
|
@@ -9816,7 +9816,7 @@ function Hd(e, t) {
|
|
|
9816
9816
|
actionType: ce,
|
|
9817
9817
|
title: Se,
|
|
9818
9818
|
model: ke
|
|
9819
|
-
} =
|
|
9819
|
+
} = N, ie = {
|
|
9820
9820
|
action_id: Ve,
|
|
9821
9821
|
action_type: ce,
|
|
9822
9822
|
name: Se,
|
|
@@ -9836,14 +9836,14 @@ function Hd(e, t) {
|
|
|
9836
9836
|
me = /* @__PURE__ */ o(
|
|
9837
9837
|
Uo,
|
|
9838
9838
|
{
|
|
9839
|
-
action_id:
|
|
9840
|
-
action_type:
|
|
9839
|
+
action_id: E,
|
|
9840
|
+
action_type: K,
|
|
9841
9841
|
tabKey: G,
|
|
9842
9842
|
title: J,
|
|
9843
9843
|
views: q,
|
|
9844
9844
|
model: j,
|
|
9845
9845
|
context: M,
|
|
9846
|
-
domain:
|
|
9846
|
+
domain: B,
|
|
9847
9847
|
setCanWeClose: () => {
|
|
9848
9848
|
},
|
|
9849
9849
|
initialView: ae,
|
|
@@ -9863,7 +9863,7 @@ function Hd(e, t) {
|
|
|
9863
9863
|
actionType: Fe,
|
|
9864
9864
|
title: Ve,
|
|
9865
9865
|
model: ce
|
|
9866
|
-
} =
|
|
9866
|
+
} = N;
|
|
9867
9867
|
ve = {
|
|
9868
9868
|
action_id: Re,
|
|
9869
9869
|
action_type: Fe,
|
|
@@ -9891,8 +9891,8 @@ function Hd(e, t) {
|
|
|
9891
9891
|
}
|
|
9892
9892
|
const Bd = ct(Hd), Kd = (e) => {
|
|
9893
9893
|
const { ooui: t } = e;
|
|
9894
|
-
return /* @__PURE__ */ o(ge, { type: "array", ...e, children: /* @__PURE__ */ o(
|
|
9895
|
-
},
|
|
9894
|
+
return /* @__PURE__ */ o(ge, { type: "array", ...e, children: /* @__PURE__ */ o(Wd, { ooui: t }) });
|
|
9895
|
+
}, Wd = (e) => {
|
|
9896
9896
|
const { value: t, ooui: n, onChange: i } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, f] = v(), [u, c] = v(!1), { relation: m, context: p, readOnly: h, field: g, columns: y } = n, w = ee(Ee), { getContext: C } = w || {};
|
|
9897
9897
|
pt(() => {
|
|
9898
9898
|
R();
|
|
@@ -9906,7 +9906,7 @@ const Bd = ct(Hd), Kd = (e) => {
|
|
|
9906
9906
|
c(!0);
|
|
9907
9907
|
let F = [];
|
|
9908
9908
|
if (n.domain) {
|
|
9909
|
-
const S = await
|
|
9909
|
+
const S = await k.getHandler().evalDomain({
|
|
9910
9910
|
domain: n.domain,
|
|
9911
9911
|
values: Vt({
|
|
9912
9912
|
fields: w == null ? void 0 : w.getFields(),
|
|
@@ -9918,7 +9918,7 @@ const Bd = ct(Hd), Kd = (e) => {
|
|
|
9918
9918
|
F = [...F, ...S];
|
|
9919
9919
|
}
|
|
9920
9920
|
try {
|
|
9921
|
-
const O = (await
|
|
9921
|
+
const O = (await k.getHandler().search({
|
|
9922
9922
|
model: m,
|
|
9923
9923
|
params: F,
|
|
9924
9924
|
fieldsToRetrieve: [g],
|
|
@@ -9973,7 +9973,7 @@ const Bd = ct(Hd), Kd = (e) => {
|
|
|
9973
9973
|
/* @__PURE__ */ o(_e, { onClick: V, disabled: s.length === 0, children: "Uncheck all" })
|
|
9974
9974
|
] })
|
|
9975
9975
|
] }) });
|
|
9976
|
-
},
|
|
9976
|
+
}, jd = (e) => /* @__PURE__ */ o(ge, { ...e, children: /* @__PURE__ */ o(Ud, { ...e }) }), Ud = (e) => {
|
|
9977
9977
|
const { value: t, ooui: n } = e;
|
|
9978
9978
|
return /* @__PURE__ */ o(
|
|
9979
9979
|
"div",
|
|
@@ -10084,7 +10084,7 @@ function cu() {
|
|
|
10084
10084
|
return /* @__PURE__ */ o(au, { className: "m-5 select-none", children: /* @__PURE__ */ o(lu, { level: 5, children: e("welcome") }) });
|
|
10085
10085
|
}
|
|
10086
10086
|
function du(e, t) {
|
|
10087
|
-
const { children: n } = e, [i, r] = v("welcome"), { t: s } = ue(), { globalValues: a, rootContext: l } =
|
|
10087
|
+
const { children: n } = e, [i, r] = v("welcome"), { t: s } = ue(), { globalValues: a, rootContext: l } = Wo(), [d, f] = v([
|
|
10088
10088
|
{
|
|
10089
10089
|
title: s("welcome"),
|
|
10090
10090
|
key: "welcome",
|
|
@@ -10117,7 +10117,7 @@ function du(e, t) {
|
|
|
10117
10117
|
res_id: F,
|
|
10118
10118
|
domain: S = []
|
|
10119
10119
|
}) {
|
|
10120
|
-
const O = await
|
|
10120
|
+
const O = await k.getHandler().getActionData({
|
|
10121
10121
|
action: R,
|
|
10122
10122
|
context: l
|
|
10123
10123
|
});
|
|
@@ -10125,55 +10125,55 @@ function du(e, t) {
|
|
|
10125
10125
|
Ue("Action type not supported");
|
|
10126
10126
|
return;
|
|
10127
10127
|
}
|
|
10128
|
-
const [T, I] = R.split(","), A = parseInt(I),
|
|
10128
|
+
const [T, I] = R.split(","), A = parseInt(I), N = yt({
|
|
10129
10129
|
context: O.context,
|
|
10130
10130
|
values: a,
|
|
10131
10131
|
fields: {}
|
|
10132
|
-
}),
|
|
10132
|
+
}), W = O.domain ? await k.getHandler().evalDomain({
|
|
10133
10133
|
domain: O.domain,
|
|
10134
10134
|
values: a,
|
|
10135
|
-
context: { ...l, ...
|
|
10135
|
+
context: { ...l, ...N }
|
|
10136
10136
|
}) : [], {
|
|
10137
|
-
res_model:
|
|
10137
|
+
res_model: H,
|
|
10138
10138
|
views: U,
|
|
10139
|
-
name:
|
|
10140
|
-
target:
|
|
10139
|
+
name: E,
|
|
10140
|
+
target: K,
|
|
10141
10141
|
view_type: G,
|
|
10142
10142
|
limit: J
|
|
10143
10143
|
} = O, q = G === "tree", j = [];
|
|
10144
|
-
for (const
|
|
10145
|
-
const [L, se] =
|
|
10144
|
+
for (const B of U) {
|
|
10145
|
+
const [L, se] = B;
|
|
10146
10146
|
if (L)
|
|
10147
|
-
j.push(
|
|
10147
|
+
j.push(B);
|
|
10148
10148
|
else if (se === "dashboard")
|
|
10149
10149
|
j.push([void 0, "dashboard"]);
|
|
10150
10150
|
else {
|
|
10151
|
-
const { view_id: Q } = await
|
|
10152
|
-
model:
|
|
10151
|
+
const { view_id: Q } = await k.getHandler().getView({
|
|
10152
|
+
model: H,
|
|
10153
10153
|
type: se,
|
|
10154
10154
|
id: L,
|
|
10155
|
-
context: { ...l, ...
|
|
10155
|
+
context: { ...l, ...N }
|
|
10156
10156
|
});
|
|
10157
10157
|
j.push([Q, se]);
|
|
10158
10158
|
}
|
|
10159
10159
|
}
|
|
10160
10160
|
let M;
|
|
10161
10161
|
if (_) {
|
|
10162
|
-
const [
|
|
10162
|
+
const [B, L] = j.find(
|
|
10163
10163
|
([se, Q]) => Q === _
|
|
10164
10164
|
);
|
|
10165
|
-
M = { id:
|
|
10165
|
+
M = { id: B, type: L };
|
|
10166
10166
|
} else {
|
|
10167
|
-
const [
|
|
10168
|
-
M = { id:
|
|
10167
|
+
const [B, L] = j[0];
|
|
10168
|
+
M = { id: B, type: L };
|
|
10169
10169
|
}
|
|
10170
10170
|
x({
|
|
10171
|
-
domain: [...
|
|
10172
|
-
context: { ...l, ...
|
|
10173
|
-
model:
|
|
10171
|
+
domain: [...W, ...S],
|
|
10172
|
+
context: { ...l, ...N },
|
|
10173
|
+
model: H,
|
|
10174
10174
|
views: j,
|
|
10175
|
-
title:
|
|
10176
|
-
target:
|
|
10175
|
+
title: E,
|
|
10176
|
+
target: K,
|
|
10177
10177
|
initialView: M,
|
|
10178
10178
|
action_type: T,
|
|
10179
10179
|
action_id: A,
|
|
@@ -10215,32 +10215,32 @@ function du(e, t) {
|
|
|
10215
10215
|
domain: T,
|
|
10216
10216
|
views: I,
|
|
10217
10217
|
target: A,
|
|
10218
|
-
string:
|
|
10219
|
-
limit:
|
|
10220
|
-
} = R, [
|
|
10218
|
+
string: N,
|
|
10219
|
+
limit: W
|
|
10220
|
+
} = R, [H, U] = I[0], E = { id: H, type: U }, K = yt({
|
|
10221
10221
|
context: O,
|
|
10222
10222
|
values: { ...V, ...a },
|
|
10223
10223
|
fields: b
|
|
10224
|
-
}), G = T ? await
|
|
10224
|
+
}), G = T ? await k.getHandler().evalDomain({
|
|
10225
10225
|
domain: T,
|
|
10226
10226
|
values: Vt({
|
|
10227
10227
|
fields: b,
|
|
10228
10228
|
values: { ...V, ...a }
|
|
10229
10229
|
}),
|
|
10230
10230
|
fields: b,
|
|
10231
|
-
context: { ...l, ...
|
|
10231
|
+
context: { ...l, ...K }
|
|
10232
10232
|
}) : [];
|
|
10233
10233
|
x({
|
|
10234
10234
|
model: S,
|
|
10235
10235
|
target: A,
|
|
10236
10236
|
views: I,
|
|
10237
|
-
context: { ...l, ...
|
|
10237
|
+
context: { ...l, ...K },
|
|
10238
10238
|
domain: G,
|
|
10239
|
-
title:
|
|
10240
|
-
initialView:
|
|
10239
|
+
title: N,
|
|
10240
|
+
initialView: E,
|
|
10241
10241
|
action_id: _,
|
|
10242
10242
|
action_type: F,
|
|
10243
|
-
limit:
|
|
10243
|
+
limit: W
|
|
10244
10244
|
});
|
|
10245
10245
|
}
|
|
10246
10246
|
async function w(R) {
|
|
@@ -10250,34 +10250,34 @@ function du(e, t) {
|
|
|
10250
10250
|
res_id: _,
|
|
10251
10251
|
view_id: F,
|
|
10252
10252
|
overrideUnsettedLimit: S = !1
|
|
10253
|
-
} = R, O = `${V},${b}`, T = await
|
|
10253
|
+
} = R, O = `${V},${b}`, T = await k.getHandler().getActionData({
|
|
10254
10254
|
action: O,
|
|
10255
10255
|
context: l
|
|
10256
10256
|
}), I = yt({
|
|
10257
10257
|
context: T.context,
|
|
10258
10258
|
values: a,
|
|
10259
10259
|
fields: {}
|
|
10260
|
-
}), A = T.domain ? await
|
|
10260
|
+
}), A = T.domain ? await k.getHandler().evalDomain({
|
|
10261
10261
|
domain: T.domain,
|
|
10262
10262
|
values: a,
|
|
10263
10263
|
context: { ...l, ...I }
|
|
10264
10264
|
}) : [], {
|
|
10265
|
-
res_model:
|
|
10266
|
-
views:
|
|
10267
|
-
name:
|
|
10265
|
+
res_model: N,
|
|
10266
|
+
views: W,
|
|
10267
|
+
name: H,
|
|
10268
10268
|
target: U,
|
|
10269
|
-
view_type:
|
|
10270
|
-
limit:
|
|
10271
|
-
} = T, G =
|
|
10272
|
-
for (const
|
|
10273
|
-
const [L, se] =
|
|
10269
|
+
view_type: E,
|
|
10270
|
+
limit: K
|
|
10271
|
+
} = T, G = E === "tree", J = [];
|
|
10272
|
+
for (const B of W) {
|
|
10273
|
+
const [L, se] = B;
|
|
10274
10274
|
if (L)
|
|
10275
|
-
J.push(
|
|
10275
|
+
J.push(B);
|
|
10276
10276
|
else if (se === "dashboard")
|
|
10277
10277
|
J.push([void 0, "dashboard"]);
|
|
10278
10278
|
else {
|
|
10279
|
-
const { view_id: Q } = await
|
|
10280
|
-
model:
|
|
10279
|
+
const { view_id: Q } = await k.getHandler().getView({
|
|
10280
|
+
model: N,
|
|
10281
10281
|
type: se,
|
|
10282
10282
|
id: L,
|
|
10283
10283
|
context: { ...l, ...I }
|
|
@@ -10287,24 +10287,24 @@ function du(e, t) {
|
|
|
10287
10287
|
}
|
|
10288
10288
|
let q, j;
|
|
10289
10289
|
if (F == null) {
|
|
10290
|
-
const
|
|
10291
|
-
q = void 0, j =
|
|
10290
|
+
const B = J.find((L) => L[0] === void 0);
|
|
10291
|
+
q = void 0, j = B[1];
|
|
10292
10292
|
} else
|
|
10293
|
-
[q, j] = J.find((
|
|
10293
|
+
[q, j] = J.find((B) => B[0] === void 0 ? !1 : B[0] === F);
|
|
10294
10294
|
const M = { id: q, type: j };
|
|
10295
10295
|
x({
|
|
10296
10296
|
domain: A,
|
|
10297
10297
|
context: { ...l, ...I },
|
|
10298
|
-
model:
|
|
10298
|
+
model: N,
|
|
10299
10299
|
views: J,
|
|
10300
|
-
title:
|
|
10300
|
+
title: H,
|
|
10301
10301
|
target: U,
|
|
10302
10302
|
initialView: M,
|
|
10303
10303
|
action_id: b,
|
|
10304
10304
|
action_type: V,
|
|
10305
10305
|
res_id: _,
|
|
10306
10306
|
treeExpandable: G,
|
|
10307
|
-
limit: S && (
|
|
10307
|
+
limit: S && (K === 0 || K === !1) ? vt : K
|
|
10308
10308
|
});
|
|
10309
10309
|
}
|
|
10310
10310
|
async function C({
|
|
@@ -10315,7 +10315,7 @@ function du(e, t) {
|
|
|
10315
10315
|
res_id: F,
|
|
10316
10316
|
domain: S
|
|
10317
10317
|
}) {
|
|
10318
|
-
const O = await
|
|
10318
|
+
const O = await k.getHandler().getActionStringForModel(R);
|
|
10319
10319
|
await h({
|
|
10320
10320
|
action: O,
|
|
10321
10321
|
values: b,
|
|
@@ -10336,14 +10336,14 @@ function du(e, t) {
|
|
|
10336
10336
|
action_id: T,
|
|
10337
10337
|
action_type: I,
|
|
10338
10338
|
res_id: A,
|
|
10339
|
-
values:
|
|
10340
|
-
forced_values:
|
|
10341
|
-
treeExpandable:
|
|
10339
|
+
values: N,
|
|
10340
|
+
forced_values: W,
|
|
10341
|
+
treeExpandable: H = !1,
|
|
10342
10342
|
limit: U
|
|
10343
10343
|
}) {
|
|
10344
|
-
const
|
|
10344
|
+
const E = er();
|
|
10345
10345
|
if (S !== "current") {
|
|
10346
|
-
const
|
|
10346
|
+
const K = await k.getHandler().getView({
|
|
10347
10347
|
model: V,
|
|
10348
10348
|
type: "form",
|
|
10349
10349
|
id: O.type === "form" ? O.id : void 0,
|
|
@@ -10352,17 +10352,17 @@ function du(e, t) {
|
|
|
10352
10352
|
c.current.openActionModal({
|
|
10353
10353
|
domain: R,
|
|
10354
10354
|
model: V,
|
|
10355
|
-
formView:
|
|
10355
|
+
formView: K,
|
|
10356
10356
|
context: { ...l, ...b },
|
|
10357
10357
|
actionData: {
|
|
10358
10358
|
action_id: T,
|
|
10359
10359
|
action_type: I,
|
|
10360
10360
|
res_id: A,
|
|
10361
|
-
view_id:
|
|
10361
|
+
view_id: K.view_id
|
|
10362
10362
|
}
|
|
10363
10363
|
});
|
|
10364
10364
|
} else {
|
|
10365
|
-
const
|
|
10365
|
+
const K = O && Array.isArray(O.id) ? { ...O, id: O.id[0] } : O;
|
|
10366
10366
|
g({
|
|
10367
10367
|
title: F,
|
|
10368
10368
|
action: {
|
|
@@ -10374,22 +10374,22 @@ function du(e, t) {
|
|
|
10374
10374
|
{
|
|
10375
10375
|
action_id: T,
|
|
10376
10376
|
action_type: I,
|
|
10377
|
-
tabKey:
|
|
10377
|
+
tabKey: E,
|
|
10378
10378
|
title: F,
|
|
10379
10379
|
views: _,
|
|
10380
10380
|
model: V,
|
|
10381
10381
|
context: { ...l, ...b },
|
|
10382
10382
|
domain: R,
|
|
10383
10383
|
setCanWeClose: p,
|
|
10384
|
-
initialView:
|
|
10384
|
+
initialView: K,
|
|
10385
10385
|
res_id: A,
|
|
10386
|
-
formDefaultValues:
|
|
10387
|
-
formForcedValues:
|
|
10388
|
-
treeExpandable:
|
|
10386
|
+
formDefaultValues: N,
|
|
10387
|
+
formForcedValues: W,
|
|
10388
|
+
treeExpandable: H,
|
|
10389
10389
|
limit: U
|
|
10390
10390
|
}
|
|
10391
10391
|
),
|
|
10392
|
-
key:
|
|
10392
|
+
key: E
|
|
10393
10393
|
});
|
|
10394
10394
|
}
|
|
10395
10395
|
}
|
|
@@ -10476,7 +10476,7 @@ function fu(e) {
|
|
|
10476
10476
|
alignItems: "center"
|
|
10477
10477
|
},
|
|
10478
10478
|
children: /* @__PURE__ */ o(
|
|
10479
|
-
|
|
10479
|
+
Wt,
|
|
10480
10480
|
{
|
|
10481
10481
|
style: {
|
|
10482
10482
|
color: a.colorPrimaryActive
|
|
@@ -10548,12 +10548,12 @@ const { useToken: pu } = Pe, cf = (e) => {
|
|
|
10548
10548
|
return;
|
|
10549
10549
|
}
|
|
10550
10550
|
const A = w.view_id;
|
|
10551
|
-
let
|
|
10552
|
-
return w.type === "form" && (
|
|
10551
|
+
let N = !1;
|
|
10552
|
+
return w.type === "form" && (N = C || !1), {
|
|
10553
10553
|
action_id: T,
|
|
10554
10554
|
action_type: I,
|
|
10555
10555
|
view_id: A,
|
|
10556
|
-
res_id:
|
|
10556
|
+
res_id: N
|
|
10557
10557
|
};
|
|
10558
10558
|
}, [C, w]), b = Ce(() => {
|
|
10559
10559
|
if (R)
|
|
@@ -10599,17 +10599,17 @@ const { useToken: pu } = Pe, cf = (e) => {
|
|
|
10599
10599
|
else {
|
|
10600
10600
|
if (!w)
|
|
10601
10601
|
return;
|
|
10602
|
-
const T = g.find((
|
|
10603
|
-
let
|
|
10602
|
+
const T = g.find((H) => H.key === y), { id: I, type: A } = (T == null ? void 0 : T.action) || {}, N = w.view_id;
|
|
10603
|
+
let W = !1;
|
|
10604
10604
|
if (!I || !A) {
|
|
10605
10605
|
l(!1);
|
|
10606
10606
|
return;
|
|
10607
10607
|
}
|
|
10608
|
-
w.type === "form" && (
|
|
10608
|
+
w.type === "form" && (W = C || !1), await i({
|
|
10609
10609
|
action_id: I,
|
|
10610
10610
|
action_type: A,
|
|
10611
|
-
view_id:
|
|
10612
|
-
res_id:
|
|
10611
|
+
view_id: N,
|
|
10612
|
+
res_id: W
|
|
10613
10613
|
});
|
|
10614
10614
|
}
|
|
10615
10615
|
await S(), l(!a);
|
|
@@ -10661,7 +10661,7 @@ export {
|
|
|
10661
10661
|
iu as CommentsTimelineField,
|
|
10662
10662
|
Ko as ConfigContext,
|
|
10663
10663
|
vd as ConfigContextProvider,
|
|
10664
|
-
|
|
10664
|
+
k as ConnectionProvider,
|
|
10665
10665
|
Pa as ContentRootProvider,
|
|
10666
10666
|
lf as CurrentTabContent,
|
|
10667
10667
|
Bd as Dashboard,
|
|
@@ -10669,7 +10669,7 @@ export {
|
|
|
10669
10669
|
Ed as DashboardGridItem,
|
|
10670
10670
|
Oc as Date,
|
|
10671
10671
|
_c as DateTime,
|
|
10672
|
-
|
|
10672
|
+
jc as Email,
|
|
10673
10673
|
of as ErpAllFeatureKeys,
|
|
10674
10674
|
wn as ErpFeatureKeys,
|
|
10675
10675
|
Ic as ExportModal,
|
|
@@ -10685,7 +10685,7 @@ export {
|
|
|
10685
10685
|
rn as Integer,
|
|
10686
10686
|
mn as Label,
|
|
10687
10687
|
Bl as Many2one,
|
|
10688
|
-
|
|
10688
|
+
jd as Markdown,
|
|
10689
10689
|
Kd as MultiCheckbox,
|
|
10690
10690
|
hc as Notebook,
|
|
10691
10691
|
cc as One2many,
|
|
@@ -10707,7 +10707,7 @@ export {
|
|
|
10707
10707
|
gc as Text,
|
|
10708
10708
|
Vc as Time,
|
|
10709
10709
|
gn as Tree,
|
|
10710
|
-
|
|
10710
|
+
Wc as Url,
|
|
10711
10711
|
rt as iconMapper,
|
|
10712
10712
|
Ut as showConfirmDialog
|
|
10713
10713
|
};
|