Skip to content

Commit

Permalink
[FIX] project: fix rating_active default value
Browse files Browse the repository at this point in the history
The default value for `rating_active` on the `project.project` model
wasn't set properly to the settings value.

Closes odoo#73683

Task ID: 2602636

Signed-off-by: LTU-Odoo <[email protected]>
  • Loading branch information
Williambraecky committed Jul 14, 2021
1 parent 3e6b7df commit 268daa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/project/models/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _get_default_favorite_user_ids(self):

# rating fields
rating_request_deadline = fields.Datetime(compute='_compute_rating_request_deadline', store=True)
rating_active = fields.Boolean('Customer Ratings', default=True)
rating_active = fields.Boolean('Customer Ratings', default=lambda self: self.env.user.has_group('project.group_project_rating'))
rating_status = fields.Selection(
[('stage', 'Rating when changing stage'),
('periodic', 'Periodical Rating')
Expand Down

0 comments on commit 268daa2

Please sign in to comment.