diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-01-30 15:03:16 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-02-03 14:38:20 +0000 |
| commit | eafa9f4abc751b07f2ecb67dbe029687278d1d52 (patch) | |
| tree | a44840b102a5b791af64e1da0430c1f71e8e57b6 /odoo/fields.py | |
| parent | 5a6165da847ca131d32135771100c1945d764ad4 (diff) | |
[FIX] *: python 3.8 compatibility
time.clock is deprecated since python 3.3 and no longer exists in python 3.8
time.process_time was introduced in python 3.3
Replace "is" by "==" as this produces a SyntaxWarning in python 3.8
Fixes odoo/odoo#41313
closes odoo/odoo#44502
X-original-commit: f03b4cb5576f264b6845242ba112f02422af4f5f
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index be1a765afed..a18e1f9fea6 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -3576,9 +3576,9 @@ class Id(Field): # the code below is written to make record.id as quick as possible ids = record._ids size = len(ids) - if size is 0: + if size == 0: return False - elif size is 1: + elif size == 1: return ids[0] raise ValueError("Expected singleton: %s" % record) |
