orm: refactor orm.default_get() to avoid redundant computations

Bug #795443 reported by xrg
6
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.

Tags: orm

Related branches

xrg (xrg)
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.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.