summaryrefslogtreecommitdiff
path: root/addons/analytic_user_function/analytic_user_function.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@openerp.com>2014-11-06 15:03:00 +0100
committerRaphael Collet <rco@openerp.com>2014-11-13 14:54:04 +0100
commite038fec696ea7029b2f66da36fdbf337c23a18d1 (patch)
treeaaca67b21b315bb40854027f4860bcfdca42486d /addons/analytic_user_function/analytic_user_function.py
parent552dab0dc858b2d36e6d7a90bbd46dfdb7d9a821 (diff)
[IMP] models: improve performance of _setup_fields()
There was an issue in _setup_fields(): the method invokes _inherits_reload(), which recomputes inherited fields, and invokes itself recursively on children models. This may be problematic if the children models have already been set up. This optimization avoids recursive calls of method _inherits_reload(). In _setup_fields(), first all parent models are set up, then their fields are inspected to determine inherited fields, and their setup is done. This scheme guarantees that inherited fields are computed once per model.
Diffstat (limited to 'addons/analytic_user_function/analytic_user_function.py')
0 files changed, 0 insertions, 0 deletions