[FIX] mail: Don't duplicate uuid of mail channels.
If you duplicate a channel the UUID should not be copied, otherwise it might introduce security issues and the method 'channel_minimize' will fail with an "expected singleton error". Closes #23102
This commit is contained in:
committed by
jem-odoo
parent
7b29f410a5
commit
088d00f2a7
@@ -49,7 +49,7 @@ class Channel(models.Model):
|
||||
('channel', 'Channel')],
|
||||
'Channel Type', default='channel')
|
||||
description = fields.Text('Description')
|
||||
uuid = fields.Char('UUID', size=50, index=True, default=lambda self: '%s' % uuid.uuid4())
|
||||
uuid = fields.Char('UUID', size=50, index=True, default=lambda self: '%s' % uuid.uuid4(), copy=False)
|
||||
email_send = fields.Boolean('Send messages by email', default=False)
|
||||
# multi users channel
|
||||
channel_last_seen_partner_ids = fields.One2many('mail.channel.partner', 'channel_id', string='Last Seen')
|
||||
|
||||
Reference in New Issue
Block a user