Skip to content
Snippets Groups Projects
Commit b1642f87 authored by Thibault Delavallée's avatar Thibault Delavallée
Browse files

[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.
parent e7b71a4b
Branches
Tags
No related merge requests found
......@@ -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;">
......
......@@ -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
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment