summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Morel <xmo@odoo.com>2020-01-29 08:44:47 +0000
committerXavier Morel <xmo@odoo.com>2020-02-04 12:42:35 +0000
commiteae19fc2cd3496d4b59e4d8029fcceb5eaa3a561 (patch)
tree0c3e20b4e9944f0732d93cee4083650cfa839e18
parent7ad955d5b1c7885affeb35a1b1420a035d227798 (diff)
[FIX] core: int() deprecation warning
__int__ should always return an integer, not a bool and not a completely unrelated type either.
-rw-r--r--odoo/models.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/models.py b/odoo/models.py
index 4b04263bba0..77ba7c8eaa3 100644
--- a/odoo/models.py
+++ b/odoo/models.py
@@ -5625,7 +5625,7 @@ Record ids: %(records)s
return set(self._ids) >= set(other._ids)
def __int__(self):
- return self.id
+ return self.id or 0
def __str__(self):
return "%s%s" % (self._name, getattr(self, '_ids', ""))