[FIX] portal_sale: fixed call to mail_mail.send_mail()
bzr revid: tde@openerp.com-20130226170353-pnkti0fieicsb9rr
This commit is contained in:
@@ -59,12 +59,11 @@ class sale_order(osv.Model):
|
||||
assert len(ids) == 1
|
||||
document = self.browse(cr, uid, ids[0], context=context)
|
||||
partner = document.partner_id
|
||||
# TDE note: this code should be improved: used a real invite wizard instead of an ugly email
|
||||
if partner.id not in document.message_follower_ids:
|
||||
self.message_subscribe(cr, uid, ids, [partner.id], context=context)
|
||||
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
|
||||
mail_values = {
|
||||
'email_from': user.partner_id.email,
|
||||
'email_to': partner.email,
|
||||
'recipient_ids': [(4, partner.id)],
|
||||
'subject': 'Invitation to follow %s' % document.name_get()[0][1],
|
||||
'body_html': 'You have been invited to follow %s' % document.name_get()[0][1],
|
||||
'auto_delete': True,
|
||||
@@ -72,7 +71,7 @@ class sale_order(osv.Model):
|
||||
}
|
||||
mail_obj = self.pool.get('mail.mail')
|
||||
mail_id = mail_obj.create(cr, uid, mail_values, context=context)
|
||||
mail_obj.send(cr, uid, [mail_id], recipient_ids=[partner.id], context=context)
|
||||
mail_obj.send(cr, uid, [mail_id], context=context)
|
||||
return super(sale_order, self).action_button_confirm(cr, uid, ids, context=context)
|
||||
|
||||
def get_signup_url(self, cr, uid, ids, context=None):
|
||||
|
||||
Reference in New Issue
Block a user