Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions hr_recruitment_ux/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
.. |company| replace:: ADHOC SA

.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png
:alt: ADHOC SA
:target: https://www.adhoc.com.ar

.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png

.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
:target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3

==================
HR Recruitment UX
==================

This module adds:

* Automatically archives applicants when they are added to a talent pool
* Per-vacancy rotting SLA: allows configuring specific "days to rot" on each job position,
overriding the stage threshold when needed. When enabled on a vacancy, applicants in that
position use the vacancy's threshold instead of the pipeline stage's.

Installation
============

To install this module, you need to:

#. Just install this module

Configuration
=============

To configure this module, you need to:

#. Nothing to configure

Usage
=====

To use this module, you need to:

#. Go to ...

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: http://runbot.adhoc.com.ar/

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/ingadhoc/hr/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smashing it by providing a detailed and welcomed feedback.

Credits
=======

Images
------

* |company| |icon|

Contributors
------------

Maintainer
----------

|company_logo|

This module is maintained by ADHOC SA.

To contribute to this module, please visit https://www.adhoc.com.ar.
3 changes: 3 additions & 0 deletions hr_recruitment_ux/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import models
39 changes: 39 additions & 0 deletions hr_recruitment_ux/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
##############################################################################
#
# Copyright (C) 2026 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "Recruitment UX",
"version": "19.0.1.0.0",
"category": "Human Resources",
"sequence": 14,
"author": "ADHOC SA",
"website": "www.adhoc.com.ar",
"license": "AGPL-3",
"summary": "",
"depends": [
"hr_recruitment",
],
"data": [
"views/hr_job_views.xml",
],
"demo": [],
"installable": True,
"auto_install": True,
"application": False,
}
5 changes: 5 additions & 0 deletions hr_recruitment_ux/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from . import hr_applicant
from . import hr_job
from . import talent_pool_add_applicants
32 changes: 32 additions & 0 deletions hr_recruitment_ux/models/hr_applicant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from datetime import timedelta

from odoo import api, models


class HrApplicant(models.Model):
_inherit = "hr.applicant"

def _get_rotting_depends_fields(self):
return super()._get_rotting_depends_fields() + [
"job_id.use_rotting_per_job",
"job_id.rotting_threshold_days",
]

@api.depends(lambda self: self._get_rotting_depends_fields())
def _compute_rotting(self):
super()._compute_rotting()
now = self.env.cr.now()
per_job = self.filtered(
lambda r: r.job_id.use_rotting_per_job and r.application_status == "ongoing" and not r.date_closed
)
for applicant in per_job:
threshold = applicant.job_id.rotting_threshold_days
date_ref = applicant.date_last_stage_update or applicant.create_date
if threshold and date_ref and (date_ref + timedelta(days=threshold)) < now:
applicant.is_rotting = True
applicant.rotting_days = (now - date_ref).days
else:
applicant.is_rotting = False
applicant.rotting_days = 0
20 changes: 20 additions & 0 deletions hr_recruitment_ux/models/hr_job.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class HrJob(models.Model):
_inherit = "hr.job"

use_rotting_per_job = fields.Boolean(
string="Usar días para deteriorarse por vacante",
help="Cuando está activo, los días para deteriorarse se configuran a nivel de vacante "
"en lugar de usar los días configurados en la etapa.",
)
rotting_threshold_days = fields.Integer(
string="Días para deteriorarse",
default=0,
help="Cantidad de días antes de que los postulantes de esta vacante se deterioren. "
"Se usa solo cuando 'Usar días para deteriorarse por vacante' está activo. "
"0 = sin deterioro para esta vacante.",
)
13 changes: 13 additions & 0 deletions hr_recruitment_ux/models/talent_pool_add_applicants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class TalentPoolAddApplicants(models.TransientModel):
_inherit = "talent.pool.add.applicants"

def action_add_applicants_to_pool(self):
result = super().action_add_applicants_to_pool()
# Archive the original applicants after adding them to the talent pool
self.applicant_ids.write({"active": False})
return result
17 changes: 17 additions & 0 deletions hr_recruitment_ux/views/hr_job_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<record model="ir.ui.view" id="hr_job_form_inherit_recruitment_ux">
<field name="name">hr.job.form.inherit.recruitment.ux</field>
<field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml">
<group name="hiring_process" position="inside">
<field name="use_rotting_per_job"/>
<field name="rotting_threshold_days"
invisible="not use_rotting_per_job"/>
</group>
</field>
</record>

</odoo>
Loading