c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #26165
[Bug 795443] [NEW] orm: refactor orm.default_get() to avoid redundant computations
Public bug reported:
In default_get(), we need to evaluate the default value of each field,
in an order of resolution. The previous implementation did all the passes
regardless of the result of the previous step, and then dict.update()
the results.
Now, resolve from most-significant to least, trying only the remaining
fields at each step.
Also, have a provision for totally ignoring defaults from ir.values,
because they should not be considered when loading initial data.
** Affects: openobject-server
Importance: Undecided
Assignee: xrg (xrg)
Status: Fix Committed
** Tags: orm
** Changed in: openobject-server
Status: New => In Progress
** Changed in: openobject-server
Assignee: (unassigned) => xrg (xrg)
** Branch linked: lp:~openerp-dev/openobject-server/trunk-bug-795443-xrg
** Changed in: openobject-server
Status: In Progress => Fix Committed
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/795443
Title:
orm: refactor orm.default_get() to avoid redundant computations
Status in OpenERP Server:
Fix Committed
Bug description:
In default_get(), we need to evaluate the default value of each field,
in an order of resolution. The previous implementation did all the passes
regardless of the result of the previous step, and then dict.update()
the results.
Now, resolve from most-significant to least, trying only the remaining
fields at each step.
Also, have a provision for totally ignoring defaults from ir.values,
because they should not be considered when loading initial data.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/795443/+subscriptions
Follow ups
References