[FIX] event: correctly set default hashtag on event coming from category

Wrong event category field was used leading to an incoherent feature.

This commit also improves event form view to add an '#' before the
hashtag field so that users understand they don't have to put it.
This commit is contained in:
Thibault Delavallée
2017-04-04 14:09:17 +02:00
parent 535c4aba24
commit 92517bc930
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -239,7 +239,7 @@ class EventEvent(models.Model):
if self.event_type_id.use_reply_to:
self.reply_to = self.event_type_id.default_reply_to
if self.event_type_id.use_reply_to:
if self.event_type_id.use_hashtag:
self.twitter_hashtag = self.event_type_id.default_hashtag
if self.event_type_id.use_timezone:
+5 -1
View File
@@ -230,7 +230,11 @@
<group>
<field name="event_type_id" options="{'no_create':True}"/>
<field name="reply_to" string="Contact Email"/>
<field name="twitter_hashtag"/>
<label for="twitter_hashtag"/>
<div>
<span class="oe_inline"># </span>
<field name="twitter_hashtag" nolabel="1" class="oe_inline"/>
</div>
<field name="auto_confirm" groups="base.group_no_one"/>
</group>
<group>