rodoo 0.4.0 → 0.5.0
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/rodoo/model.rb +24 -0
- data/lib/rodoo/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: 34862008f0b02685e929c1c10b16cfa2ad0125fbf37a60190997f7945c747bb9
|
|
4
|
+
data.tar.gz: e947bcd5ac65a7c40cdc9f4bde9c50d6396c6dfdf2705613a273aef39f1585db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3c2fb74bc3b31914005b656b1bedf7c016782212d103bcbe089e470480d860d102405d41321a46c1dc3583587f52bc1f1f0534bfeabf380487bc4354994802bb
|
|
7
|
+
data.tar.gz: 712ae40576b4a51b1046d073cb5159087f938324f7e4529a486f27c2674179c0a29737265e92e5fba49a8a33b4554aae70b5d60dbcec52428360fcccff22e851
|
data/CHANGELOG.md
CHANGED
data/lib/rodoo/model.rb
CHANGED
|
@@ -306,6 +306,30 @@ module Rodoo
|
|
|
306
306
|
self.class.execute("message_post", params)
|
|
307
307
|
end
|
|
308
308
|
|
|
309
|
+
# Subscribes partners as followers to the record.
|
|
310
|
+
#
|
|
311
|
+
# @param partner_ids [Array<Integer>] List of partner IDs to subscribe
|
|
312
|
+
# @param subtype_ids [Array<Integer>, nil] Optional list of subtype IDs for notifications
|
|
313
|
+
# @param kwargs [Hash] Additional parameters to pass to the Odoo method
|
|
314
|
+
# @return [Boolean] True on success
|
|
315
|
+
# @raise [Rodoo::Error] If the record hasn't been persisted
|
|
316
|
+
#
|
|
317
|
+
# @example Subscribe contacts to an invoice
|
|
318
|
+
# invoice.message_subscribe(partner_ids: [456, 789])
|
|
319
|
+
#
|
|
320
|
+
def message_subscribe(partner_ids:, subtype_ids: nil, **kwargs)
|
|
321
|
+
raise Error, "Cannot subscribe to a record that hasn't been persisted" unless persisted?
|
|
322
|
+
|
|
323
|
+
params = {
|
|
324
|
+
ids: [id],
|
|
325
|
+
partner_ids: partner_ids,
|
|
326
|
+
subtype_ids: subtype_ids,
|
|
327
|
+
**kwargs
|
|
328
|
+
}.compact
|
|
329
|
+
|
|
330
|
+
self.class.execute("message_subscribe", params)
|
|
331
|
+
end
|
|
332
|
+
|
|
309
333
|
def inspect
|
|
310
334
|
"#<#{self.class.name} id=#{id.inspect} #{inspectable_attributes}>"
|
|
311
335
|
end
|
data/lib/rodoo/version.rb
CHANGED