Trunc the summary as it is no more automaticly done
bzr revid: ced-a5c3780e9ec740d28c4bc44d6a47529c45f60388
This commit is contained in:
parent
87aac193c7
commit
1ff080cfd5
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue