Skip to content

Commit

Permalink
Merge PR #308 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by etobella
  • Loading branch information
OCA-git-bot committed Jun 17, 2024
2 parents 534ca27 + 17dc4e5 commit bae2801
Show file tree
Hide file tree
Showing 18 changed files with 725 additions and 0 deletions.
85 changes: 85 additions & 0 deletions hr_recruitment_phone/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
====================
HR Recruitment Phone
====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1a12acc7def0f216ab639594ac382e42d9e58af927170d661f49178228f0f4d8
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fconnector--telephony-lightgray.png?logo=github
:target: https://github.com/OCA/connector-telephony/tree/16.0/hr_recruitment_phone
:alt: OCA/connector-telephony
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/connector-telephony-16-0/connector-telephony-16-0-hr_recruitment_phone
: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/connector-telephony&target_branch=16.0
:alt: Try me on Runboat

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

This module validates phone numbers in the Applicant form of the *Recruitment* module, just like the
*phone_validation* module valide phone numbers in the Partner form. It also adds phone number lookup on applicants on incoming calls.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/connector-telephony/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/connector-telephony/issues/new?body=module:%20hr_recruitment_phone%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
~~~~~~~

* Akretion

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

* Alexis de Lattre <[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-alexis-via| image:: https://github.com/alexis-via.png?size=40px
:target: https://github.com/alexis-via
:alt: alexis-via

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

|maintainer-alexis-via|

This module is part of the `OCA/connector-telephony <https://github.com/OCA/connector-telephony/tree/16.0/hr_recruitment_phone>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions hr_recruitment_phone/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions hr_recruitment_phone/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2014-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "HR Recruitment Phone",
"version": "16.0.1.0.0",
"category": "Phone",
"license": "AGPL-3",
"summary": "Validate phone numbers in HR Recruitment",
"author": "Akretion,Odoo Community Association (OCA)",
"maintainers": ["alexis-via"],
"website": "https://github.com/OCA/connector-telephony",
"depends": ["base_phone", "hr_recruitment"],
"data": [
"security/ir.model.access.csv",
],
"installable": True,
"auto_install": True,
}
40 changes: 40 additions & 0 deletions hr_recruitment_phone/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_recruitment_phone
#
# Translators:
# enjolras <[email protected]>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-10 01:41+0000\n"
"PO-Revision-Date: 2023-12-20 19:33+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_recruitment_phone
#: model:ir.model,name:hr_recruitment_phone.model_hr_applicant
msgid "Applicant"
msgstr "Solicitante"

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__display_name
msgid "Display Name"
msgstr "Mostrar Nombre"

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__id
msgid "ID"
msgstr "ID"

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant____last_update
msgid "Last Modified on"
msgstr "Última Modificación el"
34 changes: 34 additions & 0 deletions hr_recruitment_phone/i18n/hr_recruitment_phone.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_recruitment_phone
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \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_recruitment_phone
#: model:ir.model,name:hr_recruitment_phone.model_hr_applicant
msgid "Applicant"
msgstr ""

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__display_name
msgid "Display Name"
msgstr ""

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__id
msgid "ID"
msgstr ""

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant____last_update
msgid "Last Modified on"
msgstr ""
39 changes: 39 additions & 0 deletions hr_recruitment_phone/i18n/tr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_recruitment_phone
#
# Translators:
# Ediz Duman <[email protected]>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-05-01 16:29+0000\n"
"PO-Revision-Date: 2017-05-01 16:29+0000\n"
"Last-Translator: Ediz Duman <[email protected]>, 2017\n"
"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/tr/)\n"
"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"

#. module: hr_recruitment_phone
#: model:ir.model,name:hr_recruitment_phone.model_hr_applicant
msgid "Applicant"
msgstr "Başvuran"

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__display_name
msgid "Display Name"
msgstr ""

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant__id
msgid "ID"
msgstr ""

#. module: hr_recruitment_phone
#: model:ir.model.fields,field_description:hr_recruitment_phone.field_hr_applicant____last_update
msgid "Last Modified on"
msgstr ""
1 change: 1 addition & 0 deletions hr_recruitment_phone/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import hr_applicant
37 changes: 37 additions & 0 deletions hr_recruitment_phone/models/hr_applicant.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright 2012-2021 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models


class HrApplicant(models.Model):
_name = "hr.applicant"
_inherit = ["hr.applicant"]
_phone_name_sequence = 50
_phone_name_fields = ["partner_phone", "partner_mobile"]

@api.onchange("partner_phone")
def partner_phone_change(self):
if self.partner_phone:
self.partner_phone = self.phone_format(self.partner_phone)

@api.onchange("partner_mobile")
def partner_mobile_change(self):
if self.partner_mobile:
self.partner_mobile = self.phone_format(self.partner_mobile)

def name_get(self):
if self._context.get("callerid"):
res = []
for appl in self:
if appl.partner_id:
name = "%s (%s)" % (appl.partner_id.name, appl.name)
elif appl.partner_name:
name = "%s (%s)" % (appl.partner_name, appl.name)
else:
name = appl.name
res.append((appl.id, name))
return res
else:
return super().name_get()
1 change: 1 addition & 0 deletions hr_recruitment_phone/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Alexis de Lattre <[email protected]>
2 changes: 2 additions & 0 deletions hr_recruitment_phone/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module validates phone numbers in the Applicant form of the *Recruitment* module, just like the
*phone_validation* module valide phone numbers in the Partner form. It also adds phone number lookup on applicants on incoming calls.
2 changes: 2 additions & 0 deletions hr_recruitment_phone/security/ir.model.access.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
callerid_hr_applicant_read,Read access on hr.applicant,hr_recruitment.model_hr_applicant,base_phone.group_callerid,1,0,0,0
Binary file added hr_recruitment_phone/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bae2801

Please sign in to comment.