Skip to content

Commit

Permalink
[FIX] fields.py: Many2one fields only put valid values in cache
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl authored and beledouxdenis committed Nov 27, 2014
1 parent 8e9c232 commit 9b67004
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openerp/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,7 +1462,7 @@ def convert_to_cache(self, value, record, validate=True):
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:
Expand Down

0 comments on commit 9b67004

Please sign in to comment.