[FIX] core: onchange() snapshot should only contain expected fields
This fixes an issue with an override of onchange() on account.asset, which asks for less fields to be considered in the snapshot. This also guarantees that onchange() does not return values for unexpected fields. Part-of: odoo/odoo#116779
This commit is contained in:
+2
-1
@@ -6484,7 +6484,8 @@ class BaseModel(metaclass=MetaModel):
|
||||
|
||||
# update snapshot0 with changed values
|
||||
for name in names:
|
||||
snapshot0.fetch(name)
|
||||
if name in nametree:
|
||||
snapshot0.fetch(name)
|
||||
|
||||
# Determine which field(s) should be triggered an onchange. On the first
|
||||
# call, 'names' only contains fields with a default. If 'self' is a new
|
||||
|
||||
Reference in New Issue
Block a user