[FIX] models: onchange on new records do not nullify fields from _inherits records
This commit is contained in:
parent
50ef63881a
commit
d68537022f
|
@ -5628,7 +5628,12 @@ class BaseModel(object):
|
|||
|
||||
# dummy assignment: trigger invalidations on the record
|
||||
for name in todo:
|
||||
record[name] = record[name]
|
||||
value = record[name]
|
||||
field = self._fields[name]
|
||||
if not field_name and field.type == 'many2one' and field.delegate and not value:
|
||||
# do not nullify all fields of parent record for new records
|
||||
continue
|
||||
record[name] = value
|
||||
|
||||
result = {'value': {}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue