Browse Source

[FIX] Update record_name in mail_message record

pull/36/head
x620 9 years ago
parent
commit
6a0eedd917
  1. 6
      mail_move_message/mail_move_message_models.py

6
mail_move_message/mail_move_message_models.py

@ -313,13 +313,17 @@ class mail_message(models.Model):
'res_model': r_vals.get('model') 'res_model': r_vals.get('model')
}) })
# Update record_name in message
record_name = self._get_record_name(vals)
for item in self:
item.record_name = record_name
# Send notification # Send notification
notification = { notification = {
'id': self.id, 'id': self.id,
'res_id': vals.get('res_id'), 'res_id': vals.get('res_id'),
'model': vals.get('model'), 'model': vals.get('model'),
'is_moved': vals['is_moved'], 'is_moved': vals['is_moved'],
'record_name': self._get_record_name(vals)
'record_name': record_name
} }
self.env['bus.bus'].sendone((self._cr.dbname, 'mail_move_message'), notification) self.env['bus.bus'].sendone((self._cr.dbname, 'mail_move_message'), notification)

Loading…
Cancel
Save