Merge lp:~openerp-dev/openobject-server/trunk-bug-795443-xrg into lp:openobject-server
Proposed by
xrg
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~openerp-dev/openobject-server/trunk-bug-795443-xrg | ||||
Merge into: | lp:openobject-server | ||||
Diff against target: |
151 lines (+75/-54) 1 file modified
openerp/osv/orm.py (+75/-54) |
||||
To merge this branch: | bzr merge lp:~openerp-dev/openobject-server/trunk-bug-795443-xrg | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Vo Minh Thu (community) | Needs Information | ||
Review via email: mp+64133@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 3453. By OpenERP buildbot
-
orm: refactor orm.default_get() to avoid redundant computations
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.
(cherry picked from commit ad2cc4f179bbcfd455d8f08a8b7758 ca375a1b89)
I don't understand why the default_props is used after the _inherits.keys() lookup (i.e. why default_pros is not in remaining_fields).