[FIX] undefined variables (potential nameerror)
Backport9ec0455abcand6a601fe6dcas they fixed various possible NameError but did so in later sub-releases.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from odoo import api
|
||||
from odoo.addons.account.tests.account_test_classes import AccountingTestCase
|
||||
import time
|
||||
import unittest
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from odoo import models, fields, api
|
||||
from odoo import models, fields, api, _
|
||||
from odoo.exceptions import UserError
|
||||
|
||||
|
||||
class IrModelFields(models.Model):
|
||||
|
||||
@@ -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')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
import uuid
|
||||
from uuid import uuid4
|
||||
|
||||
from odoo import api, fields, models, _
|
||||
from odoo.exceptions import ValidationError
|
||||
@@ -110,7 +110,7 @@ class PosConfig(models.Model):
|
||||
proxy_ip = fields.Char(string='IP Address', size=45,
|
||||
help='The hostname or ip address of the hardware proxy, Will be autodetected if left empty.')
|
||||
active = fields.Boolean(default=True)
|
||||
uuid = fields.Char(readonly=True, default=lambda self: str(uuid.uuid4()),
|
||||
uuid = fields.Char(readonly=True, default=lambda self: str(uuid4()),
|
||||
help='A globally unique identifier for this pos configuration, used to prevent conflicts in client-generated data.')
|
||||
sequence_id = fields.Many2one('ir.sequence', string='Order IDs Sequence', readonly=True,
|
||||
help="This sequence is automatically created by Odoo but you can change it "
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import api, models
|
||||
from odoo import api, models, fields
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
Reference in New Issue
Block a user