[FIX] mail res.users creation message

bzr revid: al@openerp.com-20120815190914-kzrmr67l4f0ph0vo
This commit is contained in:
Antony Lesuisse 2012-08-15 21:09:14 +02:00
parent dc70fa459d
commit 9958acdc32
1 changed files with 2 additions and 1 deletions

View File

@ -119,7 +119,8 @@ class res_users(osv.Model):
company_name = user.company_id.name if user.company_id else _('the company')
subject = '''%s has joined %s.''' % (user.name, company_name)
body = '''Welcome to OpenERP !'''
return self.pool.get('res.partner').message_append_note(cr, user.id, [user.partner_id.id],
# TODO change 1 into user.id but catch errors
return self.pool.get('res.partner').message_append_note(cr, 1, [user.partner_id.id],
subject=subject, body=body, type='comment', content_subtype='html', context=context)
def write(self, cr, uid, ids, vals, context=None):