orm: refactor orm.default_get() to avoid redundant computations
Bug #795443 reported by
xrg
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Server (MOVED TO GITHUB) |
Fix Committed
|
Undecided
|
xrg |
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.
Related branches
lp:~openerp-dev/openobject-server/trunk-bug-795443-xrg
On hold
for merging
into
lp:openobject-server
- Vo Minh Thu (community): Needs Information
-
Diff: 151 lines (+75/-54)1 file modifiedopenerp/osv/orm.py (+75/-54)
Changed in openobject-server: | |
assignee: | nobody → xrg (xrg) |
status: | New → In Progress |
status: | In Progress → Fix Committed |
To post a comment you must log in.