diff --git a/addons/mail/models/mail_channel_partner.py b/addons/mail/models/mail_channel_partner.py index c9cf5275982..b65fede4643 100644 --- a/addons/mail/models/mail_channel_partner.py +++ b/addons/mail/models/mail_channel_partner.py @@ -11,7 +11,6 @@ class ChannelPartner(models.Model): _name = 'mail.channel.partner' _description = 'Listeners of a Channel' _table = 'mail_channel_partner' - _rec_name = 'partner_id' # identity partner_id = fields.Many2one('res.partner', string='Recipient', ondelete='cascade', readonly=True, index=True) @@ -29,6 +28,9 @@ class ChannelPartner(models.Model): last_interest_dt = fields.Datetime("Last Interest", default=fields.Datetime.now, help="Contains the date and time of the last interesting event that happened in this channel for this partner. This includes: creating, joining, pinning, and new message posted.") rtc_inviting_session_id = fields.Many2one('mail.channel.rtc.session', string='Ringing session') + def name_get(self): + return [(record.id, record.partner_id.name or record.guest_id.name) for record in self] + def _remove_rtc_invitation(self): """ Removes the invitation to the rtc call and notifies the inviting partner if removed. """ notifications = [] diff --git a/addons/mail/views/mail_channel_partner_views.xml b/addons/mail/views/mail_channel_partner_views.xml index f48f416f642..32bb2891da7 100644 --- a/addons/mail/views/mail_channel_partner_views.xml +++ b/addons/mail/views/mail_channel_partner_views.xml @@ -7,7 +7,7 @@ 10 - + @@ -22,6 +22,7 @@ +