projects
/
odoo
/
odoo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5f47fc8
)
[FIX] fields.py: in many2one convert_to_cache, value can be int but long as well
author
Christophe Simonis
<chs@odoo.com>
Thu, 27 Nov 2014 16:05:48 +0000
(17:05 +0100)
committer
Denis Ledoux
<dle@odoo.com>
Thu, 27 Nov 2014 16:06:48 +0000
(17:06 +0100)
openerp/fields.py
patch
|
blob
|
history
diff --git
a/openerp/fields.py
b/openerp/fields.py
index
580cfd0
..
67c7991
100644
(file)
--- a/
openerp/fields.py
+++ b/
openerp/fields.py
@@
-1451,7
+1451,7
@@
class Many2one(_Relational):
records._cache[self] = value
def convert_to_cache(self, value, record, validate=True):
- if isinstance(value, (NoneType, int)):
+ if isinstance(value, (NoneType, int, long)):
return record.env[self.comodel_name].browse(value)
if isinstance(value, BaseModel):
if value._name == self.comodel_name and len(value) <= 1: