From ad5b2a277b7782b4db555a41d2fe65032c5a4f74 Mon Sep 17 00:00:00 2001 From: Dossogne Bertrand Date: Tue, 10 May 2022 10:20:53 +0000 Subject: [PATCH] [IMP] hr_recruitment: improve reports clarity This commit aims to improve the recruitment reports clarity, particularly the confusion between source and medium TaskID : 2837445 closes odoo/odoo#90975 Related: odoo/enterprise#27148 Signed-off-by: Kevin Baptiste --- .../hr_recruitment/models/hr_recruitment.py | 1 + .../views/hr_recruitment_views.xml | 54 ++++++++++++------- .../models/hr_recruitment.py | 2 +- 3 files changed, 36 insertions(+), 21 deletions(-) diff --git a/addons/hr_recruitment/models/hr_recruitment.py b/addons/hr_recruitment/models/hr_recruitment.py index dd9d5b6758e..a7d2f2917bc 100644 --- a/addons/hr_recruitment/models/hr_recruitment.py +++ b/addons/hr_recruitment/models/hr_recruitment.py @@ -29,6 +29,7 @@ class RecruitmentSource(models.Model): has_domain = fields.Char(compute='_compute_has_domain') job_id = fields.Many2one('hr.job', "Job", ondelete='cascade') alias_id = fields.Many2one('mail.alias', "Alias ID") + medium_id = fields.Many2one('utm.medium', default=lambda self: self.env.ref('utm.utm_medium_website')) def _compute_has_domain(self): self.has_domain = bool(self.env["ir.config_parameter"].sudo().get_param("mail.catchall.domain")) diff --git a/addons/hr_recruitment/views/hr_recruitment_views.xml b/addons/hr_recruitment/views/hr_recruitment_views.xml index f0e16ea1cf8..8fd69b2f930 100644 --- a/addons/hr_recruitment/views/hr_recruitment_views.xml +++ b/addons/hr_recruitment/views/hr_recruitment_views.xml @@ -144,8 +144,8 @@ - + @@ -994,23 +994,13 @@ +