[IMP] hr: in plan, display activity name when raising the error about unassigned activity

Before this commit, the user was not aware of the activity for which
configuration is missing. In this commit, we display `Activity name` in the
warning to helpfixing configuration.

Based on Feedback at https://github.com/odoo/odoo/pull/44922#issuecomment-584057134

closes odoo/odoo#50529

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Swapnesh Shah
2020-05-06 06:24:51 +00:00
committed by Thibault Delavallée
parent 3c2a2f7aa3
commit e3b4eac59b
+1 -1
View File
@@ -51,7 +51,7 @@ class HrPlanActivityType(models.Model):
elif self.responsible == 'other':
responsible = self.responsible_id
if not responsible:
raise UserError(_('No specific user given on activity.'))
raise UserError(_('No specific user given on activity %s.') % self.activity_type_id.name)
return responsible