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.",
store = { '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),
}),
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 = {
}),