@@ -394,12 +397,12 @@
hr_timesheet_graphview
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/addons/project/models/project.py b/addons/project/models/project.py
index 7abffa31fa0..ab6204a2f21 100644
--- a/addons/project/models/project.py
+++ b/addons/project/models/project.py
@@ -364,6 +364,7 @@ class Project(models.Model):
# rating fields
rating_request_deadline = fields.Datetime(compute='_compute_rating_request_deadline', store=True)
rating_active = fields.Boolean('Customer Ratings', default=lambda self: self.env.user.has_group('project.group_project_rating'))
+ allow_rating = fields.Boolean('Allow Customer Ratings', compute="_compute_allow_rating", default=lambda self: self.env.user.has_group('project.group_project_rating'))
rating_status = fields.Selection(
[('stage', 'Rating when changing stage'),
('periodic', 'Periodic rating')
@@ -445,6 +446,10 @@ class Project(models.Model):
project.access_warning = _(
"The project cannot be shared with the recipient(s) because the privacy of the project is too restricted. Set the privacy to 'Visible by following customers' in order to make it accessible by the recipient(s).")
+ @api.depends_context('uid')
+ def _compute_allow_rating(self):
+ self.allow_rating = self.env.user.has_group('project.group_project_rating')
+
@api.depends('rating_status', 'rating_status_period')
def _compute_rating_request_deadline(self):
periods = {'daily': 1, 'weekly': 7, 'bimonthly': 15, 'monthly': 30, 'quarterly': 90, 'yearly': 365}
@@ -1341,6 +1346,14 @@ class Task(models.Model):
else:
return [('project_id', '!=', False)]
+ @api.model
+ def _get_view(self, view_id=None, view_type='form', **options):
+ arch, view = super()._get_view(view_id, view_type, **options)
+ if view_type == 'search' and self.env.user.notification_type == 'email':
+ for node in arch.xpath("//filter[@name='message_needaction']"):
+ node.set('invisible', '1')
+ return arch, view
+
@api.depends('parent_id.ancestor_id')
def _compute_ancestor_id(self):
for task in self:
diff --git a/addons/project/report/project_report_views.xml b/addons/project/report/project_report_views.xml
index e2e57c5f0a8..ba99ba96f3d 100644
--- a/addons/project/report/project_report_views.xml
+++ b/addons/project/report/project_report_views.xml
@@ -48,10 +48,10 @@
+
-
@@ -93,7 +93,7 @@
-
+
diff --git a/addons/project/views/project_update_views.xml b/addons/project/views/project_update_views.xml
index cdf2206bb99..e152f750817 100644
--- a/addons/project/views/project_update_views.xml
+++ b/addons/project/views/project_update_views.xml
@@ -7,6 +7,9 @@
+
+
+
diff --git a/addons/project/views/project_views.xml b/addons/project/views/project_views.xml
index fc61e38ac91..9f8fb12bb60 100644
--- a/addons/project/views/project_views.xml
+++ b/addons/project/views/project_views.xml
@@ -19,11 +19,10 @@
-
+
-
@@ -69,7 +68,7 @@
-
+
@@ -86,11 +85,20 @@
primary
-
+
+
+
+
+
+
+
+
+
+
@@ -539,75 +547,85 @@
-
-
-
-
-
-
-
-
- Get customer feedback
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
+ Split your tasks to organize your work into sub-milestones
+
+
+
+
+
+
+
+
+
+
+ Auto-generate tasks for regular activities
+
+
+
+
+
+
+
+
+
+
+ Determine the order in which to perform tasks
+
+
+
+
+
+
+
+
+
+
+ Track major progress points that must be reached to achieve success
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Get customer feedback
+
+
-
-
-
-
-
-
-
-
- Split your tasks to organize your work into sub-milestones
-
-
-
-
-
-
-
-
-
-
- Auto-generate tasks for regular activities
-
-
-
-
-
-
-
-
-
-
- Determine the order in which to perform tasks
-
-
-
-
-
-
-
-
-
-
- Track major progress points that must be reached to achieve success
-
-
-
-
+
+
@@ -1172,7 +1190,7 @@
'default_partner_id': partner_id, 'default_milestone_id': allow_milestones and milestone_id, 'search_default_display_project_id': project_id }"
widget="many2many"
domain="['!', ('id', 'parent_of', id)]">
-
+
@@ -1210,7 +1228,7 @@
-
+
@@ -1575,7 +1593,7 @@
-
+
diff --git a/addons/rating/static/src/scss/rating_templates.scss b/addons/rating/static/src/scss/rating_templates.scss
index 65a62162bcf..0429aea41f6 100644
--- a/addons/rating/static/src/scss/rating_templates.scss
+++ b/addons/rating/static/src/scss/rating_templates.scss
@@ -28,4 +28,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/addons/sale_project/views/project_task_views.xml b/addons/sale_project/views/project_task_views.xml
index f02c4296d6c..a02a01e982b 100644
--- a/addons/sale_project/views/project_task_views.xml
+++ b/addons/sale_project/views/project_task_views.xml
@@ -39,18 +39,22 @@
{'always_reload': True}
{'res_partner_search_mode': 'customer'}
-
-
-
-
-
-
-
-
- Invoice your time and material to customers
+
+
+
+
+
+
+
+
+
+
+ Invoice your time and material to customers
+
+
-
+