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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aa1ac7c04d408162f2b2515d3aed43dd605fc72fbf4b9f40b4e3309d0776d272
4
- data.tar.gz: 4fc57373699d7c297fe21d35c9922aef5895b34c3f76712e4df6936a3fa43089
3
+ metadata.gz: 2404839be69c1435311cc064b513c8ed78da68c5c3f879a729f1a6f45dae298a
4
+ data.tar.gz: 0a1b7cc6da15c7fd8e76c78317dc286311b7f0b2ff6caafdb874345d2d062fb2
5
5
  SHA512:
6
- metadata.gz: 1f69bf1753e6a2e6c9b05ed0f94459c5ba397c7ba0db2e0bb986f5c2b7de65875eab8ed70880284dce2aa95cf00fe23b1b6dbca90610bf011caa6c5efc596a05
7
- data.tar.gz: '06853d71fb037af5bd952d27a49b254030ad99cfd0500fb1ad48be2c38480f6f7b69e2e88d44dad0d836cc65377f4a5e3dac9113b73acfe872f37d848a662f73'
6
+ metadata.gz: d39d579086447246fe25e6b99fd7db81b1d45427f18d001459e04a62f4fe234172c99545fbbc5d3de5178f9618fc5272a15b2c408cc715b5bd2460cabe8a4ac8
7
+ data.tar.gz: c912bc06e43a6ad822b339c41fb5995d548972fc6fc1e51f8766e08e83bc657ca892e276cfd31170dd96ac3be2809e008f05d20f80245562b8192cdd5673b71d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- crisalid_odoo_client (1.1.0)
4
+ crisalid_odoo_client (1.2.0)
5
5
  xmlrpc
6
6
 
7
7
  GEM
@@ -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])
@@ -1,3 +1,3 @@
1
1
  module CrisalidOdooClient
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crisalid_odoo_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxime Palanchini