[IMP] models: small optimization in onchange

closes odoo/odoo#84865

Signed-off-by: Vincent Schippefilt (vsc) <vsc@odoo.com>
This commit is contained in:
Pouya Malekinejad
2022-02-22 16:16:24 +00:00
parent e5523f06ce
commit b843407fed
+3 -3
View File
@@ -6525,6 +6525,9 @@ Fields:
record._onchange_eval(name, field_onchange[name], result)
done.add(name)
if not env.context.get('recursive_onchanges', True):
break
# determine which fields to process for the next pass
todo = [
name
@@ -6532,9 +6535,6 @@ Fields:
if name not in done and snapshot0.has_changed(name)
]
if not env.context.get('recursive_onchanges', True):
todo = []
# make the snapshot with the final values of record
snapshot1 = Snapshot(record, nametree)