From fe4cfef888b02236e094532fc9f9df23893d40a7 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Dufays Date: Mon, 18 Mar 2024 16:58:57 +0100 Subject: [PATCH] [FIX] hr_skills{_survey}: fix certification resume line end_date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit How to reproduce: - Install hr_skills_survey with demo data - As admin, in "Survey", create a simple certification with one question - Click on share and send it to Marc demo - As a public user, do the certification through the received link - As admin, go to "Employee" and got to "Reporting -> Certifications" - You will see the certification in red under "Marc Demo" This means that the certification is already expired and should not. When completing a certification (survey), a hr_resume_line is inserted in the database with a start_date and an end_date set to the completion date, causing the certification to be expired right away. We only do "cosmetic" correction here as the real fix will be done in master to avoid multiple upgrade: - to avoid existing certification to be displayed in red in the reporting view, we correct the display (by avoiding adding danger decoration to the line if the date_start equals the date_end). That correction won't avoid to find those certifications as expired as we can't correct the computed field as it is stored. Also, if the expiration_status column is shown (hidden by default), it will display expired on those certifications. - We do a similar correction in the display of the employee resume. Note: the end_date problem is anterior to v17 but the resume line expiration has been introduced in v17. Task-3389395 closes odoo/odoo#158047 Signed-off-by: Warnon Aurélien (awa) --- .../static/src/fields/resume_one2many/resume_one2many.xml | 4 +++- .../views/hr_employee_certification_views.xml | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/addons/hr_skills/static/src/fields/resume_one2many/resume_one2many.xml b/addons/hr_skills/static/src/fields/resume_one2many/resume_one2many.xml index 420fc243451..a2231aa39b8 100644 --- a/addons/hr_skills/static/src/fields/resume_one2many/resume_one2many.xml +++ b/addons/hr_skills/static/src/fields/resume_one2many/resume_one2many.xml @@ -40,7 +40,9 @@
- - Current + - + + Current

diff --git a/addons/hr_skills_survey/views/hr_employee_certification_views.xml b/addons/hr_skills_survey/views/hr_employee_certification_views.xml index 3cf1197b0f4..75cd936b68e 100644 --- a/addons/hr_skills_survey/views/hr_employee_certification_views.xml +++ b/addons/hr_skills_survey/views/hr_employee_certification_views.xml @@ -4,7 +4,7 @@ hr.resume.line