summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorThibault Delavallée <tde@odoo.com>2017-04-07 14:44:33 +0200
committerThibault Delavallée <tde@odoo.com>2017-05-10 13:17:55 +0200
commitb1642f87101a794adc6fd3a3bad0a283e3260b69 (patch)
treebac2c41668a36546876f059d67501bcdb1320e26 /addons
parente7b71a4b213a12b140e99df13dba12e097fb2a56 (diff)
[IMP] event: remove reply_to field
Events currently have a reply_to field that is purely informative. Indeed it has to be explicitely taken into account when using mail templates and is not used for setting classic reply-to of other messages. This commit removes this field as it is simpler to have a standard behavior as in all other addons. If a custom reply-to is required it can be set on the mail template or using the mail composer.
Diffstat (limited to 'addons')
-rw-r--r--addons/event/data/email_template_data.xml4
-rw-r--r--addons/event/models/event.py8
-rw-r--r--addons/event/views/event_views.xml42
3 files changed, 15 insertions, 39 deletions
diff --git a/addons/event/data/email_template_data.xml b/addons/event/data/email_template_data.xml
index 27dfb81ce1d..f2a742d9318 100644
--- a/addons/event/data/email_template_data.xml
+++ b/addons/event/data/email_template_data.xml
@@ -26,7 +26,7 @@
<field name="email_from">${(object.event_id.organizer_id.email or object.event_id.user_id.email or '')|safe}</field>
<field name="email_to" >${object.partner_id.email or object.email|safe}</field>
<field name="lang">${object.partner_id.lang}</field>
- <field name="reply_to">${object.event_id.reply_to|safe}</field>
+ <field name="reply_to" eval="False"/>
<field name="subject">Your registration at ${object.event_id.name}</field>
<field name="body_html"><![CDATA[
<div style="background:#F3F5F6;color:#515166;padding:25px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
@@ -200,7 +200,7 @@
<field name="email_from">${(object.event_id.organizer_id.email or object.event_id.user_id.email or '')|safe}</field>
<field name="email_to" >${object.partner_id.email or object.email|safe}</field>
<field name="lang">${object.partner_id.lang}</field>
- <field name="reply_to">${object.event_id.reply_to|safe}</field>
+ <field name="reply_to" eval="False"/>
<field name="subject">${object.event_id.name}: ${object.get_date_range_str()}</field>
<field name="body_html"><![CDATA[
<div style="background:#F3F5F6;color:#515166;padding:25px 0px;font-family:Arial,Helvetica,sans-serif;font-size:14px;">
diff --git a/addons/event/models/event.py b/addons/event/models/event.py
index ccec10601b1..d040ca7ba1a 100644
--- a/addons/event/models/event.py
+++ b/addons/event/models/event.py
@@ -55,8 +55,6 @@ class EventType(models.Model):
'_tz_get', string='Timezone',
default=lambda self: self.env.user.tz)
# communication
- use_reply_to = fields.Boolean('Use Default Reply-To')
- default_reply_to = fields.Char('Reply To')
use_hashtag = fields.Boolean('Use Default Hashtag')
default_hashtag = fields.Char('Twitter Hashtag')
use_mail_schedule = fields.Boolean(
@@ -156,9 +154,6 @@ class EventEvent(models.Model):
string='Status', default='draft', readonly=True, required=True, copy=False,
help="If event is created, the status is 'Draft'. If event is confirmed for the particular dates the status is set to 'Confirmed'. If the event is over, the status is set to 'Done'. If event is cancelled the status is set to 'Cancelled'.")
auto_confirm = fields.Boolean(string='Autoconfirm Registrations')
- reply_to = fields.Char(
- 'Reply-To Email', readonly=False, states={'done': [('readonly', True)]},
- help="The email address of the organizer is likely to be put here, with the effect to be in the 'Reply-To' of the mails sent automatically at event or registrations confirmation. You can also put the email address of your mail gateway if you use one.")
is_online = fields.Boolean('Online Event')
address_id = fields.Many2one(
'res.partner', string='Location',
@@ -237,9 +232,6 @@ class EventEvent(models.Model):
if self.event_type_id.auto_confirm:
self.auto_confirm = self.event_type_id.auto_confirm
- if self.event_type_id.use_reply_to:
- self.reply_to = self.event_type_id.default_reply_to
-
if self.event_type_id.use_hashtag:
self.twitter_hashtag = self.event_type_id.default_hashtag
diff --git a/addons/event/views/event_views.xml b/addons/event/views/event_views.xml
index dab9536edac..1d2a861b9ed 100644
--- a/addons/event/views/event_views.xml
+++ b/addons/event/views/event_views.xml
@@ -51,17 +51,22 @@
</div>
<h2>Communication</h2>
<div class="row mt16 o_settings_container" name="event_type_communication">
- <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="col-xs-12 col-md-12 o_setting_box">
<div class="o_setting_left_pane">
- <field name="use_reply_to"/>
+ <field name="use_mail_schedule"/>
</div>
<div class="o_setting_right_pane">
- <label for="use_reply_to"/>
- <div class="row">
- <div class="col-md-8 mt16" attrs="{'invisible': [('use_reply_to', '=', False)]}">
- <label for="default_reply_to"/>
- <field name="default_reply_to"
- attrs="{'required': [('use_reply_to', '=', True)]}"/>
+ <label for="use_mail_schedule"/>
+ <div class="row mt16" attrs="{'invisible': [('use_mail_schedule', '=', False)]}">
+ <div class="col-md-9">
+ <field name="event_type_mail_ids">
+ <tree string="Email Schedule" editable="bottom">
+ <field name="template_id"/>
+ <field name="interval_nbr" attrs="{'readonly':[('interval_unit', '=', 'now')]}"/>
+ <field name="interval_unit"/>
+ <field name="interval_type"/>
+ </tree>
+ </field>
</div>
</div>
</div>
@@ -81,26 +86,6 @@
</div>
</div>
</div>
- <div class="col-xs-12 col-md-12 o_setting_box">
- <div class="o_setting_left_pane">
- <field name="use_mail_schedule"/>
- </div>
- <div class="o_setting_right_pane">
- <label for="use_mail_schedule"/>
- <div class="row mt16" attrs="{'invisible': [('use_mail_schedule', '=', False)]}">
- <div class="col-md-9">
- <field name="event_type_mail_ids">
- <tree string="Email Schedule" editable="bottom">
- <field name="template_id"/>
- <field name="interval_nbr" attrs="{'readonly':[('interval_unit', '=', 'now')]}"/>
- <field name="interval_unit"/>
- <field name="interval_type"/>
- </tree>
- </field>
- </div>
- </div>
- </div>
- </div>
</div>
<h2>Visibility</h2>
<div class="row mt16 o_settings_container" name="event_type_visibility">
@@ -234,7 +219,6 @@
</group>
<group>
<field name="event_type_id" options="{'no_create':True}"/>
- <field name="reply_to" string="Contact Email"/>
<label for="twitter_hashtag"/>
<div>
<span class="oe_inline"># </span>