This website works better with JavaScript.
Home
Explore
Help
Sign In
OCA
/
server-tools
Watch
5
Star
0
Fork
0
Code
Issues
Pull Requests
Releases
Wiki
Activity
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2327
Commits
13
Branches
0
Tags
45 MiB
Tree:
197a86d882
10.0
11.0
12.0
12.0-mig-module_prototyper
12.0-mig-module_prototyper_last
12.3
13.0
14.0
6.1
7.0
8.0
9.0
dav
Branches
Tags
${ item.name }
Create tag
${ searchTerm }
Create branch
${ searchTerm }
from '197a86d882'
${ noResults }
server-tools
/
test_onchange_helper
/
readme
/
CONTRIBUTORS.rst
0 lines
63 B
Raw
Normal View
History
[IMP] onchange_helper: Improve performance when called on an existing record Before this change, the inmemory record was populated from values copied from the exisitng record. It was no predictable to know in advance which values were required to correctly play onchange methods. Therefore all the values defined on the model were copied from the exising record to populate the inmemory record. The side effect of this approach was that in a lot of cases, a lot of useless values was copied leading to performance issue with computed fields. With this change, we use the current record to call the onchange methods in an onchange context to avoid direct write to the database each time a new value is assigned by an onchange. At the end of the process, we restore the current record to its original state and return a dictionary with only the fields modified by the onchange.
6 years ago
*
Laurent Mignon <laurent.mignon@acsone.eu> (https://acsone.eu)