[IMP]event: change registration view
bzr revid: kjo@tinyerp.com-20120706121344-330s2e44t11epg5o
This commit is contained in:
@@ -310,7 +310,6 @@ class event_registration(osv.osv):
|
||||
'phone': fields.char('Phone', size=64),
|
||||
'name': fields.char('Name', size=128, select=True),
|
||||
'active': fields.boolean('Active'),
|
||||
'duration': fields.float('Duration'),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
@@ -410,14 +409,9 @@ class event_registration(osv.osv):
|
||||
return {}
|
||||
event_obj = self.pool.get('event.event')
|
||||
data_event = event_obj.browse(cr, uid, event_id, context=context)
|
||||
start = datetime.strptime(data_event.date_begin, "%Y-%m-%d %H:%M:%S")
|
||||
end = datetime.strptime(data_event.date_end, "%Y-%m-%d %H:%M:%S")
|
||||
diff = end - start
|
||||
duration = float(diff.days)* 24 + (float(diff.seconds) / 3600)
|
||||
value ['value']= {'event_begin_date': data_event.date_begin,
|
||||
'event_end_date': data_event.date_end,
|
||||
'company_id': data_event.company_id and data_event.company_id.id or False,
|
||||
'duration': round(duration, 2),
|
||||
}
|
||||
return value
|
||||
|
||||
|
||||
@@ -463,7 +463,9 @@
|
||||
<h1>
|
||||
<field name="event_id" on_change="onchange_event(event_id, context)" domain="[('state','in',('draft','confirm'))]" nolabel="1" class="oe_inline"/>
|
||||
<label string="(" attrs="{'invisible': [('event_id', '=', '')]}" class="oe_inline"/>
|
||||
<field name="duration" widget="float_time" attrs="{'invisible': [('event_id', '=', '')]}" class="oe_inline"/>
|
||||
<field name="event_begin_date" class="oe_inline" attrs="{'invisible': [('event_id', '=', '')]}"/>
|
||||
<label string="-" attrs="{'invisible': [('event_id', '=', '')]}" class="oe_inline"/>
|
||||
<field name="event_end_date" class="oe_inline" attrs="{'invisible': [('event_id', '=', '')]}"/>
|
||||
<label string=")" attrs="{'invisible': [('event_id', '=', '')]}" class="oe_inline"/>
|
||||
</h1>
|
||||
<group colspan="4" col="4">
|
||||
@@ -473,9 +475,6 @@
|
||||
<label for="email" string="E-Mail"/>
|
||||
<group col="2">
|
||||
<field name="email" nolabel="1" class="oe_inline"/>
|
||||
<button string="Send New Email"
|
||||
name="%(mail.action_email_compose_message_wizard)d"
|
||||
context= '{"default_email_to":email}' type="action" class="oe_inline"/>
|
||||
</group>
|
||||
</group>
|
||||
<group colspan="2">
|
||||
|
||||
Reference in New Issue
Block a user