[IMP] Improved code

bzr revid: ggh@tinyerp.com-20130517045859-jnciw2w13z3u1eka
This commit is contained in:
Farid Ghanchi (OpenERP) 2013-05-17 10:28:59 +05:30
parent 7d276f0153
commit 70f20e30d4
1 changed files with 7 additions and 7 deletions

View File

@ -85,10 +85,10 @@ class sale_order_line(osv.osv):
'origin': order_line.order_id.name,
'event_id': order_line.event_id.id,
}
message = _("The registration has been <b>created</b> 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, 'sale_event': True, 'message': message })
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)
registration_obj.message_post(cr, uid, registration_id, body=message, context=context)
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)
sale_order_line()