Skip to content

Commit

Permalink
Merge PR #1343 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by max3903
  • Loading branch information
OCA-git-bot committed Oct 8, 2024
2 parents 4046296 + 9862f9d commit 03cb683
Show file tree
Hide file tree
Showing 12 changed files with 214 additions and 0 deletions.
99 changes: 99 additions & 0 deletions hr_employee_document_from_applicant/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
===================================
HR Employee Document from Applicant
===================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:f3e7c9fb6aaa448db3c633a73aefd374a333797c7857828e5c195c18c2823f1c
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/16.0/hr_employee_document_from_applicant
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_document_from_applicant
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=16.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to move all the documents attached to a candidate to
the employee when the candidate is hired.

**Table of contents**

.. contents::
:local:

Usage
=====

* Go to Recruitment
* Create a job position and a candidate
* Attach documents to the candidate
* Move the candidate through the recruitment process until the "Create
employee" button appears to click on it
* Go to the newly created employee: all the documents of the candidate are
available

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_employee_document_from_applicant%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Open Source Integrators

Contributors
~~~~~~~~~~~~

* `Open Source Integrators <https://www.opensourceintegrators.com/>`__

* Samuel Macias Oropeza <[email protected]>
* Maxime Chambreuil <[email protected]>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

.. |maintainer-ursais| image:: https://github.com/ursais.png?size=40px
:target: https://github.com/ursais
:alt: ursais

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-ursais|

This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/16.0/hr_employee_document_from_applicant>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions hr_employee_document_from_applicant/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2024 Open Source Integrators (https://www.opensourceintegrators.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
15 changes: 15 additions & 0 deletions hr_employee_document_from_applicant/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (C) 2024 Open Source Integrators (https://www.opensourceintegrators.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "HR Employee Document from Applicant",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"summary": "HR Employee Document from Applicant",
"author": "Odoo Community Association (OCA), Open Source Integrators",
"maintainer": "Open Source Integrators",
"website": "https://github.com/OCA/hr",
"depends": ["hr_employee_document", "hr_recruitment"],
"data": [],
"maintainers": ["ursais"],
}
21 changes: 21 additions & 0 deletions hr_employee_document_from_applicant/i18n/es_MX.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_document_from_applicant
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20230816\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-23 18:00+0000\n"
"PO-Revision-Date: 2024-04-23 18:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_employee_document_from_applicant
#: model:ir.model,name:hr_employee_document_from_applicant.model_hr_employee
msgid "Employee"
msgstr "Empleado"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_document_from_applicant
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e-20230816\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-04-23 18:00+0000\n"
"PO-Revision-Date: 2024-04-23 18:00+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_employee_document_from_applicant
#: model:ir.model,name:hr_employee_document_from_applicant.model_hr_employee
msgid "Employee"
msgstr ""
4 changes: 4 additions & 0 deletions hr_employee_document_from_applicant/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (C) 2024 Open Source Integrators (https://www.opensourceintegrators.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import hr_employee
30 changes: 30 additions & 0 deletions hr_employee_document_from_applicant/models/hr_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (C) 2024 Open Source Integrators (https://www.opensourceintegrators.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).


from odoo import api, models


class HrEmployee(models.Model):
_inherit = "hr.employee"

@api.model_create_multi
def create(self, vals_list):
employees = super().create(vals_list)
for employee in employees:
if employee.applicant_id:
irAttachments = (
self.env["ir.attachment"]
.sudo()
.search(
[
("res_model", "=", "hr.applicant"),
("res_id", "=", employee.applicant_id.id),
]
)
)
for attachment in irAttachments:
attachment.write(
{"res_model": "hr.employee", "res_id": employee.id}
)
return employees
4 changes: 4 additions & 0 deletions hr_employee_document_from_applicant/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* `Open Source Integrators <https://www.opensourceintegrators.com/>`__

* Samuel Macias Oropeza <[email protected]>
* Maxime Chambreuil <[email protected]>
2 changes: 2 additions & 0 deletions hr_employee_document_from_applicant/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module allows you to move all the documents attached to a candidate to
the employee when the candidate is hired.
7 changes: 7 additions & 0 deletions hr_employee_document_from_applicant/readme/USAGE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
* Go to Recruitment
* Create a job position and a candidate
* Attach documents to the candidate
* Move the candidate through the recruitment process until the "Create
employee" button appears to click on it
* Go to the newly created employee: all the documents of the candidate are
available
6 changes: 6 additions & 0 deletions setup/hr_employee_document_from_applicant/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 03cb683

Please sign in to comment.