From e3b4eac59bc0ae4bddf48188e995f64e46246623 Mon Sep 17 00:00:00 2001 From: Swapnesh Shah Date: Sun, 3 May 2020 17:47:29 +0000 Subject: [PATCH] [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) --- addons/hr/models/hr_plan.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/hr/models/hr_plan.py b/addons/hr/models/hr_plan.py index 9eea7df474c..a9361f531ac 100644 --- a/addons/hr/models/hr_plan.py +++ b/addons/hr/models/hr_plan.py @@ -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