summaryrefslogtreecommitdiff
path: root/addons/event/event_data.xml
diff options
context:
space:
mode:
authorMahendra barad <mba@openerp.com>2014-08-11 19:08:37 +0530
committerThibault Delavallée <tde@openerp.com>2014-10-17 16:48:29 +0200
commitad48bf6d7d7f3c1678b0cd2d55fe64163ad10c38 (patch)
treec4e46963793ed04cda930503aac9ce56aca318d5 /addons/event/event_data.xml
parentfd54df5c7cb4fe2fd606baef347b23ee911f0e2f (diff)
[IMP] [ADD] event: mail schedulign system.
This commit adds a way to configure scheduled emails on events. It replaces existing automatic emails at confirmation and subscription. It proposes to configure some schedulers, based on subscription or event, using a template and a configurable timedelta. A cron is added that regularly checks for event mailing schedulers to execute and launch them. The granularity of send emails is therefore limited to the granularity of the cron, aka 1 hour. [TEST] Added tests for this feature. Also cleaned a bit event, country_id is now a pure related instead of a computed field trying to be a related. Also removed default templates on event category. Configuration in the event itself should be easy enough for most use cases.
Diffstat (limited to 'addons/event/event_data.xml')
-rw-r--r--addons/event/event_data.xml19
1 files changed, 18 insertions, 1 deletions
diff --git a/addons/event/event_data.xml b/addons/event/event_data.xml
index 823d6428993..2419132f409 100644
--- a/addons/event/event_data.xml
+++ b/addons/event/event_data.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
+
<!-- After installation of the module, open the related menu -->
<record id="action_client_event_menu" model="ir.actions.client">
<field name="name">Open Event Menu</field>
@@ -21,11 +22,27 @@
<!-- notify all employees of module installation -->
<function model="mail.group" name="message_post">
- <!-- ids, subject, body, parent_id=False, type='notification', content_subtype='html' -->
<value eval="[ref('mail.group_all_employees')]"/>
<value>From the top menu Events, you can organize events, manage registrations, automate communication around your event and sell events through your quotations.</value>
<value>Module Events has been installed</value>
</function>
+
+ <!-- Automatic confirmation of events by default -->
<function id="default_auto_confirmation" model="ir.values" name="set_default" eval="('marketing.config.settings', 'auto_confirmation', True)"/>
+
+ <!-- Event Mail Scheduler-->
+ <record model="ir.cron" forcecreate="True" id="event_mail_scheduler">
+ <field name="name">[event] mail scheduler</field>
+ <field name="active">True</field>
+ <field name="user_id" ref="base.user_root"/>
+ <field name="interval_number">1</field>
+ <field name="interval_type">hours</field>
+ <field name="numbercall">-1</field>
+ <field name="doall" eval="False" />
+ <field eval="'()'" name="args"/>
+ <field name="model">event.mail</field>
+ <field name="function">run</field>
+ </record>
+
</data>
</openerp>