summaryrefslogtreecommitdiff
path: root/addons/note
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2015-08-04 12:38:44 +0200
committerThibault Delavallée <tde@openerp.com>2015-08-21 12:11:56 +0200
commite6f038a8216c249a3ce7d9f490010d9f666f3375 (patch)
treebe878f130637d68f319dfd9cf7171d73ebcf00c1 /addons/note
parent098fcb7e4e21b60b93c8e7724a4149e2520711e9 (diff)
[REF] mail: mail_thread: followers update
Followers can now be partners or channels. Partners following a document will receive needaction, as previously. However people can follow documents through channels. Members of a channel are able to listen to a stream of messages using the channel. Those messages do not create needaction messages. It is therefore possible to follow documents without receiving too much notifications. For interesting documents subscribing with its partner will create notification. message_follower_ids fields is udpated. It is now a many2many to mail.followers, not to res.partner anymore. A subscription can be either a partner (partner_id) or a channel (channel_id). Some access rules have been updated accordingly.
Diffstat (limited to 'addons/note')
-rw-r--r--addons/note/note_demo.xml4
-rw-r--r--addons/note/security/ir.rule.xml2
2 files changed, 1 insertions, 5 deletions
diff --git a/addons/note/note_demo.xml b/addons/note/note_demo.xml
index f594d312abe..d4a10d8345b 100644
--- a/addons/note/note_demo.xml
+++ b/addons/note/note_demo.xml
@@ -36,7 +36,6 @@
</field>
<field name="stage_id" ref="demo_note_stage_01"/>
<field name="color">2</field>
- <field name="message_follower_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="note_2" model="note.note">
@@ -61,7 +60,6 @@
]]>
</field>
<field name="stage_id" ref="demo_note_stage_02"/>
- <field name="message_follower_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="note_6" model="note.note">
@@ -93,7 +91,6 @@
</field>
<field name="stage_id" ref="note_stage_03"/>
<field name="color">3</field>
- <field name="message_follower_ids" eval="[(4, ref('base.group_user'))]"/>
</record>
<record id="note_9" model="note.note">
@@ -111,7 +108,6 @@
<br/>* Odoo for Retail and Industrial Management
]]>
</field>
- <field name="message_follower_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="color">7</field>
<field name="stage_ids" eval="['note_stage_03','demo_note_stage_04']"/>
</record>
diff --git a/addons/note/security/ir.rule.xml b/addons/note/security/ir.rule.xml
index 2b9645cc9d4..d57c105fba3 100644
--- a/addons/note/security/ir.rule.xml
+++ b/addons/note/security/ir.rule.xml
@@ -4,7 +4,7 @@
<record id="note_note_rule_global" model="ir.rule">
<field name="name">Only followers can access a sticky notes</field>
<field name="model_id" ref="model_note_note"/>
- <field name="domain_force">['|', ('user_id', '=', user.id), ('message_follower_ids', '=', user.partner_id.id)]</field>
+ <field name="domain_force">['|', ('user_id', '=', user.id), ('message_partner_ids', '=', user.partner_id.id)]</field>
<field name="global" eval="True"/>
<field name="perm_create" eval="False"/>
<field name="perm_unlink" eval="False"/>