[ADD] change the dashboard eventregistration
bzr revid: mva@openerp.com-20120109155347-jnw3hq6ilj0x7rmg
This commit is contained in:
parent
c913d46c49
commit
debfe254dd
|
@ -178,7 +178,7 @@ class event_event(osv.osv):
|
|||
"""
|
||||
register_pool = self.pool.get('event.registration')
|
||||
res = super(event_event, self).write(cr, uid, ids, vals, context=context)
|
||||
if vals.get('date_begin', False) or vals.get('mail_auto_confirm', False) or vals.get('mail_confirm', False):
|
||||
if vals.get('date_begin', False) or vals.get('mail_confirm', False):
|
||||
for event in self.browse(cr, uid, ids, context=context):
|
||||
#change the deadlines of the registration linked to this event
|
||||
register_values = {}
|
||||
|
@ -186,6 +186,8 @@ class event_event(osv.osv):
|
|||
register_values['date_deadline'] = vals['date_begin']
|
||||
|
||||
#change the description of the registration linked to this event
|
||||
|
||||
"""
|
||||
if vals.get('mail_auto_confirm', False):
|
||||
if vals['mail_auto_confirm']:
|
||||
if 'mail_confirm' not in vals:
|
||||
|
@ -194,7 +196,7 @@ class event_event(osv.osv):
|
|||
vals['mail_confirm'] = False
|
||||
if 'mail_confirm' in vals:
|
||||
register_values['description'] = vals['mail_confirm']
|
||||
|
||||
"""
|
||||
if register_values:
|
||||
reg_ids = register_pool.search(cr, uid, [('event_id', '=', event.id)], context=context)
|
||||
register_pool.write(cr, uid, reg_ids, register_values, context=context)
|
||||
|
|
|
@ -37,7 +37,7 @@ class report_event_registration(osv.osv):
|
|||
('10','October'), ('11','November'), ('12','December')], 'Month',readonly=True),
|
||||
'event_id': fields.many2one('event.event', 'Event', required=True),
|
||||
'draft_state': fields.integer(' # No of Draft Registrations', size=20),
|
||||
'state': fields.integer(' # No of Draft Registrations', size=20),
|
||||
'average_subtotal': fields.integer('average_subtotal', size=20),
|
||||
'confirm_state': fields.integer(' # No of Confirmed Registrations', size=20),
|
||||
'register_max': fields.integer('Maximum Registrations'),
|
||||
'nbevent': fields.integer('Number Of Events'),
|
||||
|
@ -84,6 +84,7 @@ class report_event_registration(osv.osv):
|
|||
|
||||
e.type AS type,
|
||||
r.price_subtotal,
|
||||
AVG(r.price_subtotal) AS average_subtotal,
|
||||
e.register_max AS register_max,
|
||||
e.state AS event_state,
|
||||
r.state AS registration_state
|
||||
|
|
|
@ -22,7 +22,8 @@
|
|||
<field name="confirm_state"/>
|
||||
<field name="registration_state" invisible="1"/>
|
||||
<field name="user_id_registration" invisible="1"/>
|
||||
<field name="price_subtotal" invisible="1"/>
|
||||
<field name="price_subtotal"/>
|
||||
<field name="average_subtotal"/>
|
||||
<field name="register_max" invisible="context.get('max_reg_event_visible', True)"/>
|
||||
<field name="company_id" invisible="1"/>
|
||||
<field name="product_id" invisible="1"/>
|
||||
|
@ -123,7 +124,6 @@
|
|||
<newline/>
|
||||
<group expand="1" string="Group By Registration...">
|
||||
<filter string="State" icon="terp-stock_effects-object-colorize" context="{'group_by':'registration_state'}" help="Events States"/>
|
||||
<filter string="price_subtotal" icon="terp-stock_effects-object-colorize" context="{'group_by':'price_subtotal'}" help="Events States"/>
|
||||
<filter string="user" icon="terp-stock_effects-object-colorize" context="{'group_by':'user_id_registration'}" help="Events States"/>
|
||||
|
||||
</group>
|
||||
|
|
Loading…
Reference in New Issue