[FIX] Keep computed editable field value when playing onchanges

pull/2479/head
Florian da Costa 2022-07-18 17:28:25 +02:00 committed by Kevin Khao
parent cef6024413
commit c536dd77f0
1 changed files with 5 additions and 1 deletions

View File

@ -62,6 +62,10 @@ class Base(models.AbstractModel):
return {
f: v
for f, v in all_values.items()
if not (self._fields[f].compute and not self._fields[f].inverse)
if not (
self._fields[f].compute
and not self._fields[f].inverse
and self._fields[f].readonly
)
and (f in values or f in new_values or f in onchange_fields)
}