diff --git a/addons/hr_timesheet/views/project_project_views.xml b/addons/hr_timesheet/views/project_project_views.xml index bc362c4cb42..a7cb218e029 100644 --- a/addons/hr_timesheet/views/project_project_views.xml +++ b/addons/hr_timesheet/views/project_project_views.xml @@ -65,8 +65,7 @@ - - +
- + diff --git a/addons/project/models/project_task.py b/addons/project/models/project_task.py index 84a912a00f4..4a79bd6348b 100644 --- a/addons/project/models/project_task.py +++ b/addons/project/models/project_task.py @@ -87,7 +87,7 @@ class Task(models.Model): project_id = self.env.context.get('default_project_id') if not project_id: return False - return self.stage_find(project_id, [('fold', '=', False)]) + return self.stage_find(project_id, order="fold, sequence, id") @api.model def _default_personal_stage_type_id(self): diff --git a/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.js b/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.js index 8718c981564..c32c84e56b2 100644 --- a/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.js +++ b/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.js @@ -20,11 +20,22 @@ export class ProjectStatusWithColorSelectionField extends SelectionField { return this.colors[value] ? this.colorPrefix + this.colors[value] : ""; } } + +ProjectStatusWithColorSelectionField.props = { + ...SelectionField.props, + statusLabel: { type: String, optional: true }, +}; + ProjectStatusWithColorSelectionField.template = 'project.ProjectStatusWithColorSelectionField'; export const projectStatusWithColorSelectionField = { ...selectionField, component: ProjectStatusWithColorSelectionField, + extractProps: (fieldInfo, dynamicInfo) => { + const props = selectionField.extractProps(fieldInfo, dynamicInfo); + props.statusLabel = fieldInfo.attrs.status_label; + return props; + }, }; registry.category("fields").add("status_with_color", projectStatusWithColorSelectionField); diff --git a/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.xml b/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.xml index e6c848648e8..46f605cee97 100644 --- a/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.xml +++ b/addons/project/static/src/components/project_status_with_color_selection/project_status_with_color_selection_field.xml @@ -4,8 +4,13 @@
- - +
+ +
+
+
+
+
diff --git a/addons/project/views/project_project_views.xml b/addons/project/views/project_project_views.xml index 86a20a1856a..ea8543ae806 100644 --- a/addons/project/views/project_project_views.xml +++ b/addons/project/views/project_project_views.xml @@ -29,15 +29,15 @@