[FIX] fields.py: Many2one fields only put valid values in cache
This commit is contained in:
parent
8e9c23235a
commit
9b670049b6
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue