@fctc/interface-logic 2.0.4 → 2.0.6
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/configs.d.mts +6 -6
- package/dist/configs.d.ts +6 -6
- package/dist/configs.js +40 -15
- package/dist/configs.mjs +40 -15
- package/dist/environment.js +40 -15
- package/dist/environment.mjs +40 -15
- package/dist/hooks.d.mts +15 -5
- package/dist/hooks.d.ts +15 -5
- package/dist/hooks.js +182 -187
- package/dist/hooks.mjs +182 -187
- package/dist/provider.d.mts +1 -1
- package/dist/provider.d.ts +1 -1
- package/dist/provider.js +222 -202
- package/dist/provider.mjs +222 -202
- package/dist/services.d.mts +23 -16
- package/dist/services.d.ts +23 -16
- package/dist/services.js +141 -162
- package/dist/services.mjs +141 -162
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/{view-type-BGJfDe73.d.mts → view-type-p4JdAOsz.d.mts} +5 -0
- package/dist/{view-type-BGJfDe73.d.ts → view-type-p4JdAOsz.d.ts} +5 -0
- package/package.json +85 -85
package/dist/services.d.mts
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-p4JdAOsz.mjs';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context, }: {
|
|
4
|
+
loadAction: ({ idAction, context, service, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
+
service?: string;
|
|
7
8
|
}) => Promise<any>;
|
|
8
|
-
callButton: ({ model, ids, context, method, }: {
|
|
9
|
+
callButton: ({ model, ids, context, method, service, }: {
|
|
9
10
|
model: string;
|
|
10
11
|
ids: Record<string, any>[] | any;
|
|
11
12
|
context: ContextApi;
|
|
12
13
|
method: any;
|
|
14
|
+
service?: string;
|
|
13
15
|
}) => Promise<any>;
|
|
14
|
-
removeRows: ({ model, ids, context, }: {
|
|
16
|
+
removeRows: ({ model, ids, context, service, }: {
|
|
15
17
|
model: string;
|
|
16
18
|
ids: Record<string, any>[] | any;
|
|
17
19
|
context: ContextApi;
|
|
20
|
+
service?: string;
|
|
18
21
|
}) => Promise<any>;
|
|
19
|
-
duplicateRecord: ({ model, id, context, }: {
|
|
22
|
+
duplicateRecord: ({ model, id, context, service, }: {
|
|
20
23
|
model: string;
|
|
21
24
|
id: any;
|
|
22
25
|
context: ContextApi;
|
|
26
|
+
service?: string;
|
|
23
27
|
}) => Promise<any>;
|
|
24
28
|
getPrintReportName: ({ id }: {
|
|
25
29
|
id: number;
|
|
@@ -29,9 +33,10 @@ declare function useActionService(): {
|
|
|
29
33
|
report: any;
|
|
30
34
|
db: any;
|
|
31
35
|
}) => Promise<any>;
|
|
32
|
-
runAction: ({ idAction, context, }: {
|
|
36
|
+
runAction: ({ idAction, context, service, }: {
|
|
33
37
|
idAction: number;
|
|
34
38
|
context: ContextApi;
|
|
39
|
+
service?: string;
|
|
35
40
|
}) => Promise<any>;
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -131,8 +136,8 @@ declare function useFormService(): {
|
|
|
131
136
|
getImage: ({ data }: {
|
|
132
137
|
data: any;
|
|
133
138
|
}) => Promise<any>;
|
|
134
|
-
uploadImage: ({
|
|
135
|
-
|
|
139
|
+
uploadImage: ({ formData }: {
|
|
140
|
+
formData: any;
|
|
136
141
|
}) => Promise<any>;
|
|
137
142
|
getFormView: ({ data }: {
|
|
138
143
|
data: TFormView;
|
|
@@ -163,17 +168,18 @@ declare function useModelService(): {
|
|
|
163
168
|
}) => Promise<any>;
|
|
164
169
|
getCurrency: () => Promise<any>;
|
|
165
170
|
getConversionRate: () => Promise<any>;
|
|
166
|
-
getAll: ({ data }: {
|
|
171
|
+
getAll: ({ data, service }: {
|
|
167
172
|
data: any;
|
|
173
|
+
service?: string;
|
|
168
174
|
}) => Promise<any>;
|
|
169
175
|
getListCalendar: ({ data }: {
|
|
170
176
|
data: any;
|
|
171
177
|
}) => Promise<any>;
|
|
172
178
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
173
|
-
getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
|
|
174
|
-
save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
|
|
175
|
-
deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
|
|
176
|
-
onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
|
|
179
|
+
getDetail: ({ ids, model, specification, context, service, }: GetDetailParams) => Promise<any>;
|
|
180
|
+
save: ({ model, ids, data, specification, context, path, service, }: SaveParams) => Promise<any>;
|
|
181
|
+
deleteApi: ({ ids, model, service }: DeleteParams) => Promise<any>;
|
|
182
|
+
onChange: ({ ids, model, object, specification, context, fieldChange, service, }: OnChangeParams) => Promise<any>;
|
|
177
183
|
getListFieldsOnchange: ({ model }: {
|
|
178
184
|
model: string;
|
|
179
185
|
}) => Promise<any>;
|
|
@@ -195,8 +201,8 @@ declare function useUserService(): {
|
|
|
195
201
|
};
|
|
196
202
|
|
|
197
203
|
declare function useViewService(): {
|
|
198
|
-
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
199
|
-
getMenu: (context: any) => Promise<any>;
|
|
204
|
+
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
205
|
+
getMenu: (context: any, specification: any) => Promise<any>;
|
|
200
206
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
201
207
|
getResequence: ({ model, ids, context, offset, }: {
|
|
202
208
|
model: string;
|
|
@@ -204,8 +210,9 @@ declare function useViewService(): {
|
|
|
204
210
|
context: any;
|
|
205
211
|
offset: any;
|
|
206
212
|
}) => Promise<any>;
|
|
207
|
-
getSelectionItem: ({ data }: {
|
|
213
|
+
getSelectionItem: ({ data, service }: {
|
|
208
214
|
data: GetSelectionType;
|
|
215
|
+
service?: string;
|
|
209
216
|
}) => Promise<any>;
|
|
210
217
|
loadMessages: () => Promise<any>;
|
|
211
218
|
getVersion: () => Promise<any>;
|
package/dist/services.d.ts
CHANGED
|
@@ -1,25 +1,29 @@
|
|
|
1
|
-
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-
|
|
1
|
+
import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-p4JdAOsz.js';
|
|
2
2
|
|
|
3
3
|
declare function useActionService(): {
|
|
4
|
-
loadAction: ({ idAction, context, }: {
|
|
4
|
+
loadAction: ({ idAction, context, service, }: {
|
|
5
5
|
idAction: number;
|
|
6
6
|
context: ContextApi;
|
|
7
|
+
service?: string;
|
|
7
8
|
}) => Promise<any>;
|
|
8
|
-
callButton: ({ model, ids, context, method, }: {
|
|
9
|
+
callButton: ({ model, ids, context, method, service, }: {
|
|
9
10
|
model: string;
|
|
10
11
|
ids: Record<string, any>[] | any;
|
|
11
12
|
context: ContextApi;
|
|
12
13
|
method: any;
|
|
14
|
+
service?: string;
|
|
13
15
|
}) => Promise<any>;
|
|
14
|
-
removeRows: ({ model, ids, context, }: {
|
|
16
|
+
removeRows: ({ model, ids, context, service, }: {
|
|
15
17
|
model: string;
|
|
16
18
|
ids: Record<string, any>[] | any;
|
|
17
19
|
context: ContextApi;
|
|
20
|
+
service?: string;
|
|
18
21
|
}) => Promise<any>;
|
|
19
|
-
duplicateRecord: ({ model, id, context, }: {
|
|
22
|
+
duplicateRecord: ({ model, id, context, service, }: {
|
|
20
23
|
model: string;
|
|
21
24
|
id: any;
|
|
22
25
|
context: ContextApi;
|
|
26
|
+
service?: string;
|
|
23
27
|
}) => Promise<any>;
|
|
24
28
|
getPrintReportName: ({ id }: {
|
|
25
29
|
id: number;
|
|
@@ -29,9 +33,10 @@ declare function useActionService(): {
|
|
|
29
33
|
report: any;
|
|
30
34
|
db: any;
|
|
31
35
|
}) => Promise<any>;
|
|
32
|
-
runAction: ({ idAction, context, }: {
|
|
36
|
+
runAction: ({ idAction, context, service, }: {
|
|
33
37
|
idAction: number;
|
|
34
38
|
context: ContextApi;
|
|
39
|
+
service?: string;
|
|
35
40
|
}) => Promise<any>;
|
|
36
41
|
};
|
|
37
42
|
|
|
@@ -131,8 +136,8 @@ declare function useFormService(): {
|
|
|
131
136
|
getImage: ({ data }: {
|
|
132
137
|
data: any;
|
|
133
138
|
}) => Promise<any>;
|
|
134
|
-
uploadImage: ({
|
|
135
|
-
|
|
139
|
+
uploadImage: ({ formData }: {
|
|
140
|
+
formData: any;
|
|
136
141
|
}) => Promise<any>;
|
|
137
142
|
getFormView: ({ data }: {
|
|
138
143
|
data: TFormView;
|
|
@@ -163,17 +168,18 @@ declare function useModelService(): {
|
|
|
163
168
|
}) => Promise<any>;
|
|
164
169
|
getCurrency: () => Promise<any>;
|
|
165
170
|
getConversionRate: () => Promise<any>;
|
|
166
|
-
getAll: ({ data }: {
|
|
171
|
+
getAll: ({ data, service }: {
|
|
167
172
|
data: any;
|
|
173
|
+
service?: string;
|
|
168
174
|
}) => Promise<any>;
|
|
169
175
|
getListCalendar: ({ data }: {
|
|
170
176
|
data: any;
|
|
171
177
|
}) => Promise<any>;
|
|
172
178
|
getList: ({ model, ids, specification, domain, offset, order, context, limit, }: GetListParams) => Promise<any>;
|
|
173
|
-
getDetail: ({ ids, model, specification, context }: GetDetailParams) => Promise<any>;
|
|
174
|
-
save: ({ model, ids, data, specification, context, path, }: SaveParams) => Promise<any>;
|
|
175
|
-
deleteApi: ({ ids, model }: DeleteParams) => Promise<any>;
|
|
176
|
-
onChange: ({ ids, model, object, specification, context, fieldChange, }: OnChangeParams) => Promise<any>;
|
|
179
|
+
getDetail: ({ ids, model, specification, context, service, }: GetDetailParams) => Promise<any>;
|
|
180
|
+
save: ({ model, ids, data, specification, context, path, service, }: SaveParams) => Promise<any>;
|
|
181
|
+
deleteApi: ({ ids, model, service }: DeleteParams) => Promise<any>;
|
|
182
|
+
onChange: ({ ids, model, object, specification, context, fieldChange, service, }: OnChangeParams) => Promise<any>;
|
|
177
183
|
getListFieldsOnchange: ({ model }: {
|
|
178
184
|
model: string;
|
|
179
185
|
}) => Promise<any>;
|
|
@@ -195,8 +201,8 @@ declare function useUserService(): {
|
|
|
195
201
|
};
|
|
196
202
|
|
|
197
203
|
declare function useViewService(): {
|
|
198
|
-
getView: ({ model, views, context, options, aid, }: GetViewParams) => Promise<any>;
|
|
199
|
-
getMenu: (context: any) => Promise<any>;
|
|
204
|
+
getView: ({ model, views, context, options, aid, service, }: GetViewParams) => Promise<any>;
|
|
205
|
+
getMenu: (context: any, specification: any) => Promise<any>;
|
|
200
206
|
getActionDetail: (aid: number, context: any) => Promise<any>;
|
|
201
207
|
getResequence: ({ model, ids, context, offset, }: {
|
|
202
208
|
model: string;
|
|
@@ -204,8 +210,9 @@ declare function useViewService(): {
|
|
|
204
210
|
context: any;
|
|
205
211
|
offset: any;
|
|
206
212
|
}) => Promise<any>;
|
|
207
|
-
getSelectionItem: ({ data }: {
|
|
213
|
+
getSelectionItem: ({ data, service }: {
|
|
208
214
|
data: GetSelectionType;
|
|
215
|
+
service?: string;
|
|
209
216
|
}) => Promise<any>;
|
|
210
217
|
loadMessages: () => Promise<any>;
|
|
211
218
|
getVersion: () => Promise<any>;
|
package/dist/services.js
CHANGED
|
@@ -3058,15 +3058,21 @@ function useActionService() {
|
|
|
3058
3058
|
const loadAction = (0, import_react6.useCallback)(
|
|
3059
3059
|
async ({
|
|
3060
3060
|
idAction,
|
|
3061
|
-
context
|
|
3061
|
+
context,
|
|
3062
|
+
service
|
|
3062
3063
|
}) => {
|
|
3063
3064
|
const jsonData = {
|
|
3064
3065
|
action_id: idAction,
|
|
3065
3066
|
with_context: { ...context }
|
|
3066
3067
|
};
|
|
3067
|
-
return env.requests.post(
|
|
3068
|
-
|
|
3069
|
-
|
|
3068
|
+
return env.requests.post(
|
|
3069
|
+
"/load_action" /* LOAD_ACTION */,
|
|
3070
|
+
jsonData,
|
|
3071
|
+
{
|
|
3072
|
+
headers: { "Content-Type": "application/json" }
|
|
3073
|
+
},
|
|
3074
|
+
service
|
|
3075
|
+
);
|
|
3070
3076
|
},
|
|
3071
3077
|
[env]
|
|
3072
3078
|
);
|
|
@@ -3075,7 +3081,8 @@ function useActionService() {
|
|
|
3075
3081
|
model,
|
|
3076
3082
|
ids = [],
|
|
3077
3083
|
context,
|
|
3078
|
-
method
|
|
3084
|
+
method,
|
|
3085
|
+
service
|
|
3079
3086
|
}) => {
|
|
3080
3087
|
try {
|
|
3081
3088
|
const jsonData = {
|
|
@@ -3084,9 +3091,14 @@ function useActionService() {
|
|
|
3084
3091
|
ids,
|
|
3085
3092
|
with_context: context
|
|
3086
3093
|
};
|
|
3087
|
-
return env.requests.post(
|
|
3088
|
-
|
|
3089
|
-
|
|
3094
|
+
return env.requests.post(
|
|
3095
|
+
"/call" /* CALL_PATH */,
|
|
3096
|
+
jsonData,
|
|
3097
|
+
{
|
|
3098
|
+
headers: { "Content-Type": "application/json" }
|
|
3099
|
+
},
|
|
3100
|
+
service
|
|
3101
|
+
);
|
|
3090
3102
|
} catch (error) {
|
|
3091
3103
|
console.error("Error when calling button action:", error);
|
|
3092
3104
|
throw error;
|
|
@@ -3098,7 +3110,8 @@ function useActionService() {
|
|
|
3098
3110
|
async ({
|
|
3099
3111
|
model,
|
|
3100
3112
|
ids,
|
|
3101
|
-
context
|
|
3113
|
+
context,
|
|
3114
|
+
service
|
|
3102
3115
|
}) => {
|
|
3103
3116
|
const jsonData = {
|
|
3104
3117
|
model,
|
|
@@ -3106,9 +3119,14 @@ function useActionService() {
|
|
|
3106
3119
|
ids,
|
|
3107
3120
|
with_context: context
|
|
3108
3121
|
};
|
|
3109
|
-
return env.requests.post(
|
|
3110
|
-
|
|
3111
|
-
|
|
3122
|
+
return env.requests.post(
|
|
3123
|
+
"/call" /* CALL_PATH */,
|
|
3124
|
+
jsonData,
|
|
3125
|
+
{
|
|
3126
|
+
headers: { "Content-Type": "application/json" }
|
|
3127
|
+
},
|
|
3128
|
+
service
|
|
3129
|
+
);
|
|
3112
3130
|
},
|
|
3113
3131
|
[env]
|
|
3114
3132
|
);
|
|
@@ -3116,7 +3134,8 @@ function useActionService() {
|
|
|
3116
3134
|
async ({
|
|
3117
3135
|
model,
|
|
3118
3136
|
id,
|
|
3119
|
-
context
|
|
3137
|
+
context,
|
|
3138
|
+
service
|
|
3120
3139
|
}) => {
|
|
3121
3140
|
const jsonData = {
|
|
3122
3141
|
model,
|
|
@@ -3124,9 +3143,14 @@ function useActionService() {
|
|
|
3124
3143
|
ids: id,
|
|
3125
3144
|
with_context: context
|
|
3126
3145
|
};
|
|
3127
|
-
return env.requests.post(
|
|
3128
|
-
|
|
3129
|
-
|
|
3146
|
+
return env.requests.post(
|
|
3147
|
+
"/call" /* CALL_PATH */,
|
|
3148
|
+
jsonData,
|
|
3149
|
+
{
|
|
3150
|
+
headers: { "Content-Type": "application/json" }
|
|
3151
|
+
},
|
|
3152
|
+
service
|
|
3153
|
+
);
|
|
3130
3154
|
},
|
|
3131
3155
|
[env]
|
|
3132
3156
|
);
|
|
@@ -3169,15 +3193,21 @@ function useActionService() {
|
|
|
3169
3193
|
const runAction = (0, import_react6.useCallback)(
|
|
3170
3194
|
async ({
|
|
3171
3195
|
idAction,
|
|
3172
|
-
context
|
|
3196
|
+
context,
|
|
3197
|
+
service
|
|
3173
3198
|
}) => {
|
|
3174
3199
|
const jsonData = {
|
|
3175
3200
|
action_id: idAction,
|
|
3176
3201
|
with_context: { ...context }
|
|
3177
3202
|
};
|
|
3178
|
-
return env.requests.post(
|
|
3179
|
-
|
|
3180
|
-
|
|
3203
|
+
return env.requests.post(
|
|
3204
|
+
"/run_action" /* RUN_ACTION_PATH */,
|
|
3205
|
+
jsonData,
|
|
3206
|
+
{
|
|
3207
|
+
headers: { "Content-Type": "application/json" }
|
|
3208
|
+
},
|
|
3209
|
+
service
|
|
3210
|
+
);
|
|
3181
3211
|
},
|
|
3182
3212
|
[env]
|
|
3183
3213
|
);
|
|
@@ -3458,11 +3488,7 @@ function useExcelService() {
|
|
|
3458
3488
|
const { env } = useEnv();
|
|
3459
3489
|
const uploadFile = (0, import_react9.useCallback)(
|
|
3460
3490
|
async ({ formData }) => {
|
|
3461
|
-
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData
|
|
3462
|
-
headers: {
|
|
3463
|
-
"Content-Type": "multipart/form-data"
|
|
3464
|
-
}
|
|
3465
|
-
});
|
|
3491
|
+
return env.requests.post("/upload/file" /* UPLOAD_FILE_PATH */, formData);
|
|
3466
3492
|
},
|
|
3467
3493
|
[env]
|
|
3468
3494
|
);
|
|
@@ -3706,12 +3732,8 @@ function useFormService() {
|
|
|
3706
3732
|
[env]
|
|
3707
3733
|
);
|
|
3708
3734
|
const uploadImage = (0, import_react10.useCallback)(
|
|
3709
|
-
async ({
|
|
3710
|
-
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */,
|
|
3711
|
-
headers: {
|
|
3712
|
-
"Content-Type": "multipart/form-data"
|
|
3713
|
-
}
|
|
3714
|
-
});
|
|
3735
|
+
async ({ formData }) => {
|
|
3736
|
+
return env.requests.post("/mail/attachment/upload" /* UPLOAD_IMAGE */, formData);
|
|
3715
3737
|
},
|
|
3716
3738
|
[env]
|
|
3717
3739
|
);
|
|
@@ -3900,7 +3922,7 @@ function useModelService() {
|
|
|
3900
3922
|
});
|
|
3901
3923
|
}, [env]);
|
|
3902
3924
|
const getAll = (0, import_react12.useCallback)(
|
|
3903
|
-
async ({ data }) => {
|
|
3925
|
+
async ({ data, service }) => {
|
|
3904
3926
|
const jsonReadGroup = data.type == "calendar" ? { fields: data?.fields } : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
|
|
3905
3927
|
fields: data.fields,
|
|
3906
3928
|
groupby: data.groupby
|
|
@@ -3921,11 +3943,16 @@ function useModelService() {
|
|
|
3921
3943
|
...jsonReadGroup
|
|
3922
3944
|
}
|
|
3923
3945
|
};
|
|
3924
|
-
return env.requests.post(
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3946
|
+
return env.requests.post(
|
|
3947
|
+
"/call" /* CALL_PATH */,
|
|
3948
|
+
jsonData,
|
|
3949
|
+
{
|
|
3950
|
+
headers: {
|
|
3951
|
+
"Content-Type": "application/json"
|
|
3952
|
+
}
|
|
3953
|
+
},
|
|
3954
|
+
service
|
|
3955
|
+
);
|
|
3929
3956
|
},
|
|
3930
3957
|
[env]
|
|
3931
3958
|
);
|
|
@@ -3993,7 +4020,13 @@ function useModelService() {
|
|
|
3993
4020
|
[env]
|
|
3994
4021
|
);
|
|
3995
4022
|
const getDetail = (0, import_react12.useCallback)(
|
|
3996
|
-
async ({
|
|
4023
|
+
async ({
|
|
4024
|
+
ids = [],
|
|
4025
|
+
model,
|
|
4026
|
+
specification,
|
|
4027
|
+
context,
|
|
4028
|
+
service
|
|
4029
|
+
}) => {
|
|
3997
4030
|
const jsonData = {
|
|
3998
4031
|
model,
|
|
3999
4032
|
method: "web_read" /* WEB_READ */,
|
|
@@ -4003,11 +4036,16 @@ function useModelService() {
|
|
|
4003
4036
|
specification
|
|
4004
4037
|
}
|
|
4005
4038
|
};
|
|
4006
|
-
return env.requests.post(
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4039
|
+
return env.requests.post(
|
|
4040
|
+
"/call" /* CALL_PATH */,
|
|
4041
|
+
jsonData,
|
|
4042
|
+
{
|
|
4043
|
+
headers: {
|
|
4044
|
+
"Content-Type": "application/json"
|
|
4045
|
+
}
|
|
4046
|
+
},
|
|
4047
|
+
service
|
|
4048
|
+
);
|
|
4011
4049
|
},
|
|
4012
4050
|
[env]
|
|
4013
4051
|
);
|
|
@@ -4018,7 +4056,8 @@ function useModelService() {
|
|
|
4018
4056
|
data = {},
|
|
4019
4057
|
specification = {},
|
|
4020
4058
|
context = {},
|
|
4021
|
-
path
|
|
4059
|
+
path,
|
|
4060
|
+
service
|
|
4022
4061
|
}) => {
|
|
4023
4062
|
const jsonData = {
|
|
4024
4063
|
model,
|
|
@@ -4030,26 +4069,36 @@ function useModelService() {
|
|
|
4030
4069
|
specification
|
|
4031
4070
|
}
|
|
4032
4071
|
};
|
|
4033
|
-
return env.requests.post(
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4072
|
+
return env.requests.post(
|
|
4073
|
+
path ?? "/call" /* CALL_PATH */,
|
|
4074
|
+
jsonData,
|
|
4075
|
+
{
|
|
4076
|
+
headers: {
|
|
4077
|
+
"Content-Type": "application/json"
|
|
4078
|
+
}
|
|
4079
|
+
},
|
|
4080
|
+
service
|
|
4081
|
+
);
|
|
4038
4082
|
},
|
|
4039
4083
|
[env]
|
|
4040
4084
|
);
|
|
4041
4085
|
const deleteApi = (0, import_react12.useCallback)(
|
|
4042
|
-
async ({ ids = [], model }) => {
|
|
4086
|
+
async ({ ids = [], model, service }) => {
|
|
4043
4087
|
const jsonData = {
|
|
4044
4088
|
model,
|
|
4045
4089
|
method: "unlink" /* UNLINK */,
|
|
4046
4090
|
ids
|
|
4047
4091
|
};
|
|
4048
|
-
return env.requests.post(
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4092
|
+
return env.requests.post(
|
|
4093
|
+
"/call" /* CALL_PATH */,
|
|
4094
|
+
jsonData,
|
|
4095
|
+
{
|
|
4096
|
+
headers: {
|
|
4097
|
+
"Content-Type": "application/json"
|
|
4098
|
+
}
|
|
4099
|
+
},
|
|
4100
|
+
service
|
|
4101
|
+
);
|
|
4053
4102
|
},
|
|
4054
4103
|
[env]
|
|
4055
4104
|
);
|
|
@@ -4060,7 +4109,8 @@ function useModelService() {
|
|
|
4060
4109
|
object,
|
|
4061
4110
|
specification,
|
|
4062
4111
|
context,
|
|
4063
|
-
fieldChange
|
|
4112
|
+
fieldChange,
|
|
4113
|
+
service
|
|
4064
4114
|
}) => {
|
|
4065
4115
|
const jsonData = {
|
|
4066
4116
|
model,
|
|
@@ -4073,11 +4123,16 @@ function useModelService() {
|
|
|
4073
4123
|
specification
|
|
4074
4124
|
]
|
|
4075
4125
|
};
|
|
4076
|
-
return env.requests.post(
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4126
|
+
return env.requests.post(
|
|
4127
|
+
"/call" /* CALL_PATH */,
|
|
4128
|
+
jsonData,
|
|
4129
|
+
{
|
|
4130
|
+
headers: {
|
|
4131
|
+
"Content-Type": "application/json"
|
|
4132
|
+
}
|
|
4133
|
+
},
|
|
4134
|
+
service
|
|
4135
|
+
);
|
|
4081
4136
|
},
|
|
4082
4137
|
[env]
|
|
4083
4138
|
);
|
|
@@ -4251,7 +4306,8 @@ function useViewService() {
|
|
|
4251
4306
|
views,
|
|
4252
4307
|
context = {},
|
|
4253
4308
|
options = {},
|
|
4254
|
-
aid
|
|
4309
|
+
aid,
|
|
4310
|
+
service
|
|
4255
4311
|
}) => {
|
|
4256
4312
|
const defaultOptions = {
|
|
4257
4313
|
load_filters: true,
|
|
@@ -4267,110 +4323,28 @@ function useViewService() {
|
|
|
4267
4323
|
},
|
|
4268
4324
|
with_context: context
|
|
4269
4325
|
};
|
|
4270
|
-
return env?.requests?.post(
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4274
|
-
|
|
4326
|
+
return env?.requests?.post(
|
|
4327
|
+
"/call" /* CALL_PATH */,
|
|
4328
|
+
jsonDataView,
|
|
4329
|
+
{
|
|
4330
|
+
headers: {
|
|
4331
|
+
"Content-Type": "application/json"
|
|
4332
|
+
}
|
|
4333
|
+
},
|
|
4334
|
+
service
|
|
4335
|
+
);
|
|
4275
4336
|
},
|
|
4276
4337
|
[env]
|
|
4277
4338
|
);
|
|
4278
4339
|
const getMenu = (0, import_react14.useCallback)(
|
|
4279
|
-
async (context) => {
|
|
4340
|
+
async (context, specification) => {
|
|
4280
4341
|
const jsonData = {
|
|
4281
4342
|
model: "ir.ui.menu" /* MENU */,
|
|
4282
4343
|
method: "web_search_read" /* WEB_SEARCH_READ */,
|
|
4283
4344
|
ids: [],
|
|
4284
4345
|
with_context: context,
|
|
4285
4346
|
kwargs: {
|
|
4286
|
-
specification
|
|
4287
|
-
active: {},
|
|
4288
|
-
name: {},
|
|
4289
|
-
is_display: {},
|
|
4290
|
-
sequence: {},
|
|
4291
|
-
complete_name: {},
|
|
4292
|
-
action: {
|
|
4293
|
-
fields: {
|
|
4294
|
-
display_name: {},
|
|
4295
|
-
type: {},
|
|
4296
|
-
binding_view_types: {}
|
|
4297
|
-
}
|
|
4298
|
-
},
|
|
4299
|
-
url_icon: {},
|
|
4300
|
-
web_icon: {},
|
|
4301
|
-
web_icon_data: {},
|
|
4302
|
-
groups_id: {
|
|
4303
|
-
fields: {
|
|
4304
|
-
full_name: {}
|
|
4305
|
-
},
|
|
4306
|
-
limit: 40,
|
|
4307
|
-
order: ""
|
|
4308
|
-
},
|
|
4309
|
-
display_name: {},
|
|
4310
|
-
child_id: {
|
|
4311
|
-
fields: {
|
|
4312
|
-
active: {},
|
|
4313
|
-
name: {},
|
|
4314
|
-
is_display: {},
|
|
4315
|
-
sequence: {},
|
|
4316
|
-
complete_name: {},
|
|
4317
|
-
action: {
|
|
4318
|
-
fields: {
|
|
4319
|
-
display_name: {},
|
|
4320
|
-
type: {},
|
|
4321
|
-
binding_view_types: {}
|
|
4322
|
-
}
|
|
4323
|
-
},
|
|
4324
|
-
url_icon: {},
|
|
4325
|
-
web_icon: {},
|
|
4326
|
-
web_icon_data: {},
|
|
4327
|
-
groups_id: {
|
|
4328
|
-
fields: {
|
|
4329
|
-
full_name: {}
|
|
4330
|
-
},
|
|
4331
|
-
limit: 40,
|
|
4332
|
-
order: ""
|
|
4333
|
-
},
|
|
4334
|
-
display_name: {},
|
|
4335
|
-
child_id: {
|
|
4336
|
-
fields: {
|
|
4337
|
-
active: {},
|
|
4338
|
-
name: {},
|
|
4339
|
-
is_display: {},
|
|
4340
|
-
sequence: {},
|
|
4341
|
-
complete_name: {},
|
|
4342
|
-
action: {
|
|
4343
|
-
fields: {
|
|
4344
|
-
display_name: {},
|
|
4345
|
-
type: {},
|
|
4346
|
-
binding_view_types: {}
|
|
4347
|
-
}
|
|
4348
|
-
},
|
|
4349
|
-
url_icon: {},
|
|
4350
|
-
web_icon: {},
|
|
4351
|
-
web_icon_data: {},
|
|
4352
|
-
groups_id: {
|
|
4353
|
-
fields: {
|
|
4354
|
-
full_name: {}
|
|
4355
|
-
},
|
|
4356
|
-
limit: 40,
|
|
4357
|
-
order: ""
|
|
4358
|
-
},
|
|
4359
|
-
display_name: {},
|
|
4360
|
-
child_id: {
|
|
4361
|
-
fields: {},
|
|
4362
|
-
limit: 40,
|
|
4363
|
-
order: ""
|
|
4364
|
-
}
|
|
4365
|
-
},
|
|
4366
|
-
limit: 40,
|
|
4367
|
-
order: ""
|
|
4368
|
-
}
|
|
4369
|
-
},
|
|
4370
|
-
limit: 40,
|
|
4371
|
-
order: ""
|
|
4372
|
-
}
|
|
4373
|
-
},
|
|
4347
|
+
specification,
|
|
4374
4348
|
domain: [
|
|
4375
4349
|
"&",
|
|
4376
4350
|
["is_display", "=", true],
|
|
@@ -4441,7 +4415,7 @@ function useViewService() {
|
|
|
4441
4415
|
[env]
|
|
4442
4416
|
);
|
|
4443
4417
|
const getSelectionItem = (0, import_react14.useCallback)(
|
|
4444
|
-
async ({ data }) => {
|
|
4418
|
+
async ({ data, service }) => {
|
|
4445
4419
|
const jsonData = {
|
|
4446
4420
|
model: data.model,
|
|
4447
4421
|
ids: [],
|
|
@@ -4459,11 +4433,16 @@ function useViewService() {
|
|
|
4459
4433
|
}
|
|
4460
4434
|
}
|
|
4461
4435
|
};
|
|
4462
|
-
return env?.requests.post(
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4436
|
+
return env?.requests.post(
|
|
4437
|
+
"/call" /* CALL_PATH */,
|
|
4438
|
+
jsonData,
|
|
4439
|
+
{
|
|
4440
|
+
headers: {
|
|
4441
|
+
"Content-Type": "application/json"
|
|
4442
|
+
}
|
|
4443
|
+
},
|
|
4444
|
+
service
|
|
4445
|
+
);
|
|
4467
4446
|
},
|
|
4468
4447
|
[env]
|
|
4469
4448
|
);
|