crisalid_odoo_client 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/crisalid_odoo_client/client.rb +12 -0
- data/lib/crisalid_odoo_client/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2404839be69c1435311cc064b513c8ed78da68c5c3f879a729f1a6f45dae298a
|
4
|
+
data.tar.gz: 0a1b7cc6da15c7fd8e76c78317dc286311b7f0b2ff6caafdb874345d2d062fb2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d39d579086447246fe25e6b99fd7db81b1d45427f18d001459e04a62f4fe234172c99545fbbc5d3de5178f9618fc5272a15b2c408cc715b5bd2460cabe8a4ac8
|
7
|
+
data.tar.gz: c912bc06e43a6ad822b339c41fb5995d548972fc6fc1e51f8766e08e83bc657ca892e276cfd31170dd96ac3be2809e008f05d20f80245562b8192cdd5673b71d
|
data/Gemfile.lock
CHANGED
@@ -62,6 +62,18 @@ module CrisalidOdooClient
|
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
65
|
+
def create_in_batch(table, headers, params)
|
66
|
+
if headers.is_a?(Array) && headers.size > 0
|
67
|
+
if params.is_a?(Array) && params.size > 0 && params.first.is_a?(Array) && params.first.size == headers.size
|
68
|
+
@models.execute_kw(@odoo_db, @uid, @odoo_pass, table, 'load', [headers, params])["ids"]
|
69
|
+
else
|
70
|
+
raise CrisalidOdooClient::Error::OdooResourceManagerError
|
71
|
+
end
|
72
|
+
else
|
73
|
+
raise CrisalidOdooClient::Error::OdooResourceManagerError
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
65
77
|
def update(table, ids, params)
|
66
78
|
if params.is_a?(Hash) && params.size > 0 && ids.is_a?(Array) && ids.size > 0
|
67
79
|
@models.execute_kw(@odoo_db, @uid, @odoo_pass, table, 'write', [ids, params])
|