multiwoven-integrations 0.33.3 → 0.33.4
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 988de29d75c6d608b4890a8e9743ecfaa2b9e1a5a38fed0776255e8aa6db1569
|
4
|
+
data.tar.gz: c63a9cd96427b9fb6c9e239a47c6f8f1060580388ba72042ae01446f67910cee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd57b68f40ab659fc690753a4b8bae6cd38d4fe5f760e078fe6c8d23b716c7b134a81570afa743a7b1632c835d042f7d527efa1b9c629d0574436ed23c113f4f
|
7
|
+
data.tar.gz: 290f9d5e8da0450a344ca924f54545e514dee71316219fd2d8e0393a5b17b1bea3f6b4622010a8d75791575213c25689c72686c537c03197b3f38f9d8ea273f3
|
@@ -40,6 +40,7 @@ module Multiwoven::Integrations::Destination
|
|
40
40
|
records.each do |record|
|
41
41
|
logger.debug("ODOO:WRITE:#{model} sync_id = #{sync_config.sync_id} sync_run_id = #{sync_config.sync_run_id}")
|
42
42
|
begin
|
43
|
+
record = format_record(record, sync_config.stream.json_schema)
|
43
44
|
response = @client.execute_kw(connection_config[:database], @uid, connection_config[:password],
|
44
45
|
model, "create", [record])
|
45
46
|
write_success += 1
|
@@ -67,6 +68,17 @@ module Multiwoven::Integrations::Destination
|
|
67
68
|
|
68
69
|
private
|
69
70
|
|
71
|
+
def format_record(record, json_schema)
|
72
|
+
json_schema = json_schema.with_indifferent_access
|
73
|
+
properties = json_schema["properties"]
|
74
|
+
record.each_key do |key|
|
75
|
+
data_type = properties[key]["type"]
|
76
|
+
record[key] = record[key].to_i if data_type == "many2one"
|
77
|
+
record[key] = JSON.parse(record[key]) if data_type == "one2many"
|
78
|
+
end
|
79
|
+
record
|
80
|
+
end
|
81
|
+
|
70
82
|
def create_streams(connection_config, models)
|
71
83
|
models.map do |model|
|
72
84
|
fields = @client.execute_kw(connection_config[:database], @uid, connection_config[:password],
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multiwoven-integrations
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.33.
|
4
|
+
version: 0.33.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Subin T P
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-08-
|
11
|
+
date: 2025-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|