Browse Source

[FIX] check for null name

pull/2/head
Ivan Yelizariev 10 years ago
parent
commit
d163db7abe
  1. 2
      mail_move_message_models.py

2
mail_move_message_models.py

@ -93,7 +93,7 @@ class mail_message(models.Model):
reads = self.read(cr, uid, ids, ['record_name','model', 'res_id'], context=context) reads = self.read(cr, uid, ids, ['record_name','model', 'res_id'], context=context)
res = [] res = []
for record in reads: for record in reads:
name = record['record_name']
name = record['record_name'] or ''
extended_name = ' [%s] ID %s' % (record.get('model', 'UNDEF'), record.get('res_id', 'UNDEF')) extended_name = ' [%s] ID %s' % (record.get('model', 'UNDEF'), record.get('res_id', 'UNDEF'))
res.append((record['id'], name + extended_name)) res.append((record['id'], name + extended_name))
return res return res
Loading…
Cancel
Save