[MERGE] [IMP] better event form view
bzr revid: mat@openerp.com-20130530134736-r5ol9ty83p10iwfl
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<field name="res_model">event.registration</field>
|
||||
<field name="view_type">form</field>
|
||||
<field name="name">Registrations</field>
|
||||
<field name="view_mode">calendar,tree,form,graph</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>
|
||||
</record>
|
||||
|
||||
@@ -101,19 +101,13 @@
|
||||
</group>
|
||||
</group>
|
||||
<notebook>
|
||||
<page string="Email Configuration" groups="base.group_no_one">
|
||||
<group>
|
||||
<page string="Event Details" groups="base.group_no_one">
|
||||
<group colspan="4">
|
||||
<field name="reply_to"/>
|
||||
<group>
|
||||
<field name="email_registration_id"/>
|
||||
</group>
|
||||
<group>
|
||||
<field name="email_confirmation_id"/>
|
||||
</group>
|
||||
<field name="email_registration_id"/>
|
||||
<field name="email_confirmation_id"/>
|
||||
</group>
|
||||
</page>
|
||||
<page string="Event Description">
|
||||
<field name="note" colspan="4" nolabel="1"/>
|
||||
<field name="note" nolabel="1" placeholder="Event Description..."/>
|
||||
</page>
|
||||
<page string="Registrations">
|
||||
<group>
|
||||
|
||||
@@ -70,6 +70,8 @@ class sale_order_line(osv.osv):
|
||||
'''
|
||||
create registration with sales order
|
||||
'''
|
||||
if context is None:
|
||||
context = {}
|
||||
registration_obj = self.pool.get('event.registration')
|
||||
sale_obj = self.pool.get('sale.order')
|
||||
for order_line in self.browse(cr, uid, ids, context=context):
|
||||
@@ -83,7 +85,8 @@ class sale_order_line(osv.osv):
|
||||
'origin': order_line.order_id.name,
|
||||
'event_id': order_line.event_id.id,
|
||||
}
|
||||
message = _("The registration has been created for event <i>%s</i> from the Sale Order %s. ") % (order_line.event_id.name, order_line.order_id.name)
|
||||
context.update({'mail_create_nolog': True, 'message': message })
|
||||
registration_id = registration_obj.create(cr, uid, dic, context=context)
|
||||
message = _("The registration %s has been created from the Sales Order %s.") % (registration_id, order_line.order_id.name)
|
||||
registration_obj.message_post(cr, uid, [registration_id], body=message, context=context)
|
||||
return super(sale_order_line, self).button_confirm(cr, uid, ids, context=context)
|
||||
|
||||
Reference in New Issue
Block a user