Trunc the summary as it is no more automaticly done

bzr revid: ced-a5c3780e9ec740d28c4bc44d6a47529c45f60388
This commit is contained in:
ced 2007-11-21 06:57:32 +00:00
parent 87aac193c7
commit 1ff080cfd5
1 changed files with 4 additions and 2 deletions

View File

@ -42,8 +42,10 @@ class res_request(osv.osv):
cr.execute('update res_request set state=%s,date_sent=%s where id=%d', ('waiting', time.strftime('%Y-%m-%d %H:%M:%S'), id))
cr.execute('select act_from,act_to,body,date_sent from res_request where id=%d', (id,))
values = cr.dictfetchone()
# this will be truncated automatically at creation
values['name'] = values['body'] or '/'
if len(values['body']) > 128:
values['name'] = values['body'][:125] + '...'
else:
values['name'] = values['body'] or '/'
values['req_id'] = id
self.pool.get('res.request.history').create(cr, uid, values)
return True