Skip to content
Snippets Groups Projects
Commit de27e197 authored by Christophe Simonis's avatar Christophe Simonis Committed by Denis Ledoux
Browse files

[FIX] fields.py: in many2one convert_to_cache, value can be int but long as well

parent 5f47fc84
No related branches found
No related tags found
No related merge requests found
...@@ -1451,7 +1451,7 @@ class Many2one(_Relational): ...@@ -1451,7 +1451,7 @@ class Many2one(_Relational):
records._cache[self] = value records._cache[self] = value
def convert_to_cache(self, value, record, validate=True): 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) return record.env[self.comodel_name].browse(value)
if isinstance(value, BaseModel): if isinstance(value, BaseModel):
if value._name == self.comodel_name and len(value) <= 1: if value._name == self.comodel_name and len(value) <= 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment