Don't return changed many2one if the id is None
If the id is None, it is a temporary record which should not be considered as a value change. issue5190 review20601002
This commit is contained in:
1 parent
1a7c6c3a06
commit
2e37bf7852
1 file changed
+3
@@ -693,6 +693,9 @@ class ModelView(Model):
|
||||
if value:
|
||||
if isinstance(value, ModelStorage):
|
||||
changed['%s.rec_name' % fname] = value.rec_name
|
||||
if value.id is None:
|
||||
# Don't consider temporary instance as a change
|
||||
continue
|
||||
if field._type == 'reference':
|
||||
value = str(value)
|
||||
else:
|
||||
|
||||
Reference in new issue
Block a user