From 0ed38652a408b20decf0671806fd58a6dcfd15c0 Mon Sep 17 00:00:00 2001 From: "Cedric Prieels (cpr)" Date: Mon, 10 May 2021 13:13:12 +0000 Subject: [PATCH] [IMP] project: improve globally the UX The UX of the 4 main views (kanban, form, list, portal) of the project app has been globally improved. In particular, different icons color/style were changed along with several strings, and the order of a few elements was revised to improve readability. task-2508723 See odoo/enterprise#18387 closes odoo/odoo#71011 Related: odoo/upgrade#2506 Signed-off-by: LTU-Odoo --- addons/hr_timesheet/views/project_views.xml | 8 +- addons/pad_project/__manifest__.py | 1 - addons/pad_project/models/project.py | 24 ----- .../views/project_portal_templates.xml | 34 ------- addons/pad_project/views/project_views.xml | 6 -- addons/project/models/project.py | 15 ++- .../static/src/scss/project_dashboard.scss | 14 +++ .../views/project_portal_templates.xml | 30 +++--- addons/project/views/project_views.xml | 96 +++++++++---------- .../sale_project/views/project_task_views.xml | 14 ++- .../static/tests/tours/sale_timesheet_tour.js | 6 +- .../views/project_task_views.xml | 19 ++-- 12 files changed, 116 insertions(+), 151 deletions(-) delete mode 100644 addons/pad_project/views/project_portal_templates.xml diff --git a/addons/hr_timesheet/views/project_views.xml b/addons/hr_timesheet/views/project_views.xml index ab241157ecd..3713a2b3662 100644 --- a/addons/hr_timesheet/views/project_views.xml +++ b/addons/hr_timesheet/views/project_views.xml @@ -24,7 +24,7 @@ 24 - + @@ -36,8 +36,8 @@ 24 -
- -
+
diff --git a/addons/pad_project/__manifest__.py b/addons/pad_project/__manifest__.py index f10cdf221eb..d1469662e00 100644 --- a/addons/pad_project/__manifest__.py +++ b/addons/pad_project/__manifest__.py @@ -15,7 +15,6 @@ This module adds a PAD in all project form views. 'data': [ 'views/res_config_settings_views.xml', 'views/project_views.xml', - 'views/project_portal_templates.xml', ], 'auto_install': True, 'assets': { diff --git a/addons/pad_project/models/project.py b/addons/pad_project/models/project.py index c3392a7d243..70738c95024 100644 --- a/addons/pad_project/models/project.py +++ b/addons/pad_project/models/project.py @@ -11,10 +11,6 @@ class ProjectTask(models.Model): description_pad = fields.Char('Pad URL', pad_content_field='description', copy=False) use_pad = fields.Boolean(related="project_id.use_pads", string="Use collaborative pad", readonly=True) - pad_availability = fields.Selection( - related="project_id.pad_availability", - string="Availability of collaborative pads", - readonly=True) @api.onchange('use_pad') def _onchange_use_pads(self): @@ -36,14 +32,6 @@ class ProjectTask(models.Model): self = self.with_context(pad_no_create=True) return super(ProjectTask, self).create(vals) - def _use_portal_pad(self): - """ - Indicates if the task configuration requires to provide - an access to a portal pad. - """ - self.ensure_one() - return self.use_pad and self.pad_availability == 'portal' - def _get_pad_content(self): """ Gets the content of the pad used to edit the task description @@ -61,15 +49,3 @@ class ProjectProject(models.Model): description_pad = fields.Char('Pad URL', pad_content_field='description', copy=False) use_pads = fields.Boolean("Use collaborative pads", default=True, help="Use collaborative pad for the tasks on this project.") - - pad_availability = fields.Selection([ - ('internal', 'Internal Users'), - ('portal', 'Internal Users & Portal Users') - ], compute='_compute_pad_availability', store=True, readonly=False, - string='Availability of collaborative pads', required=True, default='internal') - - @api.depends('use_pads', 'privacy_visibility') - def _compute_pad_availability(self): - for project in self: - if project.privacy_visibility != 'portal' or not project.use_pads: - project.pad_availability = 'internal' diff --git a/addons/pad_project/views/project_portal_templates.xml b/addons/pad_project/views/project_portal_templates.xml deleted file mode 100644 index 534e8fa2bf4..00000000000 --- a/addons/pad_project/views/project_portal_templates.xml +++ /dev/null @@ -1,34 +0,0 @@ - - -