Merge lp:~0k.io/openobject-server/use-priority-attribute-for-store-function into lp:openobject-server
Proposed by
Valentin Lab
Status: | Needs review |
---|---|
Proposed branch: | lp:~0k.io/openobject-server/use-priority-attribute-for-store-function |
Merge into: | lp:openobject-server |
Diff against target: |
12 lines (+1/-1) 1 file modified
openerp/osv/orm.py (+1/-1) |
To merge this branch: | bzr merge lp:~0k.io/openobject-server/use-priority-attribute-for-store-function |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Trigaux (OpenERP) (community) | Needs Information | ||
Review via email: mp+171499@code.launchpad.net |
Description of the change
The priority attribute for field is not used for stored function fields. And as I have several function that rely upon each others, I would like to use it to force their order of calculation, this involves replacing a hardwritten default of "10" for the priority by the currently existing 'priority' attribute.
Is this wrong ? Thanks.
To post a comment you must log in.
Unmerged revisions
- 4912. By Valentin Lab
-
new: use ``priority`` attribute for priorisation of store function.
Hello,
Not sure I got what you want to achieve. There is no priority attribute on the field definition. The 10 value is when you don't define any trigger, so the priority does not really apply here.
When you define several triggers, you can set a priority. For instance look at the definition of the field planned_hours in the model project.project
'planned_hours': fields. function( _progress_ rate, multi="progress", string='Planned Time', help="Sum of planned hours of all tasks related to this project and its child projects.",
'project. project' : (_get_project_ and_parents, ['tasks', 'parent_id', 'child_ids'], 10),
'project. task': (_get_projects_ from_tasks, ['planned_hours', 'remaining_hours', 'work_ids', 'state'], 20),
store = {
}),