summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2015-04-16 15:22:55 +0200
committerRichard Mathot <rim@odoo.com>2015-04-22 09:25:26 +0200
commit581c2f1aa1e321d96d10a0b4e1f1289bc299b7a2 (patch)
tree13da8f1a8b6eb7029fda5c578a64c3b14807f6f0 /addons
parent01b536b3ced71513307dadeeb8729453346be6d5 (diff)
[IMP] event: usability improvements
- New filter "not cancelled" for attendees management - No more readonly nor invisibility on "minimum number of seats" - Event questions and mail scheduling have been put under an optional tab
Diffstat (limited to 'addons')
-rw-r--r--addons/event/event.py3
-rw-r--r--addons/event/event_view.xml7
-rw-r--r--addons/event/res_config.py8
-rw-r--r--addons/event/res_config_view.xml8
-rw-r--r--addons/event/security/event_security.xml10
-rw-r--r--addons/event_sale/views/event.xml2
6 files changed, 32 insertions, 6 deletions
diff --git a/addons/event/event.py b/addons/event/event.py
index 8d7feeb8283..83da211ed6d 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -53,7 +53,7 @@ class event_event(models.Model):
return [(0, 0, {
'interval_unit': 'now',
'interval_type': 'after_sub',
- 'template_id': self.env['ir.model.data'].xmlid_to_res_id('event.event_subscription')
+ 'template_id': self.env.ref('event.event_subscription')
})]
# Seats and computation
@@ -66,7 +66,6 @@ class event_event(models.Model):
'Available Seat', required=True, default='unlimited')
seats_min = fields.Integer(
string='Minimum Reserved Seats', oldname='register_min',
- readonly=True, states={'draft': [('readonly', False)]},
help="You can for each event define a minimum registration level. If you do not enough registrations you are not able to confirm your event. (put 0 to ignore this rule )")
seats_reserved = fields.Integer(
oldname='register_current', string='Reserved Seats',
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 11550c85787..ff94c38525f 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -46,7 +46,7 @@
<field name="view_type">form</field>
<field name="name">Attendees</field>
<field name="view_mode">tree,form,calendar,graph</field>
- <field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id}</field>
+ <field name="context">{'search_default_event_id': active_id, 'default_event_id': active_id, 'search_default_not_cancelled': 1}</field>
</record>
<!-- EVENT.EVENT VIEWS -->
@@ -95,13 +95,13 @@
<group>
<group>
<field name="auto_confirm" invisible="1"/>
- <field name="seats_min" attrs="{'invisible':[('auto_confirm','=', True)]}"/>
+ <field name="seats_min"/>
<field name="seats_availability" widget='radio'/>
<field name="seats_max" attrs="{'invisible': [('seats_availability', '=', 'unlimited')], 'required': [('seats_availability', '=', 'limited')]}"/>
</group>
</group>
</page>
- <page string="Email Schedule">
+ <page string="Email Schedule" groups="event.group_email_scheduling">
<group>
<field name="reply_to"/>
</group>
@@ -369,6 +369,7 @@
<field name="id" string="Registration ID"/>
<field name="name" string="Participant" filter_domain="['|', '|', ('name', 'ilike', self), ('email', 'ilike', self), ('origin', 'ilike', self)]"/>
<filter string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
+ <filter string="Not Cancelled" name="not_cancelled" domain="[('state','!=','cancel')]"/>
<separator/>
<field name="event_id"/>
<field name="partner_id"/>
diff --git a/addons/event/res_config.py b/addons/event/res_config.py
index 6686f495920..9f31c73dc41 100644
--- a/addons/event/res_config.py
+++ b/addons/event/res_config.py
@@ -11,8 +11,16 @@ class event_config_settings(osv.TransientModel):
help='Install the event_sale module'),
'module_website_event_track': fields.boolean(
'Organize few days event with track, full agenda, own menu in website'),
+ 'module_website_event_questions': fields.boolean(
+ 'Ask questions to online subscribers',
+ help='Install the website_event_questions module',
+ implied_group='event.group_website_event_questions'),
'auto_confirmation': fields.boolean(
'Automate events and subscription confirmation', help='Unselect this option to manually manage draft event and draft subscription'),
+ 'group_email_scheduling': fields.boolean(
+ 'Schedule emails to attendees and subscribers',
+ help='You will be able to configure emails, and to schedule them to be automatically sent to the attendees on subscription and/or attendance',
+ implied_group='event.group_email_scheduling'),
}
def set_default_auto_confirmation(self, cr, uid, ids, context=None):
diff --git a/addons/event/res_config_view.xml b/addons/event/res_config_view.xml
index 3d2e1d545e0..8eb931e7339 100644
--- a/addons/event/res_config_view.xml
+++ b/addons/event/res_config_view.xml
@@ -19,10 +19,18 @@
<field name="module_website_event_track"/>
<label for="module_website_event_track"/>
</div>
+ <div name="div_website_event_questions">
+ <field name="module_website_event_questions"/>
+ <label for="module_website_event_questions"/>
+ </div>
<div name="div_auto_confirmation">
<field name="auto_confirmation"/>
<label for="auto_confirmation"/>
</div>
+ <div name="div_email_scheduling">
+ <field name="group_email_scheduling"/>
+ <label for="group_email_scheduling"/>
+ </div>
</div>
</group>
</div>
diff --git a/addons/event/security/event_security.xml b/addons/event/security/event_security.xml
index 5cdd7c9b459..e576829150a 100644
--- a/addons/event/security/event_security.xml
+++ b/addons/event/security/event_security.xml
@@ -21,6 +21,16 @@
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
+ <record id="group_email_scheduling" model="res.groups">
+ <field name="name">Schedule Emails on Event Subscription</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
+ <record id="group_website_event_questions" model="res.groups">
+ <field name="name">Ask Questions to Online Subscribers</field>
+ <field name="category_id" ref="base.module_category_hidden"/>
+ </record>
+
</data>
<data noupdate="1">
diff --git a/addons/event_sale/views/event.xml b/addons/event_sale/views/event.xml
index 87b23b47c07..f4d93ff22e0 100644
--- a/addons/event_sale/views/event.xml
+++ b/addons/event_sale/views/event.xml
@@ -54,7 +54,7 @@
<group>
<group>
<field name="auto_confirm" invisible="1"/>
- <field name="seats_min" attrs="{'invisible':[('auto_confirm','=', True)]}"/>
+ <field name="seats_min"/>
<field name="seats_availability" widget='radio'/>
<field name="seats_max" attrs="{'invisible': [('seats_availability', '=', 'unlimited')], 'required': [('seats_availability', '=', 'limited')]}"/>
</group>