@fctc/edu-logic-lib 1.0.0 → 1.0.2
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/chunk-6BLY7NZ6.mjs +124 -0
- package/dist/chunk-6QXB3XX7.mjs +258 -0
- package/dist/chunk-ELARQVCE.mjs +2364 -0
- package/dist/chunk-FVGPSTJ7.js +124 -0
- package/dist/chunk-GGOFXFSX.js +2364 -0
- package/dist/chunk-IXDDYGKE.js +61 -0
- package/dist/chunk-MJLXGYQ4.mjs +102 -0
- package/dist/chunk-MLJQPO4Q.mjs +61 -0
- package/dist/chunk-QLUONJPQ.mjs +604 -0
- package/dist/chunk-RZBHZYXG.js +604 -0
- package/dist/chunk-S7B3VKMJ.mjs +95 -0
- package/dist/chunk-S7YF2I23.js +95 -0
- package/dist/chunk-U4CC2BBB.js +1074 -0
- package/dist/chunk-UY6GNZNB.js +258 -0
- package/dist/chunk-W4W2L2NA.js +102 -0
- package/dist/chunk-WYXAE5LI.mjs +1074 -0
- package/dist/config.js +5 -292
- package/dist/config.mjs +4 -254
- package/dist/constants.js +30 -191
- package/dist/constants.mjs +16 -139
- package/dist/environment.js +6 -901
- package/dist/environment.mjs +9 -864
- package/dist/hooks.js +204 -4522
- package/dist/hooks.mjs +24 -4261
- package/dist/models.js +19 -3264
- package/dist/models.mjs +13 -3219
- package/dist/provider.js +33 -3258
- package/dist/provider.mjs +12 -3198
- package/dist/services.js +9 -4096
- package/dist/services.mjs +16 -4059
- package/dist/store.js +128 -691
- package/dist/store.mjs +51 -526
- package/dist/types.js +1 -18
- package/dist/utils.js +20 -2388
- package/dist/utils.mjs +17 -2344
- package/package.json +9 -6
|
@@ -0,0 +1,1074 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkGGOFXFSXjs = require('./chunk-GGOFXFSX.js');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkW4W2L2NAjs = require('./chunk-W4W2L2NA.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkIXDDYGKEjs = require('./chunk-IXDDYGKE.js');
|
|
10
|
+
|
|
11
|
+
// src/services/action-service/index.ts
|
|
12
|
+
var ActionService = {
|
|
13
|
+
async loadAction({
|
|
14
|
+
idAction,
|
|
15
|
+
context
|
|
16
|
+
}) {
|
|
17
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
18
|
+
const jsonData = {
|
|
19
|
+
action_id: idAction,
|
|
20
|
+
with_context: {
|
|
21
|
+
...context
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
return env.requests.post(`${"/load_action" /* LOAD_ACTION */}`, jsonData, {
|
|
25
|
+
headers: {
|
|
26
|
+
"Content-Type": "application/json"
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
async callButton({
|
|
31
|
+
model,
|
|
32
|
+
ids = [],
|
|
33
|
+
context,
|
|
34
|
+
method
|
|
35
|
+
}) {
|
|
36
|
+
try {
|
|
37
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
38
|
+
const jsonData = {
|
|
39
|
+
model,
|
|
40
|
+
method,
|
|
41
|
+
ids,
|
|
42
|
+
with_context: context
|
|
43
|
+
};
|
|
44
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
45
|
+
headers: {
|
|
46
|
+
"Content-Type": "application/json"
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error("Error when calling button action:", error);
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
async removeRows({
|
|
55
|
+
model,
|
|
56
|
+
ids,
|
|
57
|
+
context
|
|
58
|
+
}) {
|
|
59
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
60
|
+
const jsonData = {
|
|
61
|
+
model,
|
|
62
|
+
method: "unlink",
|
|
63
|
+
ids,
|
|
64
|
+
with_context: context
|
|
65
|
+
};
|
|
66
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
67
|
+
headers: {
|
|
68
|
+
"Content-Type": "application/json"
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
},
|
|
72
|
+
async duplicateRecord({
|
|
73
|
+
model,
|
|
74
|
+
id,
|
|
75
|
+
context
|
|
76
|
+
}) {
|
|
77
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
78
|
+
const jsonData = {
|
|
79
|
+
model,
|
|
80
|
+
method: "copy",
|
|
81
|
+
ids: id,
|
|
82
|
+
with_context: context
|
|
83
|
+
};
|
|
84
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
85
|
+
headers: {
|
|
86
|
+
"Content-Type": "application/json"
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
},
|
|
90
|
+
async print({ id, report, db }) {
|
|
91
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
92
|
+
const jsonData = {
|
|
93
|
+
report,
|
|
94
|
+
id,
|
|
95
|
+
type: "pdf",
|
|
96
|
+
file_response: true,
|
|
97
|
+
db
|
|
98
|
+
};
|
|
99
|
+
const queryString = _chunkGGOFXFSXjs.toQueryString.call(void 0, jsonData);
|
|
100
|
+
const urlWithParams = `${"/report" /* REPORT_PATH */}?${queryString}`;
|
|
101
|
+
return env.requests.get(urlWithParams, {
|
|
102
|
+
headers: {
|
|
103
|
+
"Content-Type": "application/json"
|
|
104
|
+
},
|
|
105
|
+
responseType: "arraybuffer"
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
async runAction({
|
|
109
|
+
idAction,
|
|
110
|
+
context
|
|
111
|
+
}) {
|
|
112
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
113
|
+
const jsonData = {
|
|
114
|
+
action_id: idAction,
|
|
115
|
+
with_context: {
|
|
116
|
+
...context
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return env.requests.post(`${"/run_action" /* RUN_ACTION_PATH */}`, jsonData, {
|
|
120
|
+
headers: {
|
|
121
|
+
"Content-Type": "application/json"
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
var action_service_default = ActionService;
|
|
127
|
+
|
|
128
|
+
// src/services/auth-service/index.ts
|
|
129
|
+
var AuthService = {
|
|
130
|
+
async login(body) {
|
|
131
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
132
|
+
const payload = Object.fromEntries(
|
|
133
|
+
Object.entries({
|
|
134
|
+
username: body.email,
|
|
135
|
+
password: body.password,
|
|
136
|
+
grant_type: _optionalChain([env, 'optionalAccess', _2 => _2.config, 'optionalAccess', _3 => _3.grantType]) || "",
|
|
137
|
+
client_id: _optionalChain([env, 'optionalAccess', _4 => _4.config, 'optionalAccess', _5 => _5.clientId]) || "",
|
|
138
|
+
client_secret: _optionalChain([env, 'optionalAccess', _6 => _6.config, 'optionalAccess', _7 => _7.clientSecret]) || ""
|
|
139
|
+
}).filter(([_, value]) => !!value)
|
|
140
|
+
);
|
|
141
|
+
const encodedData = new URLSearchParams(payload).toString();
|
|
142
|
+
return _optionalChain([env, 'optionalAccess', _8 => _8.requests, 'optionalAccess', _9 => _9.post, 'call', _10 => _10(body.path, encodedData, {
|
|
143
|
+
headers: {
|
|
144
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
145
|
+
}
|
|
146
|
+
})]);
|
|
147
|
+
},
|
|
148
|
+
async forgotPassword(email) {
|
|
149
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
150
|
+
const bodyData = {
|
|
151
|
+
login: email,
|
|
152
|
+
url: `${window.location.origin}/reset-password`
|
|
153
|
+
};
|
|
154
|
+
return _optionalChain([env, 'optionalAccess', _11 => _11.requests, 'optionalAccess', _12 => _12.post, 'call', _13 => _13("/reset_password" /* RESET_PASSWORD_PATH */, bodyData, {
|
|
155
|
+
headers: {
|
|
156
|
+
"Content-Type": "application/json"
|
|
157
|
+
}
|
|
158
|
+
})]);
|
|
159
|
+
},
|
|
160
|
+
async resetPassword(data, token) {
|
|
161
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
162
|
+
const bodyData = {
|
|
163
|
+
token,
|
|
164
|
+
password: data.password,
|
|
165
|
+
new_password: data.confirmPassword
|
|
166
|
+
};
|
|
167
|
+
return _optionalChain([env, 'optionalAccess', _14 => _14.requests, 'optionalAccess', _15 => _15.post, 'call', _16 => _16("/change_password" /* CHANGE_PASSWORD_PATH */, bodyData, {
|
|
168
|
+
headers: {
|
|
169
|
+
"Content-Type": "application/json"
|
|
170
|
+
}
|
|
171
|
+
})]);
|
|
172
|
+
},
|
|
173
|
+
async updatePassword(data, token) {
|
|
174
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
175
|
+
const bodyData = {
|
|
176
|
+
token,
|
|
177
|
+
old_password: data.oldPassword,
|
|
178
|
+
new_password: data.newPassword
|
|
179
|
+
};
|
|
180
|
+
return _optionalChain([env, 'optionalAccess', _17 => _17.requests, 'optionalAccess', _18 => _18.post, 'call', _19 => _19("/change_password_parent" /* UPDATE_PASSWORD_PATH */, bodyData, {
|
|
181
|
+
headers: {
|
|
182
|
+
"Content-Type": "application/json"
|
|
183
|
+
}
|
|
184
|
+
})]);
|
|
185
|
+
},
|
|
186
|
+
async isValidToken(token) {
|
|
187
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
188
|
+
const bodyData = {
|
|
189
|
+
token
|
|
190
|
+
};
|
|
191
|
+
return _optionalChain([env, 'optionalAccess', _20 => _20.requests, 'optionalAccess', _21 => _21.post, 'call', _22 => _22("/check_token" /* TOKEN */, bodyData, {
|
|
192
|
+
headers: {
|
|
193
|
+
"Content-Type": "application/json"
|
|
194
|
+
}
|
|
195
|
+
})]);
|
|
196
|
+
},
|
|
197
|
+
async loginSocial({
|
|
198
|
+
state,
|
|
199
|
+
access_token
|
|
200
|
+
}) {
|
|
201
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
202
|
+
return _optionalChain([env, 'optionalAccess', _23 => _23.requests, 'optionalAccess', _24 => _24.post, 'call', _25 => _25(
|
|
203
|
+
"/token/generate" /* GENTOKEN_SOCIAL */,
|
|
204
|
+
{ state, access_token },
|
|
205
|
+
{
|
|
206
|
+
headers: {
|
|
207
|
+
"Content-Type": "application/json"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
)]);
|
|
211
|
+
},
|
|
212
|
+
async getProviders(db) {
|
|
213
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
214
|
+
return _optionalChain([env, 'optionalAccess', _26 => _26.requests, 'optionalAccess', _27 => _27.get, 'call', _28 => _28("/oauth/providers", { params: { db } })]);
|
|
215
|
+
}
|
|
216
|
+
};
|
|
217
|
+
var auth_service_default = AuthService;
|
|
218
|
+
|
|
219
|
+
// src/services/company-service/index.ts
|
|
220
|
+
var CompanyService = {
|
|
221
|
+
async getCurrentCompany() {
|
|
222
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
223
|
+
return await env.requests.get("/company" /* COMPANY_PATH */, {
|
|
224
|
+
headers: {
|
|
225
|
+
"Content-Type": "application/json"
|
|
226
|
+
}
|
|
227
|
+
});
|
|
228
|
+
},
|
|
229
|
+
async getInfoCompany(id) {
|
|
230
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
231
|
+
const jsonData = {
|
|
232
|
+
ids: [id],
|
|
233
|
+
model: "res.company" /* COMPANY */,
|
|
234
|
+
method: "web_read" /* WEB_READ */,
|
|
235
|
+
kwargs: {
|
|
236
|
+
specification: {
|
|
237
|
+
primary_color: {},
|
|
238
|
+
secondary_color: {},
|
|
239
|
+
logo: {},
|
|
240
|
+
display_name: {},
|
|
241
|
+
secondary_logo: {}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
};
|
|
245
|
+
return await _optionalChain([env, 'optionalAccess', _29 => _29.requests, 'optionalAccess', _30 => _30.post, 'call', _31 => _31("/call" /* CALL_PATH */, jsonData, {
|
|
246
|
+
headers: {
|
|
247
|
+
"Content-Type": "application/json"
|
|
248
|
+
}
|
|
249
|
+
})]);
|
|
250
|
+
}
|
|
251
|
+
};
|
|
252
|
+
var company_service_default = CompanyService;
|
|
253
|
+
|
|
254
|
+
// src/services/excel-service/index.ts
|
|
255
|
+
var ExcelService = {
|
|
256
|
+
async uploadFile({ formData }) {
|
|
257
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
258
|
+
return env.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
259
|
+
headers: {
|
|
260
|
+
"Content-Type": "multipart/form-data"
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
},
|
|
264
|
+
async uploadIdFile({ formData }) {
|
|
265
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
266
|
+
return env.requests.post(`${"/upload/file" /* UPLOAD_FILE_PATH */}`, formData, {
|
|
267
|
+
headers: {
|
|
268
|
+
"Content-Type": "multipart/form-data"
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
},
|
|
272
|
+
async parsePreview({
|
|
273
|
+
id,
|
|
274
|
+
selectedSheet,
|
|
275
|
+
isHeader,
|
|
276
|
+
context
|
|
277
|
+
}) {
|
|
278
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
279
|
+
const jsonData = {
|
|
280
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
281
|
+
method: "parse_preview",
|
|
282
|
+
ids: [id],
|
|
283
|
+
kwargs: {
|
|
284
|
+
options: {
|
|
285
|
+
import_skip_records: [],
|
|
286
|
+
import_set_empty_fields: [],
|
|
287
|
+
fallback_values: {},
|
|
288
|
+
name_create_enabled_fields: {},
|
|
289
|
+
encoding: "",
|
|
290
|
+
separator: "",
|
|
291
|
+
quoting: '"',
|
|
292
|
+
date_format: "",
|
|
293
|
+
datetime_format: "",
|
|
294
|
+
float_thousand_separator: ",",
|
|
295
|
+
float_decimal_separator: ".",
|
|
296
|
+
advanced: true,
|
|
297
|
+
has_headers: isHeader,
|
|
298
|
+
keep_matches: false,
|
|
299
|
+
limit: 2e3,
|
|
300
|
+
sheets: [],
|
|
301
|
+
sheet: selectedSheet,
|
|
302
|
+
skip: 0,
|
|
303
|
+
tracking_disable: true
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
with_context: context
|
|
307
|
+
};
|
|
308
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
309
|
+
headers: {
|
|
310
|
+
"Content-Type": "multipart/form-data"
|
|
311
|
+
}
|
|
312
|
+
});
|
|
313
|
+
},
|
|
314
|
+
async executeImport({
|
|
315
|
+
columns,
|
|
316
|
+
fields,
|
|
317
|
+
idFile,
|
|
318
|
+
options,
|
|
319
|
+
dryrun,
|
|
320
|
+
context
|
|
321
|
+
}) {
|
|
322
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
323
|
+
const jsonData = {
|
|
324
|
+
model: "base_import.import" /* BASE_IMPORT */,
|
|
325
|
+
method: "execute_import",
|
|
326
|
+
ids: [idFile],
|
|
327
|
+
kwargs: {
|
|
328
|
+
fields,
|
|
329
|
+
columns,
|
|
330
|
+
options,
|
|
331
|
+
dryrun
|
|
332
|
+
},
|
|
333
|
+
with_context: context
|
|
334
|
+
};
|
|
335
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
336
|
+
headers: {
|
|
337
|
+
"Content-Type": "multipart/form-data"
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
async getFileExcel({ model, context }) {
|
|
342
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
343
|
+
const jsonData = {
|
|
344
|
+
model,
|
|
345
|
+
method: "get_import_templates" /* GET_IMPORT */,
|
|
346
|
+
args: [],
|
|
347
|
+
with_context: context
|
|
348
|
+
};
|
|
349
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData);
|
|
350
|
+
},
|
|
351
|
+
async getFieldExport({
|
|
352
|
+
ids,
|
|
353
|
+
model,
|
|
354
|
+
isShow,
|
|
355
|
+
parentField,
|
|
356
|
+
fieldType,
|
|
357
|
+
parentName,
|
|
358
|
+
prefix,
|
|
359
|
+
name,
|
|
360
|
+
context,
|
|
361
|
+
importCompat
|
|
362
|
+
}) {
|
|
363
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
364
|
+
const jsonData = {
|
|
365
|
+
model,
|
|
366
|
+
import_compat: importCompat,
|
|
367
|
+
domain: [["id", "in", ids]],
|
|
368
|
+
with_context: context
|
|
369
|
+
};
|
|
370
|
+
if (isShow) {
|
|
371
|
+
jsonData.parent_field = parentField;
|
|
372
|
+
jsonData.parent_field_type = fieldType;
|
|
373
|
+
jsonData.parent_name = parentName;
|
|
374
|
+
jsonData.name = name;
|
|
375
|
+
jsonData.prefix = prefix;
|
|
376
|
+
jsonData.exclude = [null];
|
|
377
|
+
}
|
|
378
|
+
return env.requests.post("/export/get_fields", jsonData);
|
|
379
|
+
},
|
|
380
|
+
async exportExcel({
|
|
381
|
+
model,
|
|
382
|
+
domain,
|
|
383
|
+
ids,
|
|
384
|
+
fields,
|
|
385
|
+
type,
|
|
386
|
+
importCompat,
|
|
387
|
+
context,
|
|
388
|
+
groupby
|
|
389
|
+
}) {
|
|
390
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
391
|
+
const jsonData = {
|
|
392
|
+
model,
|
|
393
|
+
domain,
|
|
394
|
+
ids,
|
|
395
|
+
import_compat: importCompat,
|
|
396
|
+
fields,
|
|
397
|
+
with_context: context,
|
|
398
|
+
groupby: _nullishCoalesce(groupby, () => ( []))
|
|
399
|
+
};
|
|
400
|
+
return env.requests.post_excel(`/export/${type}`, jsonData);
|
|
401
|
+
}
|
|
402
|
+
};
|
|
403
|
+
var excel_service_default = ExcelService;
|
|
404
|
+
|
|
405
|
+
// src/services/form-service/index.ts
|
|
406
|
+
var FormService = {
|
|
407
|
+
async getComment({ data }) {
|
|
408
|
+
try {
|
|
409
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
410
|
+
const jsonData = {
|
|
411
|
+
thread_id: data.thread_id,
|
|
412
|
+
thread_model: data.thread_model,
|
|
413
|
+
limit: 100,
|
|
414
|
+
with_context: {
|
|
415
|
+
lang: data.lang
|
|
416
|
+
}
|
|
417
|
+
};
|
|
418
|
+
return env.requests.post("/chatter/thread/messages" /* GET_MESSAGE */, jsonData, {
|
|
419
|
+
headers: {
|
|
420
|
+
"Content-Type": "application/json"
|
|
421
|
+
}
|
|
422
|
+
});
|
|
423
|
+
} catch (error) {
|
|
424
|
+
console.error("Error when sending message:", error);
|
|
425
|
+
throw error;
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
async sentComment({ data }) {
|
|
429
|
+
try {
|
|
430
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
431
|
+
const jsonData = {
|
|
432
|
+
context: {
|
|
433
|
+
tz: "Asia/Saigon",
|
|
434
|
+
uid: 2,
|
|
435
|
+
allowed_company_ids: [1],
|
|
436
|
+
mail_post_autofollow: false,
|
|
437
|
+
temporary_id: 142183.01
|
|
438
|
+
},
|
|
439
|
+
post_data: {
|
|
440
|
+
body: data.message,
|
|
441
|
+
message_type: "comment",
|
|
442
|
+
attachment_ids: data.attachment_ids,
|
|
443
|
+
attachment_tokens: [],
|
|
444
|
+
subtype_xmlid: data.subtype
|
|
445
|
+
},
|
|
446
|
+
thread_id: Number(data.thread_id),
|
|
447
|
+
thread_model: data.thread_model
|
|
448
|
+
};
|
|
449
|
+
return env.requests.post("/chatter/message/post" /* SENT_MESSAGE */, jsonData, {
|
|
450
|
+
headers: {
|
|
451
|
+
"Content-Type": "application/json"
|
|
452
|
+
}
|
|
453
|
+
});
|
|
454
|
+
} catch (error) {
|
|
455
|
+
console.error("Error when sent message:", error);
|
|
456
|
+
throw error;
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
async deleteComment({ data }) {
|
|
460
|
+
try {
|
|
461
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
462
|
+
const jsonData = {
|
|
463
|
+
attachment_ids: [],
|
|
464
|
+
attachment_tokens: [],
|
|
465
|
+
body: "",
|
|
466
|
+
message_id: data.message_id
|
|
467
|
+
};
|
|
468
|
+
return env.requests.post("/chatter/message/update_content" /* DELETE_MESSAGE */, jsonData, {
|
|
469
|
+
headers: {
|
|
470
|
+
"Content-Type": "application/json"
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
} catch (error) {
|
|
474
|
+
console.error("Error when sent message:", error);
|
|
475
|
+
throw error;
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
async getImage({ data }) {
|
|
479
|
+
try {
|
|
480
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
481
|
+
return env.requests.get(
|
|
482
|
+
`${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
|
|
483
|
+
{
|
|
484
|
+
headers: {
|
|
485
|
+
"Content-Type": "application/json"
|
|
486
|
+
}
|
|
487
|
+
}
|
|
488
|
+
);
|
|
489
|
+
} catch (error) {
|
|
490
|
+
console.error("Error when sent message:", error);
|
|
491
|
+
throw error;
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
async uploadImage({ data }) {
|
|
495
|
+
try {
|
|
496
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
497
|
+
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, data, {
|
|
498
|
+
headers: {
|
|
499
|
+
"Content-Type": "multipart/form-data"
|
|
500
|
+
}
|
|
501
|
+
});
|
|
502
|
+
} catch (error) {
|
|
503
|
+
console.error("Error when sent message:", error);
|
|
504
|
+
throw error;
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
async getFormView({ data }) {
|
|
508
|
+
try {
|
|
509
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
510
|
+
const jsonData = {
|
|
511
|
+
model: data.model,
|
|
512
|
+
method: "get_formview_action",
|
|
513
|
+
ids: data.id ? [data.id] : [],
|
|
514
|
+
with_context: data.context
|
|
515
|
+
};
|
|
516
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
517
|
+
headers: {
|
|
518
|
+
"Content-Type": "application/json"
|
|
519
|
+
}
|
|
520
|
+
});
|
|
521
|
+
} catch (error) {
|
|
522
|
+
console.error("Error when fetching form view:", error);
|
|
523
|
+
throw error;
|
|
524
|
+
}
|
|
525
|
+
},
|
|
526
|
+
async changeStatus({ data }) {
|
|
527
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
528
|
+
const vals = {
|
|
529
|
+
[data.name]: data.stage_id
|
|
530
|
+
};
|
|
531
|
+
const jsonData = {
|
|
532
|
+
model: data.model,
|
|
533
|
+
method: "web_save",
|
|
534
|
+
with_context: {
|
|
535
|
+
lang: data.lang,
|
|
536
|
+
allowed_company_ids: [1],
|
|
537
|
+
uid: 2,
|
|
538
|
+
search_default_my_ticket: true,
|
|
539
|
+
search_default_is_open: true
|
|
540
|
+
},
|
|
541
|
+
ids: [data.id],
|
|
542
|
+
kwargs: {
|
|
543
|
+
vals,
|
|
544
|
+
specification: {}
|
|
545
|
+
}
|
|
546
|
+
};
|
|
547
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
548
|
+
headers: {
|
|
549
|
+
"Content-Type": "application/json"
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
};
|
|
554
|
+
var form_service_default = FormService;
|
|
555
|
+
|
|
556
|
+
// src/services/model-service/index.ts
|
|
557
|
+
var OBJECT_POSITION = 2;
|
|
558
|
+
var ModelService = {
|
|
559
|
+
async getAll({ data }) {
|
|
560
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
561
|
+
const jsonReadGroup = data.type == "calendar" ? { fields: _optionalChain([data, 'optionalAccess', _32 => _32.fields]) } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
562
|
+
fields: data.fields,
|
|
563
|
+
groupby: data.groupby
|
|
564
|
+
} : {
|
|
565
|
+
count_limit: 10001,
|
|
566
|
+
order: data.sort,
|
|
567
|
+
specification: data.specification
|
|
568
|
+
};
|
|
569
|
+
const jsonData = {
|
|
570
|
+
model: String(data.model),
|
|
571
|
+
method: data.type == "calendar" ? "search_read" : jsonReadGroup.fields && jsonReadGroup.groupby ? "web_read_group" : "web_search_read",
|
|
572
|
+
ids: data.ids,
|
|
573
|
+
with_context: data.context,
|
|
574
|
+
kwargs: {
|
|
575
|
+
domain: data.domain,
|
|
576
|
+
limit: data.limit,
|
|
577
|
+
offset: data.offset,
|
|
578
|
+
...jsonReadGroup
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
return _optionalChain([env, 'optionalAccess', _33 => _33.requests, 'access', _34 => _34.post, 'call', _35 => _35("/call" /* CALL_PATH */, jsonData, {
|
|
582
|
+
headers: {
|
|
583
|
+
"Content-Type": "application/json"
|
|
584
|
+
}
|
|
585
|
+
})]);
|
|
586
|
+
},
|
|
587
|
+
async getList({
|
|
588
|
+
model,
|
|
589
|
+
ids = [],
|
|
590
|
+
specification = {},
|
|
591
|
+
domain = [],
|
|
592
|
+
offset,
|
|
593
|
+
order,
|
|
594
|
+
context = {},
|
|
595
|
+
limit = 10
|
|
596
|
+
}) {
|
|
597
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
598
|
+
const jsonData = {
|
|
599
|
+
model,
|
|
600
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
601
|
+
ids,
|
|
602
|
+
with_context: context,
|
|
603
|
+
kwargs: {
|
|
604
|
+
specification,
|
|
605
|
+
domain,
|
|
606
|
+
limit,
|
|
607
|
+
offset,
|
|
608
|
+
order
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
return _optionalChain([env, 'optionalAccess', _36 => _36.requests, 'optionalAccess', _37 => _37.post, 'call', _38 => _38("/call" /* CALL_PATH */, jsonData, {
|
|
612
|
+
headers: {
|
|
613
|
+
"Content-Type": "application/json"
|
|
614
|
+
}
|
|
615
|
+
})]);
|
|
616
|
+
},
|
|
617
|
+
async getDetail({
|
|
618
|
+
ids = [],
|
|
619
|
+
model,
|
|
620
|
+
specification,
|
|
621
|
+
context
|
|
622
|
+
}) {
|
|
623
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
624
|
+
const jsonData = {
|
|
625
|
+
model,
|
|
626
|
+
method: "web_read" /* WEB_READ */,
|
|
627
|
+
ids,
|
|
628
|
+
with_context: context,
|
|
629
|
+
kwargs: {
|
|
630
|
+
specification
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
return _optionalChain([env, 'optionalAccess', _39 => _39.requests, 'optionalAccess', _40 => _40.post, 'call', _41 => _41("/call" /* CALL_PATH */, jsonData, {
|
|
634
|
+
headers: {
|
|
635
|
+
"Content-Type": "application/json"
|
|
636
|
+
}
|
|
637
|
+
})]);
|
|
638
|
+
},
|
|
639
|
+
async save({
|
|
640
|
+
model,
|
|
641
|
+
ids = [],
|
|
642
|
+
data = {},
|
|
643
|
+
specification = {},
|
|
644
|
+
context = {}
|
|
645
|
+
}) {
|
|
646
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
647
|
+
const jsonData = {
|
|
648
|
+
model,
|
|
649
|
+
method: "web_save" /* WEB_SAVE */,
|
|
650
|
+
with_context: context,
|
|
651
|
+
ids,
|
|
652
|
+
kwargs: {
|
|
653
|
+
vals: data,
|
|
654
|
+
specification
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
return _optionalChain([env, 'optionalAccess', _42 => _42.requests, 'optionalAccess', _43 => _43.post, 'call', _44 => _44("/call" /* CALL_PATH */, jsonData, {
|
|
658
|
+
headers: {
|
|
659
|
+
"Content-Type": "application/json"
|
|
660
|
+
}
|
|
661
|
+
})]);
|
|
662
|
+
},
|
|
663
|
+
async delete({ ids = [], model }) {
|
|
664
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
665
|
+
const jsonData = {
|
|
666
|
+
model,
|
|
667
|
+
method: "unlink" /* UNLINK */,
|
|
668
|
+
ids
|
|
669
|
+
};
|
|
670
|
+
return _optionalChain([env, 'optionalAccess', _45 => _45.requests, 'optionalAccess', _46 => _46.post, 'call', _47 => _47("/call" /* CALL_PATH */, jsonData, {
|
|
671
|
+
headers: {
|
|
672
|
+
"Content-Type": "application/json"
|
|
673
|
+
}
|
|
674
|
+
})]);
|
|
675
|
+
},
|
|
676
|
+
async onChange({
|
|
677
|
+
ids = [],
|
|
678
|
+
model,
|
|
679
|
+
object,
|
|
680
|
+
specification,
|
|
681
|
+
context,
|
|
682
|
+
fieldChange
|
|
683
|
+
}) {
|
|
684
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
685
|
+
const jsonData = {
|
|
686
|
+
model,
|
|
687
|
+
method: "onchange" /* ONCHANGE */,
|
|
688
|
+
ids,
|
|
689
|
+
with_context: context,
|
|
690
|
+
args: [
|
|
691
|
+
object ? object : {},
|
|
692
|
+
fieldChange ? fieldChange : [],
|
|
693
|
+
specification
|
|
694
|
+
]
|
|
695
|
+
};
|
|
696
|
+
return _optionalChain([env, 'optionalAccess', _48 => _48.requests, 'optionalAccess', _49 => _49.post, 'call', _50 => _50("/call" /* CALL_PATH */, jsonData, {
|
|
697
|
+
headers: {
|
|
698
|
+
"Content-Type": "application/json"
|
|
699
|
+
}
|
|
700
|
+
})]);
|
|
701
|
+
},
|
|
702
|
+
async getListFieldsOnchange({ model }) {
|
|
703
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
704
|
+
const jsonData = {
|
|
705
|
+
model,
|
|
706
|
+
method: "get_fields_onchange" /* GET_ONCHANGE_FIELDS */
|
|
707
|
+
};
|
|
708
|
+
return _optionalChain([env, 'optionalAccess', _51 => _51.requests, 'optionalAccess', _52 => _52.post, 'call', _53 => _53("/call" /* CALL_PATH */, jsonData, {
|
|
709
|
+
headers: {
|
|
710
|
+
"Content-Type": "application/json"
|
|
711
|
+
}
|
|
712
|
+
})]);
|
|
713
|
+
},
|
|
714
|
+
parseORMOdoo(data) {
|
|
715
|
+
for (const key in data) {
|
|
716
|
+
if (key === "display_name") {
|
|
717
|
+
delete data[key];
|
|
718
|
+
}
|
|
719
|
+
if (!data[key] && data[key] !== 0) {
|
|
720
|
+
data[key] = false;
|
|
721
|
+
} else if (data[key] === "Draft") {
|
|
722
|
+
data[key] = "/";
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
return { ...data };
|
|
726
|
+
},
|
|
727
|
+
toDataJS(data, viewData, model) {
|
|
728
|
+
for (const key in data) {
|
|
729
|
+
if (data[key] === false) {
|
|
730
|
+
if (viewData && model) {
|
|
731
|
+
if (_optionalChain([viewData, 'optionalAccess', _54 => _54.models, 'optionalAccess', _55 => _55[model], 'optionalAccess', _56 => _56[key], 'optionalAccess', _57 => _57.type]) !== "boolean" /* BOOLEAN */) {
|
|
732
|
+
data[key] = null;
|
|
733
|
+
}
|
|
734
|
+
} else {
|
|
735
|
+
data[key] = null;
|
|
736
|
+
}
|
|
737
|
+
} else if (data[key] === "/") {
|
|
738
|
+
data[key] = "Draft";
|
|
739
|
+
} else if (data[key] !== false) {
|
|
740
|
+
if (model !== void 0) {
|
|
741
|
+
if (_optionalChain([viewData, 'optionalAccess', _58 => _58.models, 'optionalAccess', _59 => _59[model], 'optionalAccess', _60 => _60[key], 'optionalAccess', _61 => _61.type]) === "one2many" /* ONE2MANY */ || _optionalChain([viewData, 'optionalAccess', _62 => _62.models, 'optionalAccess', _63 => _63[model], 'optionalAccess', _64 => _64[key], 'optionalAccess', _65 => _65.type]) === "many2many" /* MANY2MANY */) {
|
|
742
|
+
data[key] = _optionalChain([(data[key] ??= []), 'optionalAccess', _66 => _66.map, 'call', _67 => _67((item, index) => {
|
|
743
|
+
const relation = _optionalChain([viewData, 'optionalAccess', _68 => _68.models, 'optionalAccess', _69 => _69[model], 'optionalAccess', _70 => _70[key], 'optionalAccess', _71 => _71.relation]);
|
|
744
|
+
if (relation !== void 0) {
|
|
745
|
+
if (_optionalChain([viewData, 'optionalAccess', _72 => _72.models, 'optionalAccess', _73 => _73[relation]])) {
|
|
746
|
+
if (_optionalChain([item, 'optionalAccess', _74 => _74.length]) >= 3) {
|
|
747
|
+
if (item[0] === 2 /* DELETE */) {
|
|
748
|
+
delete data[key][index];
|
|
749
|
+
return;
|
|
750
|
+
}
|
|
751
|
+
return ModelService.toDataJS(
|
|
752
|
+
{ ...item[OBJECT_POSITION], id: `virtual_${index}` },
|
|
753
|
+
viewData,
|
|
754
|
+
relation
|
|
755
|
+
);
|
|
756
|
+
} else {
|
|
757
|
+
return ModelService.toDataJS(item, viewData, relation);
|
|
758
|
+
}
|
|
759
|
+
} else {
|
|
760
|
+
if (_optionalChain([item, 'optionalAccess', _75 => _75.length]) >= 3) {
|
|
761
|
+
if (!item[OBJECT_POSITION] || item[0] === 2 /* DELETE */) {
|
|
762
|
+
delete data[key][index];
|
|
763
|
+
return;
|
|
764
|
+
}
|
|
765
|
+
return item[OBJECT_POSITION];
|
|
766
|
+
} else {
|
|
767
|
+
return item;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
})]);
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
return { ...data };
|
|
777
|
+
}
|
|
778
|
+
};
|
|
779
|
+
var model_service_default = ModelService;
|
|
780
|
+
|
|
781
|
+
// src/services/user-service/index.ts
|
|
782
|
+
var UserService = {
|
|
783
|
+
async getProfile() {
|
|
784
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
785
|
+
return env.requests.get("/userinfo" /* PROFILE_PATH */, {
|
|
786
|
+
headers: {
|
|
787
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
},
|
|
791
|
+
async getUser({ context, id }) {
|
|
792
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
793
|
+
const jsonData = {
|
|
794
|
+
model: "res.users",
|
|
795
|
+
method: "web_read",
|
|
796
|
+
ids: [id],
|
|
797
|
+
with_context: context,
|
|
798
|
+
kwargs: {
|
|
799
|
+
specification: {
|
|
800
|
+
display_name: {},
|
|
801
|
+
image_1920: {},
|
|
802
|
+
name: {},
|
|
803
|
+
login: {},
|
|
804
|
+
email: {},
|
|
805
|
+
password: {},
|
|
806
|
+
visible_group_id: {
|
|
807
|
+
fields: {
|
|
808
|
+
id: {},
|
|
809
|
+
display_name: {}
|
|
810
|
+
}
|
|
811
|
+
},
|
|
812
|
+
company_id: {
|
|
813
|
+
fields: {
|
|
814
|
+
id: {},
|
|
815
|
+
display_name: {}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
}
|
|
820
|
+
};
|
|
821
|
+
return env.requests.post("/call" /* CALL_PATH */, jsonData, {
|
|
822
|
+
headers: {
|
|
823
|
+
"Content-Type": "application/json"
|
|
824
|
+
}
|
|
825
|
+
});
|
|
826
|
+
},
|
|
827
|
+
switchUserLocale: async ({ id, values }) => {
|
|
828
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
829
|
+
const jsonData = {
|
|
830
|
+
model: "res.users",
|
|
831
|
+
domain: [["id", "=", id]],
|
|
832
|
+
values
|
|
833
|
+
};
|
|
834
|
+
return _optionalChain([env, 'optionalAccess', _76 => _76.requests, 'access', _77 => _77.post, 'call', _78 => _78(_optionalChain([_chunkIXDDYGKEjs.UriConstants, 'optionalAccess', _79 => _79.CREATE_UPDATE_PATH]), jsonData, {
|
|
835
|
+
headers: {
|
|
836
|
+
"Content-Type": "application/json"
|
|
837
|
+
}
|
|
838
|
+
})]);
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
var user_service_default = UserService;
|
|
842
|
+
|
|
843
|
+
// src/services/view-service/index.ts
|
|
844
|
+
var ViewService = {
|
|
845
|
+
async getView({
|
|
846
|
+
model,
|
|
847
|
+
views,
|
|
848
|
+
context = {},
|
|
849
|
+
options = {},
|
|
850
|
+
aid
|
|
851
|
+
}) {
|
|
852
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
853
|
+
const defaultOptions = {
|
|
854
|
+
load_filters: true,
|
|
855
|
+
toolbar: true,
|
|
856
|
+
action_id: aid
|
|
857
|
+
};
|
|
858
|
+
const jsonDataView = {
|
|
859
|
+
model,
|
|
860
|
+
method: "get_fields_view_v2" /* GET_FIELD_VIEW */,
|
|
861
|
+
kwargs: {
|
|
862
|
+
views,
|
|
863
|
+
options: { ...options, ...defaultOptions }
|
|
864
|
+
},
|
|
865
|
+
with_context: context
|
|
866
|
+
};
|
|
867
|
+
return _optionalChain([env, 'optionalAccess', _80 => _80.requests, 'optionalAccess', _81 => _81.post, 'call', _82 => _82("/call" /* CALL_PATH */, jsonDataView, {
|
|
868
|
+
headers: {
|
|
869
|
+
"Content-Type": "application/json"
|
|
870
|
+
}
|
|
871
|
+
})]);
|
|
872
|
+
},
|
|
873
|
+
async getMenu(context) {
|
|
874
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
875
|
+
const jsonData = {
|
|
876
|
+
model: "ir.ui.menu" /* MENU */,
|
|
877
|
+
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
878
|
+
ids: [],
|
|
879
|
+
with_context: context,
|
|
880
|
+
kwargs: {
|
|
881
|
+
specification: {
|
|
882
|
+
active: {},
|
|
883
|
+
name: {},
|
|
884
|
+
is_display: {},
|
|
885
|
+
sequence: {},
|
|
886
|
+
complete_name: {},
|
|
887
|
+
action: {
|
|
888
|
+
fields: {
|
|
889
|
+
display_name: {},
|
|
890
|
+
type: {},
|
|
891
|
+
binding_view_types: {}
|
|
892
|
+
// res_model: {},
|
|
893
|
+
}
|
|
894
|
+
},
|
|
895
|
+
url_icon: {},
|
|
896
|
+
web_icon: {},
|
|
897
|
+
web_icon_data: {},
|
|
898
|
+
groups_id: {
|
|
899
|
+
fields: {
|
|
900
|
+
full_name: {}
|
|
901
|
+
},
|
|
902
|
+
limit: 40,
|
|
903
|
+
order: ""
|
|
904
|
+
},
|
|
905
|
+
display_name: {},
|
|
906
|
+
child_id: {
|
|
907
|
+
fields: {
|
|
908
|
+
active: {},
|
|
909
|
+
name: {},
|
|
910
|
+
is_display: {},
|
|
911
|
+
sequence: {},
|
|
912
|
+
complete_name: {},
|
|
913
|
+
action: {
|
|
914
|
+
fields: {
|
|
915
|
+
display_name: {},
|
|
916
|
+
type: {},
|
|
917
|
+
binding_view_types: {}
|
|
918
|
+
// res_model: {},
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
url_icon: {},
|
|
922
|
+
web_icon: {},
|
|
923
|
+
web_icon_data: {},
|
|
924
|
+
groups_id: {
|
|
925
|
+
fields: {
|
|
926
|
+
full_name: {}
|
|
927
|
+
},
|
|
928
|
+
limit: 40,
|
|
929
|
+
order: ""
|
|
930
|
+
},
|
|
931
|
+
display_name: {},
|
|
932
|
+
child_id: {
|
|
933
|
+
fields: {
|
|
934
|
+
active: {},
|
|
935
|
+
name: {},
|
|
936
|
+
is_display: {},
|
|
937
|
+
sequence: {},
|
|
938
|
+
complete_name: {},
|
|
939
|
+
action: {
|
|
940
|
+
fields: {
|
|
941
|
+
display_name: {},
|
|
942
|
+
type: {},
|
|
943
|
+
binding_view_types: {}
|
|
944
|
+
// res_model: {},
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
url_icon: {},
|
|
948
|
+
web_icon: {},
|
|
949
|
+
web_icon_data: {},
|
|
950
|
+
groups_id: {
|
|
951
|
+
fields: {
|
|
952
|
+
full_name: {}
|
|
953
|
+
},
|
|
954
|
+
limit: 40,
|
|
955
|
+
order: ""
|
|
956
|
+
},
|
|
957
|
+
display_name: {},
|
|
958
|
+
child_id: {
|
|
959
|
+
fields: {
|
|
960
|
+
active: {},
|
|
961
|
+
name: {},
|
|
962
|
+
is_display: {},
|
|
963
|
+
sequence: {},
|
|
964
|
+
complete_name: {},
|
|
965
|
+
action: {
|
|
966
|
+
fields: {
|
|
967
|
+
display_name: {},
|
|
968
|
+
type: {},
|
|
969
|
+
binding_view_types: {}
|
|
970
|
+
// res_model: {},
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
url_icon: {},
|
|
974
|
+
web_icon: {},
|
|
975
|
+
web_icon_data: {},
|
|
976
|
+
groups_id: {
|
|
977
|
+
fields: {
|
|
978
|
+
full_name: {}
|
|
979
|
+
},
|
|
980
|
+
limit: 40,
|
|
981
|
+
order: ""
|
|
982
|
+
},
|
|
983
|
+
display_name: {},
|
|
984
|
+
child_id: {
|
|
985
|
+
fields: {},
|
|
986
|
+
limit: 40,
|
|
987
|
+
order: ""
|
|
988
|
+
}
|
|
989
|
+
},
|
|
990
|
+
limit: 40,
|
|
991
|
+
order: ""
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
limit: 40,
|
|
995
|
+
order: ""
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
limit: 40,
|
|
999
|
+
order: ""
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
domain: [
|
|
1003
|
+
"&",
|
|
1004
|
+
["is_display", "=", true],
|
|
1005
|
+
"&",
|
|
1006
|
+
["active", "=", true],
|
|
1007
|
+
["parent_id", "=", false]
|
|
1008
|
+
]
|
|
1009
|
+
}
|
|
1010
|
+
};
|
|
1011
|
+
return _optionalChain([env, 'optionalAccess', _83 => _83.requests, 'optionalAccess', _84 => _84.post, 'call', _85 => _85("/call" /* CALL_PATH */, jsonData, {
|
|
1012
|
+
headers: {
|
|
1013
|
+
"Content-Type": "application/json"
|
|
1014
|
+
}
|
|
1015
|
+
})]);
|
|
1016
|
+
},
|
|
1017
|
+
async getSelectionItem({ data }) {
|
|
1018
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
1019
|
+
const jsonData = {
|
|
1020
|
+
model: data.model,
|
|
1021
|
+
ids: [],
|
|
1022
|
+
method: "get_data_select",
|
|
1023
|
+
with_context: data.context,
|
|
1024
|
+
kwargs: {
|
|
1025
|
+
count_limit: 10001,
|
|
1026
|
+
domain: data.domain ? data.domain : [],
|
|
1027
|
+
offset: 0,
|
|
1028
|
+
order: "",
|
|
1029
|
+
specification: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _86 => _86.specification]), () => ( {
|
|
1030
|
+
id: {},
|
|
1031
|
+
name: {},
|
|
1032
|
+
display_name: {}
|
|
1033
|
+
}))
|
|
1034
|
+
}
|
|
1035
|
+
};
|
|
1036
|
+
return _optionalChain([env, 'optionalAccess', _87 => _87.requests, 'access', _88 => _88.post, 'call', _89 => _89("/call" /* CALL_PATH */, jsonData, {
|
|
1037
|
+
headers: {
|
|
1038
|
+
"Content-Type": "application/json"
|
|
1039
|
+
}
|
|
1040
|
+
})]);
|
|
1041
|
+
},
|
|
1042
|
+
async loadMessages() {
|
|
1043
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
1044
|
+
return env.requests.post(
|
|
1045
|
+
"/load_message_failures" /* LOAD_MESSAGE */,
|
|
1046
|
+
{},
|
|
1047
|
+
{
|
|
1048
|
+
headers: {
|
|
1049
|
+
"Content-Type": "application/json"
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
);
|
|
1053
|
+
},
|
|
1054
|
+
async getVersion() {
|
|
1055
|
+
const env = _chunkW4W2L2NAjs.getEnv.call(void 0, );
|
|
1056
|
+
return _optionalChain([env, 'optionalAccess', _90 => _90.requests, 'access', _91 => _91.get, 'call', _92 => _92("", {
|
|
1057
|
+
headers: {
|
|
1058
|
+
"Content-Type": "application/json"
|
|
1059
|
+
}
|
|
1060
|
+
})]);
|
|
1061
|
+
}
|
|
1062
|
+
};
|
|
1063
|
+
var view_service_default = ViewService;
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
|
|
1074
|
+
exports.action_service_default = action_service_default; exports.auth_service_default = auth_service_default; exports.company_service_default = company_service_default; exports.excel_service_default = excel_service_default; exports.form_service_default = form_service_default; exports.model_service_default = model_service_default; exports.user_service_default = user_service_default; exports.view_service_default = view_service_default;
|