diff options
| author | Xavier Morel <xmo@odoo.com> | 2018-07-19 13:35:27 +0200 |
|---|---|---|
| committer | Xavier Morel <xmo@odoo.com> | 2018-07-19 13:37:10 +0200 |
| commit | 9f8eae34d1d89d7cf01eef8a1a89dc431ef5f4e2 (patch) | |
| tree | aea6469290c6969d941c729e47b6722781ef51db /addons/mail | |
| parent | bc12428e174dcba94d86e855cbeba0e77da9b747 (diff) | |
[FIX] undefined variables (potential nameerror)
Backport 9ec0455abc041b855dcab18e8e185baf806b9f14 and
6a601fe6dc848cdeca2ab8429210e3b5087275d9 as they fixed various
possible NameError but did so in later sub-releases.
Diffstat (limited to 'addons/mail')
| -rw-r--r-- | addons/mail/models/mail_channel.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mail/models/mail_channel.py b/addons/mail/models/mail_channel.py index cbbbfe855b3..8f701194494 100644 --- a/addons/mail/models/mail_channel.py +++ b/addons/mail/models/mail_channel.py @@ -4,7 +4,7 @@ import base64 from email.utils import formataddr import re -import uuid +from uuid import uuid4 from odoo import _, api, fields, models, modules, tools from odoo.exceptions import UserError @@ -56,7 +56,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(), copy=False) + uuid = fields.Char('UUID', size=50, index=True, default=lambda self: str(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') |
