summaryrefslogtreecommitdiff
path: root/addons/mail/data/ir_cron_data.xml
diff options
context:
space:
mode:
authorNikunj Ladava <nla@odoo.com>2018-02-02 06:21:44 +0000
committerXavier-Do <xdo@odoo.com>2019-08-05 11:50:19 +0000
commit0c37b9fb39005eab70ee8b39da84f79c981b2695 (patch)
treef365ab14cca2a776cb0c91587f841ba95257f8de /addons/mail/data/ir_cron_data.xml
parent634bdbfa3a316fcaa9323f97bb59f198cd771b27 (diff)
[IMP] mail, test_mail: new 'History' mailbox in Discuss
This commit adds a new mailbox in the Discuss app called 'History'. Messages that have been marked as read are moved to 'History'. Notifications are required to link history messages to users. So notifications are now deleted after they are more tha 6 months old. This means History mailbox keeps less than 6 months old messages. Note that this feature only works when user notifications are handled in Odoo. This can be set in the user preferences, under the "Notification Management" section. Task-ID 402597
Diffstat (limited to 'addons/mail/data/ir_cron_data.xml')
-rw-r--r--addons/mail/data/ir_cron_data.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/addons/mail/data/ir_cron_data.xml b/addons/mail/data/ir_cron_data.xml
index 27ae8795804..10073110a3a 100644
--- a/addons/mail/data/ir_cron_data.xml
+++ b/addons/mail/data/ir_cron_data.xml
@@ -43,5 +43,17 @@
<field eval="False" name="doall" />
<field name="priority">1000</field>
</record>
+
+ <record id="ir_cron_delete_notification" model="ir.cron">
+ <field name="name">Notification: Delete Notifications older than 6 Month</field>
+ <field name="interval_number">1</field>
+ <field name="interval_type">days</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False"/>
+ <field name="model_id" ref="model_mail_notification"/>
+ <field name="code">model._gc_notifications(max_age_days=180)</field>
+ <field name="state">code</field>
+ </record>
+
</data>
</odoo>