@fctc/interface-logic 4.2.3 → 4.2.5

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/services.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/services/action-service/index.ts
2
- import { useCallback as useCallback3 } from "react";
2
+ import { useCallback as useCallback4 } from "react";
3
3
 
4
4
  // src/constants/api/uri-constant.ts
5
5
  var UriConstants = /* @__PURE__ */ ((UriConstants2) => {
@@ -3102,64 +3102,64 @@ import { useMutation as useMutation64 } from "@tanstack/react-query";
3102
3102
  // src/hooks/view/use-get-product-image.ts
3103
3103
  import { useMutation as useMutation65 } from "@tanstack/react-query";
3104
3104
 
3105
- // src/hooks/view/use-add-entity.ts
3106
- import { useMutation as useMutation66 } from "@tanstack/react-query";
3107
-
3108
3105
  // src/hooks/view/use-check-payment.ts
3109
- import { useMutation as useMutation67 } from "@tanstack/react-query";
3106
+ import { useMutation as useMutation66 } from "@tanstack/react-query";
3110
3107
 
3111
3108
  // src/hooks/view/use-handle-close-session.ts
3112
- import { useMutation as useMutation68 } from "@tanstack/react-query";
3109
+ import { useMutation as useMutation67 } from "@tanstack/react-query";
3113
3110
 
3114
3111
  // src/hooks/view/use-handle-closing-detail-session.ts
3115
- import { useMutation as useMutation69 } from "@tanstack/react-query";
3112
+ import { useMutation as useMutation68 } from "@tanstack/react-query";
3116
3113
 
3117
3114
  // src/hooks/view/use-create-pos-config.ts
3118
- import { useMutation as useMutation70 } from "@tanstack/react-query";
3115
+ import { useMutation as useMutation69 } from "@tanstack/react-query";
3119
3116
 
3120
3117
  // src/hooks/view/use-search-journal.ts
3121
- import { useMutation as useMutation71 } from "@tanstack/react-query";
3118
+ import { useMutation as useMutation70 } from "@tanstack/react-query";
3122
3119
 
3123
3120
  // src/hooks/view/useGetPreparaionDisplayData.ts
3124
- import { useMutation as useMutation72 } from "@tanstack/react-query";
3121
+ import { useMutation as useMutation71 } from "@tanstack/react-query";
3125
3122
 
3126
3123
  // src/hooks/view/useChangeOrderPreparaionState.ts
3127
- import { useMutation as useMutation73 } from "@tanstack/react-query";
3124
+ import { useMutation as useMutation72 } from "@tanstack/react-query";
3128
3125
 
3129
3126
  // src/hooks/view/use-update-order-status.ts
3130
- import { useMutation as useMutation74 } from "@tanstack/react-query";
3127
+ import { useMutation as useMutation73 } from "@tanstack/react-query";
3131
3128
 
3132
3129
  // src/hooks/view/use-process-order.ts
3133
- import { useMutation as useMutation75 } from "@tanstack/react-query";
3130
+ import { useMutation as useMutation74 } from "@tanstack/react-query";
3134
3131
 
3135
3132
  // src/hooks/view/use-generate-payment-qr-info.ts
3136
- import { useMutation as useMutation76 } from "@tanstack/react-query";
3133
+ import { useMutation as useMutation75 } from "@tanstack/react-query";
3137
3134
 
3138
3135
  // src/hooks/view/use-save-pin-code.ts
3139
- import { useMutation as useMutation77 } from "@tanstack/react-query";
3136
+ import { useMutation as useMutation76 } from "@tanstack/react-query";
3140
3137
 
3141
3138
  // src/hooks/view/use-get-pin-code.ts
3142
- import { useMutation as useMutation78 } from "@tanstack/react-query";
3139
+ import { useMutation as useMutation77 } from "@tanstack/react-query";
3143
3140
 
3144
3141
  // src/hooks/view/use-get-notifications.ts
3145
3142
  import { useQuery as useQuery23 } from "@tanstack/react-query";
3146
3143
 
3147
3144
  // src/hooks/view/use-get-version.ts
3148
- import { useMutation as useMutation79 } from "@tanstack/react-query";
3145
+ import { useMutation as useMutation78 } from "@tanstack/react-query";
3149
3146
 
3150
3147
  // src/hooks/view/use-create-e-invoice.ts
3151
- import { useMutation as useMutation80 } from "@tanstack/react-query";
3148
+ import { useMutation as useMutation79 } from "@tanstack/react-query";
3152
3149
 
3153
3150
  // src/hooks/view/use-get-current-user.ts
3154
- import { useMutation as useMutation81 } from "@tanstack/react-query";
3151
+ import { useMutation as useMutation80 } from "@tanstack/react-query";
3155
3152
 
3156
3153
  // src/hooks/view/use-get-ward.ts
3157
- import { useMutation as useMutation82 } from "@tanstack/react-query";
3154
+ import { useMutation as useMutation81 } from "@tanstack/react-query";
3158
3155
 
3159
3156
  // src/hooks/view/use-get-city.ts
3160
- import { useMutation as useMutation83 } from "@tanstack/react-query";
3157
+ import { useMutation as useMutation82 } from "@tanstack/react-query";
3161
3158
 
3162
3159
  // src/hooks/view/use-get-country.ts
3160
+ import { useMutation as useMutation83 } from "@tanstack/react-query";
3161
+
3162
+ // src/hooks/view/use-get-partner-title.ts
3163
3163
  import { useMutation as useMutation84 } from "@tanstack/react-query";
3164
3164
 
3165
3165
  // src/hooks/chart/use-read-group.ts
@@ -3168,6 +3168,12 @@ import { useQuery as useQuery24 } from "@tanstack/react-query";
3168
3168
  // src/hooks/chart/use-get-data-chart.ts
3169
3169
  import { useQuery as useQuery25 } from "@tanstack/react-query";
3170
3170
 
3171
+ // src/hooks/pos/use-add-entity.ts
3172
+ import { useMutation as useMutation85 } from "@tanstack/react-query";
3173
+
3174
+ // src/services/pos-service/add-entity.ts
3175
+ import { useCallback as useCallback3 } from "react";
3176
+
3171
3177
  // src/provider/service-provider.tsx
3172
3178
  import { jsx as jsx6 } from "react/jsx-runtime";
3173
3179
  var ServiceContext = createContext2(null);
@@ -3179,7 +3185,7 @@ import { Fragment as Fragment2, jsx as jsx7 } from "react/jsx-runtime";
3179
3185
  // src/services/action-service/index.ts
3180
3186
  function useActionService() {
3181
3187
  const { env } = useEnv();
3182
- const loadAction = useCallback3(
3188
+ const loadAction = useCallback4(
3183
3189
  async ({
3184
3190
  idAction,
3185
3191
  context,
@@ -3203,7 +3209,7 @@ function useActionService() {
3203
3209
  },
3204
3210
  [env]
3205
3211
  );
3206
- const callButton = useCallback3(
3212
+ const callButton = useCallback4(
3207
3213
  async ({
3208
3214
  model,
3209
3215
  ids = [],
@@ -3237,7 +3243,7 @@ function useActionService() {
3237
3243
  },
3238
3244
  [env]
3239
3245
  );
3240
- const removeRows = useCallback3(
3246
+ const removeRows = useCallback4(
3241
3247
  async ({
3242
3248
  model,
3243
3249
  ids,
@@ -3263,7 +3269,7 @@ function useActionService() {
3263
3269
  },
3264
3270
  [env]
3265
3271
  );
3266
- const duplicateRecord = useCallback3(
3272
+ const duplicateRecord = useCallback4(
3267
3273
  async ({
3268
3274
  model,
3269
3275
  id,
@@ -3289,7 +3295,7 @@ function useActionService() {
3289
3295
  },
3290
3296
  [env]
3291
3297
  );
3292
- const getPrintReportName = useCallback3(
3298
+ const getPrintReportName = useCallback4(
3293
3299
  async ({ id }) => {
3294
3300
  const jsonData = {
3295
3301
  model: "ir.actions.report",
@@ -3307,7 +3313,7 @@ function useActionService() {
3307
3313
  },
3308
3314
  [env]
3309
3315
  );
3310
- const print = useCallback3(
3316
+ const print = useCallback4(
3311
3317
  async ({ id, report, db }) => {
3312
3318
  const jsonData = {
3313
3319
  report,
@@ -3325,7 +3331,7 @@ function useActionService() {
3325
3331
  },
3326
3332
  [env]
3327
3333
  );
3328
- const runAction = useCallback3(
3334
+ const runAction = useCallback4(
3329
3335
  async ({
3330
3336
  idAction,
3331
3337
  context,
@@ -3352,7 +3358,7 @@ function useActionService() {
3352
3358
  },
3353
3359
  [env]
3354
3360
  );
3355
- const generateSerialNumber = useCallback3(
3361
+ const generateSerialNumber = useCallback4(
3356
3362
  async ({
3357
3363
  kwargs,
3358
3364
  context,
@@ -3390,10 +3396,10 @@ function useActionService() {
3390
3396
  }
3391
3397
 
3392
3398
  // src/services/auth-service/index.ts
3393
- import { useCallback as useCallback4 } from "react";
3399
+ import { useCallback as useCallback5 } from "react";
3394
3400
  function useAuthService() {
3395
3401
  const { env } = useEnv();
3396
- const login = useCallback4(
3402
+ const login = useCallback5(
3397
3403
  async (body) => {
3398
3404
  const payload = Object.fromEntries(
3399
3405
  Object.entries({
@@ -3418,7 +3424,7 @@ function useAuthService() {
3418
3424
  },
3419
3425
  [env]
3420
3426
  );
3421
- const forgotPassword = useCallback4(
3427
+ const forgotPassword = useCallback5(
3422
3428
  async (email) => {
3423
3429
  const bodyData = {
3424
3430
  login: email,
@@ -3432,7 +3438,7 @@ function useAuthService() {
3432
3438
  },
3433
3439
  [env]
3434
3440
  );
3435
- const forgotPasswordSSO = useCallback4(
3441
+ const forgotPasswordSSO = useCallback5(
3436
3442
  async ({
3437
3443
  email,
3438
3444
  with_context,
@@ -3455,7 +3461,7 @@ function useAuthService() {
3455
3461
  },
3456
3462
  [env]
3457
3463
  );
3458
- const resetPassword = useCallback4(
3464
+ const resetPassword = useCallback5(
3459
3465
  async (data, token) => {
3460
3466
  const bodyData = {
3461
3467
  token,
@@ -3470,7 +3476,7 @@ function useAuthService() {
3470
3476
  },
3471
3477
  [env]
3472
3478
  );
3473
- const resetPasswordSSO = useCallback4(
3479
+ const resetPasswordSSO = useCallback5(
3474
3480
  async ({
3475
3481
  method,
3476
3482
  password,
@@ -3493,7 +3499,7 @@ function useAuthService() {
3493
3499
  },
3494
3500
  [env]
3495
3501
  );
3496
- const updatePassword = useCallback4(
3502
+ const updatePassword = useCallback5(
3497
3503
  async (data, token) => {
3498
3504
  const bodyData = {
3499
3505
  token,
@@ -3508,7 +3514,7 @@ function useAuthService() {
3508
3514
  },
3509
3515
  [env]
3510
3516
  );
3511
- const isValidToken = useCallback4(
3517
+ const isValidToken = useCallback5(
3512
3518
  async (token) => {
3513
3519
  const bodyData = {
3514
3520
  token
@@ -3521,7 +3527,7 @@ function useAuthService() {
3521
3527
  },
3522
3528
  [env]
3523
3529
  );
3524
- const isValidActionToken = useCallback4(
3530
+ const isValidActionToken = useCallback5(
3525
3531
  async (actionToken) => {
3526
3532
  const bodyData = {};
3527
3533
  return env?.requests?.post("/action-token/validate" /* VALIDATE_ACTION_TOKEN */, bodyData, {
@@ -3534,7 +3540,7 @@ function useAuthService() {
3534
3540
  },
3535
3541
  [env]
3536
3542
  );
3537
- const loginSocial = useCallback4(
3543
+ const loginSocial = useCallback5(
3538
3544
  async ({
3539
3545
  db,
3540
3546
  state,
@@ -3552,13 +3558,13 @@ function useAuthService() {
3552
3558
  },
3553
3559
  [env]
3554
3560
  );
3555
- const getProviders = useCallback4(
3561
+ const getProviders = useCallback5(
3556
3562
  async (db) => {
3557
3563
  return env?.requests?.get("/oauth/providers", { params: { db } });
3558
3564
  },
3559
3565
  [env]
3560
3566
  );
3561
- const getAccessByCode = useCallback4(
3567
+ const getAccessByCode = useCallback5(
3562
3568
  async (code) => {
3563
3569
  const data = new URLSearchParams();
3564
3570
  data.append("code", code);
@@ -3578,7 +3584,7 @@ function useAuthService() {
3578
3584
  },
3579
3585
  [env]
3580
3586
  );
3581
- const logout = useCallback4(
3587
+ const logout = useCallback5(
3582
3588
  async (service) => {
3583
3589
  return env?.requests?.post(
3584
3590
  "/logout" /* LOGOUT */,
@@ -3595,7 +3601,7 @@ function useAuthService() {
3595
3601
  },
3596
3602
  [env]
3597
3603
  );
3598
- const getTenantMapping = useCallback4(
3604
+ const getTenantMapping = useCallback5(
3599
3605
  async ({ shortName, service }) => {
3600
3606
  const bodyData = {
3601
3607
  short_name: shortName
@@ -3613,7 +3619,7 @@ function useAuthService() {
3613
3619
  },
3614
3620
  [env]
3615
3621
  );
3616
- const getToken = useCallback4(
3622
+ const getToken = useCallback5(
3617
3623
  async ({
3618
3624
  phone,
3619
3625
  name,
@@ -3657,10 +3663,10 @@ function useAuthService() {
3657
3663
  }
3658
3664
 
3659
3665
  // src/services/company-service/index.ts
3660
- import { useCallback as useCallback5 } from "react";
3666
+ import { useCallback as useCallback6 } from "react";
3661
3667
  function useCompanyService() {
3662
3668
  const { env } = useEnv();
3663
- const getCurrentCompany = useCallback5(
3669
+ const getCurrentCompany = useCallback6(
3664
3670
  async (service, extraHeaders) => {
3665
3671
  return await env.requests.get(
3666
3672
  "/company" /* COMPANY_PATH */,
@@ -3677,7 +3683,7 @@ function useCompanyService() {
3677
3683
  },
3678
3684
  [env]
3679
3685
  );
3680
- const getInfoCompany = useCallback5(
3686
+ const getInfoCompany = useCallback6(
3681
3687
  async (id, service) => {
3682
3688
  const jsonData = {
3683
3689
  ids: [id],
@@ -3713,10 +3719,10 @@ function useCompanyService() {
3713
3719
  }
3714
3720
 
3715
3721
  // src/services/excel-service/index.ts
3716
- import { useCallback as useCallback6 } from "react";
3722
+ import { useCallback as useCallback7 } from "react";
3717
3723
  function useExcelService() {
3718
3724
  const { env } = useEnv();
3719
- const uploadFileExcel = useCallback6(
3725
+ const uploadFileExcel = useCallback7(
3720
3726
  async ({
3721
3727
  formData,
3722
3728
  service,
@@ -3733,7 +3739,7 @@ function useExcelService() {
3733
3739
  },
3734
3740
  [env]
3735
3741
  );
3736
- const uploadIdFile = useCallback6(
3742
+ const uploadIdFile = useCallback7(
3737
3743
  async ({
3738
3744
  formData,
3739
3745
  service,
@@ -3750,7 +3756,7 @@ function useExcelService() {
3750
3756
  },
3751
3757
  [env]
3752
3758
  );
3753
- const parsePreview = useCallback6(
3759
+ const parsePreview = useCallback7(
3754
3760
  async ({
3755
3761
  id,
3756
3762
  selectedSheet,
@@ -3799,7 +3805,7 @@ function useExcelService() {
3799
3805
  },
3800
3806
  [env]
3801
3807
  );
3802
- const executeImport = useCallback6(
3808
+ const executeImport = useCallback7(
3803
3809
  async ({
3804
3810
  columns,
3805
3811
  fields,
@@ -3833,7 +3839,7 @@ function useExcelService() {
3833
3839
  },
3834
3840
  [env]
3835
3841
  );
3836
- const getFileExcel = useCallback6(
3842
+ const getFileExcel = useCallback7(
3837
3843
  async ({
3838
3844
  model,
3839
3845
  service,
@@ -3857,7 +3863,7 @@ function useExcelService() {
3857
3863
  },
3858
3864
  [env]
3859
3865
  );
3860
- const getFieldExport = useCallback6(
3866
+ const getFieldExport = useCallback7(
3861
3867
  async ({
3862
3868
  ids,
3863
3869
  model,
@@ -3897,7 +3903,7 @@ function useExcelService() {
3897
3903
  },
3898
3904
  [env]
3899
3905
  );
3900
- const exportExcel = useCallback6(
3906
+ const exportExcel = useCallback7(
3901
3907
  async ({
3902
3908
  model,
3903
3909
  domain,
@@ -3945,10 +3951,10 @@ function useExcelService() {
3945
3951
  }
3946
3952
 
3947
3953
  // src/services/form-service/index.ts
3948
- import { useCallback as useCallback7 } from "react";
3954
+ import { useCallback as useCallback8 } from "react";
3949
3955
  function useFormService() {
3950
3956
  const { env } = useEnv();
3951
- const getComment = useCallback7(
3957
+ const getComment = useCallback8(
3952
3958
  async ({ data }) => {
3953
3959
  const jsonData = {
3954
3960
  thread_id: data.thread_id,
@@ -3966,7 +3972,7 @@ function useFormService() {
3966
3972
  },
3967
3973
  [env]
3968
3974
  );
3969
- const getThreadData = useCallback7(
3975
+ const getThreadData = useCallback8(
3970
3976
  async ({
3971
3977
  data,
3972
3978
  xNode,
@@ -3993,7 +3999,7 @@ function useFormService() {
3993
3999
  },
3994
4000
  [env]
3995
4001
  );
3996
- const getThreadMessages = useCallback7(
4002
+ const getThreadMessages = useCallback8(
3997
4003
  async ({
3998
4004
  data,
3999
4005
  xNode,
@@ -4019,7 +4025,7 @@ function useFormService() {
4019
4025
  },
4020
4026
  [env]
4021
4027
  );
4022
- const sentComment = useCallback7(
4028
+ const sentComment = useCallback8(
4023
4029
  async ({ data }) => {
4024
4030
  const jsonData = {
4025
4031
  context: {
@@ -4047,7 +4053,7 @@ function useFormService() {
4047
4053
  },
4048
4054
  [env]
4049
4055
  );
4050
- const deleteComment = useCallback7(
4056
+ const deleteComment = useCallback8(
4051
4057
  async ({ data }) => {
4052
4058
  const jsonData = {
4053
4059
  attachment_ids: [],
@@ -4063,7 +4069,7 @@ function useFormService() {
4063
4069
  },
4064
4070
  [env]
4065
4071
  );
4066
- const getImage = useCallback7(
4072
+ const getImage = useCallback8(
4067
4073
  async ({ data }) => {
4068
4074
  return env.requests.get(
4069
4075
  `${"/web/image" /* IMAGE_PATH */}?filename=${data.filename}&unique=${data.checksum}&width=1920&height=300`,
@@ -4076,7 +4082,7 @@ function useFormService() {
4076
4082
  },
4077
4083
  [env]
4078
4084
  );
4079
- const uploadImage = useCallback7(
4085
+ const uploadImage = useCallback8(
4080
4086
  async ({
4081
4087
  formData,
4082
4088
  service,
@@ -4095,7 +4101,7 @@ function useFormService() {
4095
4101
  },
4096
4102
  [env]
4097
4103
  );
4098
- const uploadFile = useCallback7(
4104
+ const uploadFile = useCallback8(
4099
4105
  async ({
4100
4106
  formData,
4101
4107
  service,
@@ -4115,7 +4121,7 @@ function useFormService() {
4115
4121
  },
4116
4122
  [env]
4117
4123
  );
4118
- const getFormView = useCallback7(
4124
+ const getFormView = useCallback8(
4119
4125
  async ({ data }) => {
4120
4126
  const jsonData = {
4121
4127
  model: data.model,
@@ -4131,7 +4137,7 @@ function useFormService() {
4131
4137
  },
4132
4138
  [env]
4133
4139
  );
4134
- const changeStatus = useCallback7(
4140
+ const changeStatus = useCallback8(
4135
4141
  async ({ data }) => {
4136
4142
  const vals = {
4137
4143
  [data.name]: data.stage_id
@@ -4160,7 +4166,7 @@ function useFormService() {
4160
4166
  },
4161
4167
  [env]
4162
4168
  );
4163
- const getExternalTab = useCallback7(
4169
+ const getExternalTab = useCallback8(
4164
4170
  async ({ method, context, service, xNode }) => {
4165
4171
  return env?.requests?.post(
4166
4172
  "/call" /* CALL_PATH */,
@@ -4195,10 +4201,10 @@ function useFormService() {
4195
4201
  }
4196
4202
 
4197
4203
  // src/services/kanban-service/index.ts
4198
- import { useCallback as useCallback8 } from "react";
4204
+ import { useCallback as useCallback9 } from "react";
4199
4205
  function useKanbanService() {
4200
4206
  const { env } = useEnv();
4201
- const getGroups = useCallback8(
4207
+ const getGroups = useCallback9(
4202
4208
  async ({ model, width_context }) => {
4203
4209
  const jsonData = {
4204
4210
  model,
@@ -4218,7 +4224,7 @@ function useKanbanService() {
4218
4224
  },
4219
4225
  [env]
4220
4226
  );
4221
- const getProgressBar = useCallback8(
4227
+ const getProgressBar = useCallback9(
4222
4228
  async ({ field, color, model, width_context }) => {
4223
4229
  const jsonData = {
4224
4230
  model,
@@ -4248,10 +4254,10 @@ function useKanbanService() {
4248
4254
  }
4249
4255
 
4250
4256
  // src/services/model-service/index.ts
4251
- import { useCallback as useCallback9 } from "react";
4257
+ import { useCallback as useCallback10 } from "react";
4252
4258
  function useModelService() {
4253
4259
  const { env } = useEnv();
4254
- const getListMyBankAccount = useCallback9(
4260
+ const getListMyBankAccount = useCallback10(
4255
4261
  async ({
4256
4262
  domain,
4257
4263
  spectification,
@@ -4275,7 +4281,7 @@ function useModelService() {
4275
4281
  },
4276
4282
  [env]
4277
4283
  );
4278
- const getCurrency = useCallback9(async () => {
4284
+ const getCurrency = useCallback10(async () => {
4279
4285
  const jsonData = {
4280
4286
  model: "res.currency",
4281
4287
  method: "web_search_read",
@@ -4295,7 +4301,7 @@ function useModelService() {
4295
4301
  }
4296
4302
  });
4297
4303
  }, [env]);
4298
- const getConversionRate = useCallback9(async () => {
4304
+ const getConversionRate = useCallback10(async () => {
4299
4305
  const jsonData = {
4300
4306
  model: "res.currency",
4301
4307
  method: "web_search_read",
@@ -4321,7 +4327,7 @@ function useModelService() {
4321
4327
  }
4322
4328
  });
4323
4329
  }, [env]);
4324
- const getAll = useCallback9(
4330
+ const getAll = useCallback10(
4325
4331
  async ({
4326
4332
  data,
4327
4333
  service,
@@ -4363,7 +4369,7 @@ function useModelService() {
4363
4369
  },
4364
4370
  [env]
4365
4371
  );
4366
- const getListCalendar = useCallback9(
4372
+ const getListCalendar = useCallback10(
4367
4373
  async ({ data }) => {
4368
4374
  const jsonReadGroup = data.type == "calendar" ? data?.fields : data.fields && data.fields.length > 0 && data.groupby && data.groupby.length > 0 && data.groupby[0] ? {
4369
4375
  fields: data.fields,
@@ -4394,7 +4400,7 @@ function useModelService() {
4394
4400
  },
4395
4401
  [env]
4396
4402
  );
4397
- const getList = useCallback9(
4403
+ const getList = useCallback10(
4398
4404
  async ({
4399
4405
  model,
4400
4406
  ids = [],
@@ -4426,7 +4432,7 @@ function useModelService() {
4426
4432
  },
4427
4433
  [env]
4428
4434
  );
4429
- const getDetail = useCallback9(
4435
+ const getDetail = useCallback10(
4430
4436
  async ({
4431
4437
  ids = [],
4432
4438
  model,
@@ -4458,7 +4464,7 @@ function useModelService() {
4458
4464
  },
4459
4465
  [env]
4460
4466
  );
4461
- const save = useCallback9(
4467
+ const save = useCallback10(
4462
4468
  async ({
4463
4469
  model,
4464
4470
  ids = [],
@@ -4493,7 +4499,7 @@ function useModelService() {
4493
4499
  },
4494
4500
  [env]
4495
4501
  );
4496
- const deleteApi = useCallback9(
4502
+ const deleteApi = useCallback10(
4497
4503
  async ({ ids = [], model, service }) => {
4498
4504
  const jsonData = {
4499
4505
  model,
@@ -4513,7 +4519,7 @@ function useModelService() {
4513
4519
  },
4514
4520
  [env]
4515
4521
  );
4516
- const onChange = useCallback9(
4522
+ const onChange = useCallback10(
4517
4523
  async ({
4518
4524
  ids = [],
4519
4525
  model,
@@ -4549,7 +4555,7 @@ function useModelService() {
4549
4555
  },
4550
4556
  [env]
4551
4557
  );
4552
- const getListFieldsOnchange = useCallback9(
4558
+ const getListFieldsOnchange = useCallback10(
4553
4559
  async ({
4554
4560
  model,
4555
4561
  service,
@@ -4573,7 +4579,7 @@ function useModelService() {
4573
4579
  },
4574
4580
  [env]
4575
4581
  );
4576
- const parseORMOdoo = useCallback9((data) => {
4582
+ const parseORMOdoo = useCallback10((data) => {
4577
4583
  for (const key in data) {
4578
4584
  if (key === "display_name") {
4579
4585
  delete data[key];
@@ -4586,7 +4592,7 @@ function useModelService() {
4586
4592
  }
4587
4593
  return { ...data };
4588
4594
  }, []);
4589
- const toDataJS = useCallback9(
4595
+ const toDataJS = useCallback10(
4590
4596
  (data, viewData, model) => {
4591
4597
  for (const key in data) {
4592
4598
  if (data[key] === false) {
@@ -4646,10 +4652,10 @@ function useModelService() {
4646
4652
  }
4647
4653
 
4648
4654
  // src/services/user-service/index.ts
4649
- import { useCallback as useCallback10 } from "react";
4655
+ import { useCallback as useCallback11 } from "react";
4650
4656
  function useUserService() {
4651
4657
  const { env } = useEnv();
4652
- const getProfile = useCallback10(
4658
+ const getProfile = useCallback11(
4653
4659
  async (service, path, extraHeaders) => {
4654
4660
  return env?.requests?.get(
4655
4661
  path || "/userinfo" /* PROFILE_PATH */,
@@ -4666,7 +4672,7 @@ function useUserService() {
4666
4672
  },
4667
4673
  [env]
4668
4674
  );
4669
- const getUser = useCallback10(
4675
+ const getUser = useCallback11(
4670
4676
  async ({ context, id }) => {
4671
4677
  const jsonData = {
4672
4678
  model: "res.users",
@@ -4704,7 +4710,7 @@ function useUserService() {
4704
4710
  },
4705
4711
  [env]
4706
4712
  );
4707
- const switchUserLocale = useCallback10(
4713
+ const switchUserLocale = useCallback11(
4708
4714
  async ({ id, values, service }) => {
4709
4715
  const jsonData = {
4710
4716
  model: "res.users",
@@ -4732,10 +4738,10 @@ function useUserService() {
4732
4738
  }
4733
4739
 
4734
4740
  // src/services/view-service/index.ts
4735
- import { useCallback as useCallback11 } from "react";
4741
+ import { useCallback as useCallback12 } from "react";
4736
4742
  function useViewService() {
4737
4743
  const { env } = useEnv();
4738
- const getView = useCallback11(
4744
+ const getView = useCallback12(
4739
4745
  async ({
4740
4746
  model,
4741
4747
  views,
@@ -4775,7 +4781,7 @@ function useViewService() {
4775
4781
  },
4776
4782
  [env]
4777
4783
  );
4778
- const getMenu = useCallback11(
4784
+ const getMenu = useCallback12(
4779
4785
  async (context, specification, domain, service) => {
4780
4786
  const jsonData = {
4781
4787
  model: "ir.ui.menu" /* MENU */,
@@ -4806,7 +4812,7 @@ function useViewService() {
4806
4812
  },
4807
4813
  [env]
4808
4814
  );
4809
- const getActionDetail = useCallback11(
4815
+ const getActionDetail = useCallback12(
4810
4816
  async (aid, context) => {
4811
4817
  const jsonData = {
4812
4818
  model: "ir.actions.act_window" /* WINDOW_ACTION */,
@@ -4836,7 +4842,7 @@ function useViewService() {
4836
4842
  },
4837
4843
  [env]
4838
4844
  );
4839
- const getResequence = useCallback11(
4845
+ const getResequence = useCallback12(
4840
4846
  async ({
4841
4847
  model,
4842
4848
  ids,
@@ -4866,7 +4872,7 @@ function useViewService() {
4866
4872
  },
4867
4873
  [env]
4868
4874
  );
4869
- const getSelectionItem = useCallback11(
4875
+ const getSelectionItem = useCallback12(
4870
4876
  async ({
4871
4877
  data,
4872
4878
  service,
@@ -4903,7 +4909,7 @@ function useViewService() {
4903
4909
  },
4904
4910
  [env]
4905
4911
  );
4906
- const loadMessages = useCallback11(async () => {
4912
+ const loadMessages = useCallback12(async () => {
4907
4913
  return env.requests.post(
4908
4914
  "/load_message_failures" /* LOAD_MESSAGE */,
4909
4915
  {},
@@ -4914,14 +4920,14 @@ function useViewService() {
4914
4920
  }
4915
4921
  );
4916
4922
  }, [env]);
4917
- const getVersion = useCallback11(async () => {
4923
+ const getVersion = useCallback12(async () => {
4918
4924
  return env?.requests?.get("", {
4919
4925
  headers: {
4920
4926
  "Content-Type": "application/json"
4921
4927
  }
4922
4928
  });
4923
4929
  }, [env]);
4924
- const grantAccess = useCallback11(
4930
+ const grantAccess = useCallback12(
4925
4931
  async ({
4926
4932
  redirect_uri,
4927
4933
  state,
@@ -4948,7 +4954,7 @@ function useViewService() {
4948
4954
  },
4949
4955
  [env]
4950
4956
  );
4951
- const removeTotpSetUp = useCallback11(
4957
+ const removeTotpSetUp = useCallback12(
4952
4958
  async ({ method, token }) => {
4953
4959
  const jsonData = {
4954
4960
  method,
@@ -4969,7 +4975,7 @@ function useViewService() {
4969
4975
  },
4970
4976
  [env]
4971
4977
  );
4972
- const requestSetupTotp = useCallback11(
4978
+ const requestSetupTotp = useCallback12(
4973
4979
  async ({ method, token }) => {
4974
4980
  const jsonData = {
4975
4981
  method,
@@ -4988,7 +4994,7 @@ function useViewService() {
4988
4994
  },
4989
4995
  [env]
4990
4996
  );
4991
- const settingsWebRead2fa = useCallback11(
4997
+ const settingsWebRead2fa = useCallback12(
4992
4998
  async ({
4993
4999
  method,
4994
5000
  model,
@@ -5016,7 +5022,7 @@ function useViewService() {
5016
5022
  },
5017
5023
  [env]
5018
5024
  );
5019
- const signInSSO = useCallback11(
5025
+ const signInSSO = useCallback12(
5020
5026
  async ({
5021
5027
  redirect_uri,
5022
5028
  state,
@@ -5048,7 +5054,7 @@ function useViewService() {
5048
5054
  },
5049
5055
  [env]
5050
5056
  );
5051
- const verify2FA = useCallback11(
5057
+ const verify2FA = useCallback12(
5052
5058
  ({
5053
5059
  method,
5054
5060
  with_context,
@@ -5081,7 +5087,7 @@ function useViewService() {
5081
5087
  },
5082
5088
  [env]
5083
5089
  );
5084
- const get2FAMethods = useCallback11(
5090
+ const get2FAMethods = useCallback12(
5085
5091
  ({ method, with_context }) => {
5086
5092
  const jsonData = {
5087
5093
  method,
@@ -5100,7 +5106,7 @@ function useViewService() {
5100
5106
  },
5101
5107
  [env]
5102
5108
  );
5103
- const verifyTotp = useCallback11(
5109
+ const verifyTotp = useCallback12(
5104
5110
  ({
5105
5111
  method,
5106
5112
  action_token,
@@ -5125,7 +5131,7 @@ function useViewService() {
5125
5131
  },
5126
5132
  [env]
5127
5133
  );
5128
- const getASession = useCallback11(
5134
+ const getASession = useCallback12(
5129
5135
  async ({
5130
5136
  model,
5131
5137
  args,
@@ -5168,7 +5174,7 @@ function useViewService() {
5168
5174
  },
5169
5175
  [env]
5170
5176
  );
5171
- const updateClosedSession = useCallback11(
5177
+ const updateClosedSession = useCallback12(
5172
5178
  ({
5173
5179
  model,
5174
5180
  domain,
@@ -5195,7 +5201,7 @@ function useViewService() {
5195
5201
  },
5196
5202
  [env]
5197
5203
  );
5198
- const manageSession = useCallback11(
5204
+ const manageSession = useCallback12(
5199
5205
  ({
5200
5206
  model,
5201
5207
  method,
@@ -5226,7 +5232,7 @@ function useViewService() {
5226
5232
  },
5227
5233
  [env]
5228
5234
  );
5229
- const handleClosingSession = useCallback11(
5235
+ const handleClosingSession = useCallback12(
5230
5236
  ({
5231
5237
  model,
5232
5238
  method,
@@ -5255,7 +5261,7 @@ function useViewService() {
5255
5261
  },
5256
5262
  [env]
5257
5263
  );
5258
- const createSession = useCallback11(
5264
+ const createSession = useCallback12(
5259
5265
  ({
5260
5266
  model,
5261
5267
  configId,
@@ -5285,7 +5291,7 @@ function useViewService() {
5285
5291
  },
5286
5292
  [env]
5287
5293
  );
5288
- const getPOS = useCallback11(
5294
+ const getPOS = useCallback12(
5289
5295
  ({
5290
5296
  model,
5291
5297
  args,
@@ -5343,7 +5349,7 @@ function useViewService() {
5343
5349
  },
5344
5350
  [env]
5345
5351
  );
5346
- const createEntity = useCallback11(
5352
+ const createEntity = useCallback12(
5347
5353
  ({
5348
5354
  model,
5349
5355
  args,
@@ -5369,33 +5375,7 @@ function useViewService() {
5369
5375
  },
5370
5376
  [env]
5371
5377
  );
5372
- const addEntity = useCallback11(
5373
- ({
5374
- model,
5375
- values,
5376
- xNode,
5377
- service,
5378
- isCreateEndpoint = false
5379
- }) => {
5380
- const jsonData = {
5381
- model,
5382
- values
5383
- };
5384
- return env?.requests.post(
5385
- isCreateEndpoint ? "/create" /* CREATE_PATH */ : "/call" /* CALL_PATH */,
5386
- jsonData,
5387
- {
5388
- headers: {
5389
- "Content-Type": "application/json",
5390
- ...xNode ? { "X-Node": xNode } : {}
5391
- }
5392
- },
5393
- service
5394
- );
5395
- },
5396
- [env]
5397
- );
5398
- const getList = useCallback11(
5378
+ const getList = useCallback12(
5399
5379
  ({
5400
5380
  model,
5401
5381
  domain,
@@ -5429,7 +5409,7 @@ function useViewService() {
5429
5409
  },
5430
5410
  [env]
5431
5411
  );
5432
- const updateEntity = useCallback11(
5412
+ const updateEntity = useCallback12(
5433
5413
  ({
5434
5414
  model,
5435
5415
  domain,
@@ -5457,7 +5437,7 @@ function useViewService() {
5457
5437
  },
5458
5438
  [env]
5459
5439
  );
5460
- const deleteEntity = useCallback11(
5440
+ const deleteEntity = useCallback12(
5461
5441
  ({
5462
5442
  model,
5463
5443
  ids,
@@ -5484,7 +5464,7 @@ function useViewService() {
5484
5464
  },
5485
5465
  [env]
5486
5466
  );
5487
- const loadDataPosSession = useCallback11(
5467
+ const loadDataPosSession = useCallback12(
5488
5468
  ({
5489
5469
  model,
5490
5470
  ids,
@@ -5522,7 +5502,7 @@ function useViewService() {
5522
5502
  },
5523
5503
  [env]
5524
5504
  );
5525
- const getPreparationDisplayData = useCallback11(
5505
+ const getPreparationDisplayData = useCallback12(
5526
5506
  ({
5527
5507
  ids,
5528
5508
  xNode,
@@ -5549,7 +5529,7 @@ function useViewService() {
5549
5529
  },
5550
5530
  [env]
5551
5531
  );
5552
- const manageOnChange = useCallback11(
5532
+ const manageOnChange = useCallback12(
5553
5533
  ({
5554
5534
  model,
5555
5535
  ids,
@@ -5577,7 +5557,7 @@ function useViewService() {
5577
5557
  },
5578
5558
  [env]
5579
5559
  );
5580
- const getOrderLine = useCallback11(
5560
+ const getOrderLine = useCallback12(
5581
5561
  ({
5582
5562
  model,
5583
5563
  ids,
@@ -5607,7 +5587,7 @@ function useViewService() {
5607
5587
  },
5608
5588
  [env]
5609
5589
  );
5610
- const getProductImage = useCallback11(
5590
+ const getProductImage = useCallback12(
5611
5591
  ({
5612
5592
  model,
5613
5593
  fields,
@@ -5640,7 +5620,7 @@ function useViewService() {
5640
5620
  },
5641
5621
  [env]
5642
5622
  );
5643
- const checkPayment = useCallback11(
5623
+ const checkPayment = useCallback12(
5644
5624
  ({
5645
5625
  model,
5646
5626
  ids,
@@ -5668,7 +5648,7 @@ function useViewService() {
5668
5648
  },
5669
5649
  [env]
5670
5650
  );
5671
- const handleCloseSession = useCallback11(
5651
+ const handleCloseSession = useCallback12(
5672
5652
  ({
5673
5653
  model,
5674
5654
  ids,
@@ -5695,7 +5675,7 @@ function useViewService() {
5695
5675
  },
5696
5676
  [env]
5697
5677
  );
5698
- const handleClosingDetailSession = useCallback11(
5678
+ const handleClosingDetailSession = useCallback12(
5699
5679
  ({
5700
5680
  model,
5701
5681
  ids,
@@ -5724,7 +5704,7 @@ function useViewService() {
5724
5704
  },
5725
5705
  [env]
5726
5706
  );
5727
- const createPosConfig = useCallback11(
5707
+ const createPosConfig = useCallback12(
5728
5708
  ({
5729
5709
  model,
5730
5710
  name,
@@ -5753,7 +5733,7 @@ function useViewService() {
5753
5733
  },
5754
5734
  [env]
5755
5735
  );
5756
- const searchJournal = useCallback11(
5736
+ const searchJournal = useCallback12(
5757
5737
  ({
5758
5738
  model,
5759
5739
  method,
@@ -5782,7 +5762,7 @@ function useViewService() {
5782
5762
  },
5783
5763
  [env]
5784
5764
  );
5785
- const changeOrderPreparaionState = useCallback11(
5765
+ const changeOrderPreparaionState = useCallback12(
5786
5766
  ({
5787
5767
  orderId,
5788
5768
  stageId,
@@ -5813,7 +5793,7 @@ function useViewService() {
5813
5793
  },
5814
5794
  [env]
5815
5795
  );
5816
- const updateOrderStatus = useCallback11(
5796
+ const updateOrderStatus = useCallback12(
5817
5797
  ({
5818
5798
  orderId,
5819
5799
  state,
@@ -5838,7 +5818,7 @@ function useViewService() {
5838
5818
  },
5839
5819
  [env]
5840
5820
  );
5841
- const processOrder = useCallback11(
5821
+ const processOrder = useCallback12(
5842
5822
  ({
5843
5823
  orderId,
5844
5824
  xNode,
@@ -5865,7 +5845,7 @@ function useViewService() {
5865
5845
  },
5866
5846
  [env]
5867
5847
  );
5868
- const generatePaymentQRInfo = useCallback11(
5848
+ const generatePaymentQRInfo = useCallback12(
5869
5849
  ({
5870
5850
  orderId,
5871
5851
  amount,
@@ -5892,7 +5872,7 @@ function useViewService() {
5892
5872
  },
5893
5873
  [env]
5894
5874
  );
5895
- const savePinCode = useCallback11(
5875
+ const savePinCode = useCallback12(
5896
5876
  ({
5897
5877
  serialNumber,
5898
5878
  pinCode,
@@ -5917,7 +5897,7 @@ function useViewService() {
5917
5897
  },
5918
5898
  [env]
5919
5899
  );
5920
- const getPinCode = useCallback11(
5900
+ const getPinCode = useCallback12(
5921
5901
  ({
5922
5902
  serialNumber,
5923
5903
  xNode,
@@ -5940,7 +5920,7 @@ function useViewService() {
5940
5920
  },
5941
5921
  [env]
5942
5922
  );
5943
- const getNotifications = useCallback11(
5923
+ const getNotifications = useCallback12(
5944
5924
  async ({
5945
5925
  service,
5946
5926
  xNode,
@@ -5960,7 +5940,7 @@ function useViewService() {
5960
5940
  },
5961
5941
  [env]
5962
5942
  );
5963
- const createEInvoice = useCallback11(
5943
+ const createEInvoice = useCallback12(
5964
5944
  async ({
5965
5945
  service,
5966
5946
  xNode,
@@ -5989,7 +5969,7 @@ function useViewService() {
5989
5969
  },
5990
5970
  [env]
5991
5971
  );
5992
- const getCurrentUser = useCallback11(
5972
+ const getCurrentUser = useCallback12(
5993
5973
  async ({
5994
5974
  service,
5995
5975
  xNode,
@@ -6013,7 +5993,7 @@ function useViewService() {
6013
5993
  },
6014
5994
  [env]
6015
5995
  );
6016
- const getCountry = useCallback11(
5996
+ const getCountry = useCallback12(
6017
5997
  async ({
6018
5998
  service,
6019
5999
  xNode,
@@ -6040,7 +6020,7 @@ function useViewService() {
6040
6020
  },
6041
6021
  [env]
6042
6022
  );
6043
- const getCity = useCallback11(
6023
+ const getCity = useCallback12(
6044
6024
  async ({
6045
6025
  service,
6046
6026
  xNode,
@@ -6067,7 +6047,7 @@ function useViewService() {
6067
6047
  },
6068
6048
  [env]
6069
6049
  );
6070
- const getWard = useCallback11(
6050
+ const getWard = useCallback12(
6071
6051
  async ({
6072
6052
  service,
6073
6053
  xNode,
@@ -6092,6 +6072,33 @@ function useViewService() {
6092
6072
  },
6093
6073
  [env]
6094
6074
  );
6075
+ const getPartnerTitle = useCallback12(
6076
+ async ({
6077
+ service,
6078
+ xNode,
6079
+ kwargs,
6080
+ withContext
6081
+ }) => {
6082
+ const body = {
6083
+ model: "res.partner.title" /* RES_PARTNER_TITLE */,
6084
+ method: "get_data_select" /* GET_DATA_SELECT */,
6085
+ kwargs,
6086
+ with_context: withContext
6087
+ };
6088
+ return env?.requests?.post(
6089
+ "/call" /* CALL_PATH */,
6090
+ body,
6091
+ {
6092
+ headers: {
6093
+ "Content-Type": "application/json",
6094
+ ...xNode ? { "X-Node": xNode } : {}
6095
+ }
6096
+ },
6097
+ service
6098
+ );
6099
+ },
6100
+ [env]
6101
+ );
6095
6102
  return {
6096
6103
  getView,
6097
6104
  getMenu,
@@ -6122,7 +6129,6 @@ function useViewService() {
6122
6129
  manageOnChange,
6123
6130
  getOrderLine,
6124
6131
  getProductImage,
6125
- addEntity,
6126
6132
  checkPayment,
6127
6133
  handleCloseSession,
6128
6134
  handleClosingDetailSession,
@@ -6140,15 +6146,16 @@ function useViewService() {
6140
6146
  getCurrentUser,
6141
6147
  getCountry,
6142
6148
  getCity,
6143
- getWard
6149
+ getWard,
6150
+ getPartnerTitle
6144
6151
  };
6145
6152
  }
6146
6153
 
6147
6154
  // src/services/dashboard-service/index.ts
6148
- import { useCallback as useCallback12 } from "react";
6155
+ import { useCallback as useCallback13 } from "react";
6149
6156
  function useDashboardService() {
6150
6157
  const { env } = useEnv();
6151
- const readGroup = useCallback12(
6158
+ const readGroup = useCallback13(
6152
6159
  async ({
6153
6160
  service,
6154
6161
  xNode,
@@ -6165,7 +6172,7 @@ function useDashboardService() {
6165
6172
  },
6166
6173
  [env]
6167
6174
  );
6168
- const getDataChart = useCallback12(
6175
+ const getDataChart = useCallback13(
6169
6176
  async ({
6170
6177
  service,
6171
6178
  xNode,