From c5dd03ffee8d00dc555d56fa18f2d2267cc3b2b7 Mon Sep 17 00:00:00 2001 From: "Abderraouf Ghrissi (abgh)" Date: Fri, 17 Mar 2023 13:07:00 +0000 Subject: [PATCH] [FIX] project: review UX and UI in Project app This commit reviews the UX and UI in Project app and improves the usability of the new features recently added (subtasks list in kanban card, state field replacing kanban_state field, etc). The following changes are made in this commit: - swap of user_id icon in the kanban box and the removal of the allow_unassign field and setting - change the ordering of the fields in the subtask list - make small layout changes in the project.task and project.project kanban cards - remove the "lock-icon private" sub-title of private tasks, replace it with a little lock icon on the bottom right icons of the kanban card. - remove the break tag in the project.task kanban card that was unecessary given the new display and margin style settings - lock icon is bigger - kanban icons are better aligned - state is as big as avatar - remove the 'remaining hours on SO' field - deadline field will be optional and hidden by default in project.task list view - remove the rating field - add stage field as optional in project.task list views - priority and state fields will no longer be optional - stage_id will be copied when duplicating a task, except when the task is generated through the recurrence - remove the tooltip of the tag_ids field - When duplicating a task having sub-tasks, '(copy)' is no longer added to the name of the sub-tasks of this task. - project.task kanban view: * (+ x tasks) mention next to the name is removed * The caret is replaced with 'fa-check-square-o x/y' which will represent the number of sub-tasks closed compared to the total number of sub-tasks * Only open subtasks are displayed * When changing the state of a sub-task to a closing one, the sub-task is muted and removed from the list on the view reload * The name of the parent task on the kanban card of sub-tasks is displayed except when viewing the sub-tasks of a particular task through the sub-tasks stat button * project.project kanban view: the fa-check-square-o icon of milestones is replaced with fa-flag-o * project.task kanban card: the fa-play and fa-pause icons are moved on the right of the remaining hours widge. * Allow users to edit the stage_id in batch from the list view of tasks if all of the selected tasks are part of the same project. * the state will have the same size as the avatar * change the opacity of the tasks that are closed * state is at the right of subtask list * the striked should be replaced by the opacity on the kanban card Enterprise PR: odoo/enterprise#38132 Task-3229873 closes odoo/odoo#116628 X-original-commit: 09b5d5843096d27b5a4ab0f603ad44bdb2e74723 Related: odoo/upgrade#4478 Related: odoo/enterprise#38771 Signed-off-by: Xavier Bol (xbo) Co-authored-by: Panagiotis Kyriakou Co-authored-by: Bastien (bvdn) --- addons/hr_timesheet/models/project_task.py | 1 - .../hr_timesheet/views/hr_timesheet_views.xml | 4 +- .../views/project_task_sharing_views.xml | 12 +- .../hr_timesheet/views/project_task_views.xml | 27 ++-- addons/project/models/project_project.py | 1 - addons/project/models/project_task.py | 43 +++--- .../project/models/project_task_recurrence.py | 7 +- addons/project/models/res_config_settings.py | 2 - addons/project/security/project_security.xml | 5 - ...task_name_with_subtask_count_char_field.js | 5 +- ...ask_name_with_subtask_count_char_field.xml | 6 - .../project_task_state_selection.js | 8 +- .../project_task_state_selection.scss | 53 ++++++-- .../project_task_state_selection.xml | 14 +- .../subtask_kanban_list.js | 17 ++- .../subtask_kanban_list.scss | 3 +- .../subtask_kanban_list.xml | 16 +-- .../static/src/scss/project_widgets.scss | 8 ++ .../project_task_kanban_compiler.js | 2 - .../project_task_kanban_view.scss | 7 + .../project_task_list_renderer.js | 18 +++ .../project_task_list_view.js | 2 + .../project_subtask_kanban_list_tests.js | 22 +-- addons/project/tests/test_multicompany.py | 16 +-- addons/project/tests/test_project_config.py | 1 - addons/project/tests/test_project_sharing.py | 4 - addons/project/tests/test_project_subtasks.py | 45 +++---- .../project/tests/test_task_dependencies.py | 1 - .../project/views/project_project_views.xml | 9 +- .../project_sharing_project_task_views.xml | 9 +- addons/project/views/project_task_views.xml | 127 ++++++++++-------- .../views/res_config_settings_views.xml | 3 - .../views/project_task_views.xml | 23 +--- 33 files changed, 274 insertions(+), 247 deletions(-) create mode 100644 addons/project/static/src/views/project_task_list/project_task_list_renderer.js diff --git a/addons/hr_timesheet/models/project_task.py b/addons/hr_timesheet/models/project_task.py index 15e2a5e229f..4479b766aac 100644 --- a/addons/hr_timesheet/models/project_task.py +++ b/addons/hr_timesheet/models/project_task.py @@ -7,7 +7,6 @@ from odoo.exceptions import UserError, RedirectWarning from odoo.addons.rating.models.rating_data import OPERATOR_MAPPING PROJECT_TASK_READABLE_FIELDS = { - 'allow_subtasks', 'allow_timesheets', 'analytic_account_active', 'effective_hours', diff --git a/addons/hr_timesheet/views/hr_timesheet_views.xml b/addons/hr_timesheet/views/hr_timesheet_views.xml index 6d80944bb43..5419a14179a 100644 --- a/addons/hr_timesheet/views/hr_timesheet_views.xml +++ b/addons/hr_timesheet/views/hr_timesheet_views.xml @@ -167,7 +167,7 @@ - + @@ -176,7 +176,7 @@ - + diff --git a/addons/hr_timesheet/views/project_task_sharing_views.xml b/addons/hr_timesheet/views/project_task_sharing_views.xml index 2b590d785fd..a0ce37d1b15 100644 --- a/addons/hr_timesheet/views/project_task_sharing_views.xml +++ b/addons/hr_timesheet/views/project_task_sharing_views.xml @@ -20,8 +20,8 @@