[FIX] fields.py: Many2one fields only put valid values in cache

This commit is contained in:
Christophe Simonis 2014-11-27 17:03:29 +01:00 committed by Denis Ledoux
parent 8e9c23235a
commit 9b670049b6
1 changed files with 1 additions and 1 deletions

View File

@ -1462,7 +1462,7 @@ class Many2one(_Relational):
elif isinstance(value, dict):
return record.env[self.comodel_name].new(value)
else:
return record.env[self.comodel_name].browse(value)
return self.null(record.env)
def convert_to_read(self, value, use_name_get=True):
if use_name_get and value: