[FIX] Mail_Gateway : Added a condition in order to display message with no subject arising from migration(Ref : Case 4701)
bzr revid: jvo@tinyerp.com-20110328145127-qolzeo95odny4mqj
This commit is contained in:
parent
3bb8aef207
commit
66f72fcc06
|
@ -245,21 +245,22 @@ class mailgate_message(osv.osv):
|
|||
result = {}
|
||||
for message in self.browse(cr, uid, ids, context=context):
|
||||
msg_txt = ''
|
||||
msg_name = message.name
|
||||
if message.history:
|
||||
msg_txt += (message.email_from or '/') + _(' wrote on ') + format_date_tz(message.date, tz) + ':\n\t'
|
||||
if message.description:
|
||||
msg_txt += self.truncate_data(cr, uid, message.description, context=context)
|
||||
else:
|
||||
msg_txt = (message.user_id.name or '/') + _(' on ') + format_date_tz(message.date, tz) + ':\n\t'
|
||||
if message.name == _('Opportunity'):
|
||||
if msg_name == _('Opportunity'):
|
||||
msg_txt += _("Converted to Opportunity")
|
||||
elif message.name == _('Note'):
|
||||
elif msg_name == _('Note'):
|
||||
msg_txt = (message.user_id.name or '/') + _(' added note on ') + format_date_tz(message.date, tz) + ':\n\t'
|
||||
msg_txt += self.truncate_data(cr, uid, message.description, context=context)
|
||||
elif message.name == _('Stage'):
|
||||
elif msg_name == _('Stage'):
|
||||
msg_txt += _("Changed Stage to: ") + message.description
|
||||
else:
|
||||
msg_txt += _("Changed Status to: ") + message.name
|
||||
elif msg_name:
|
||||
msg_txt += _("Changed Status to: ") + msg_name
|
||||
result[message.id] = msg_txt
|
||||
return result
|
||||
|
||||
|
|
Loading…
Reference in New Issue