diff --git a/hr_recruitment_skill/README.rst b/hr_recruitment_skill/README.rst new file mode 100644 index 00000000..ed1cfc0e --- /dev/null +++ b/hr_recruitment_skill/README.rst @@ -0,0 +1,26 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +==================== +HR Recruitment Skill +==================== + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, +please check there if your issue has already been reported. If you spotted +it first, help us smash it by providing detailed and welcomed feedback. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Contributors +------------ + +* Oihane Crucelaegui +* Ana Juaristi diff --git a/hr_recruitment_skill/__init__.py b/hr_recruitment_skill/__init__.py new file mode 100644 index 00000000..4209851d --- /dev/null +++ b/hr_recruitment_skill/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2019 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from . import models diff --git a/hr_recruitment_skill/__manifest__.py b/hr_recruitment_skill/__manifest__.py new file mode 100644 index 00000000..1b7a09da --- /dev/null +++ b/hr_recruitment_skill/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2019 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +{ + "name": "HR Recruitment Skill", + "version": "11.0.1.0.0", + "category": "", + "license": "AGPL-3", + "author": "AvanzOSC", + "website": "http://www.avanzosc.es", + "depends": [ + "hr_recruitment", + "hr_skill", + ], + "data": [ + "views/hr_applicant.xml", + ], + "installable": True, +} diff --git a/hr_recruitment_skill/models/__init__.py b/hr_recruitment_skill/models/__init__.py new file mode 100644 index 00000000..6e8eabba --- /dev/null +++ b/hr_recruitment_skill/models/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2019 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from . import hr_applicant +from . import hr_applicant_skill +from . import hr_employee_skill diff --git a/hr_recruitment_skill/models/hr_applicant.py b/hr_recruitment_skill/models/hr_applicant.py new file mode 100644 index 00000000..722b86ff --- /dev/null +++ b/hr_recruitment_skill/models/hr_applicant.py @@ -0,0 +1,15 @@ +# Copyright 2019 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import fields, models + + +class Employee(models.Model): + _inherit = 'hr.applicant' + + applicant_skill_ids = fields.One2many( + comodel_name='hr.applicant.skill', inverse_name='applicant_id', + string="Applicant Skill") + applicant_eskill_ids = fields.One2many( + comodel_name='hr.employee.skill', inverse_name='applicant_id', + string="Applicant Skill") diff --git a/hr_recruitment_skill/models/hr_applicant_skill.py b/hr_recruitment_skill/models/hr_applicant_skill.py new file mode 100644 index 00000000..f919a28f --- /dev/null +++ b/hr_recruitment_skill/models/hr_applicant_skill.py @@ -0,0 +1,24 @@ +# Copyright 2013 Savoir-faire Linux +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from odoo import api, fields, models + + +class EmployeeSkill(models.Model): + _name = 'hr.applicant.skill' + + @api.model + def _get_selection_picking_policy(self): + return self.env['hr.employee.skill'].fields_get( + allfields=['level'])['level']['selection'] + + applicant_id = fields.Many2one( + comodel_name='hr.applicant', string="Applicant") + skill_id = fields.Many2one(comodel_name='hr.skill', string="Skill") + level = fields.Selection( + selection=_get_selection_picking_policy, string='Level') + + _sql_constraints = [ + ('hr_applicant_skill_uniq', 'unique(applicant_id, skill_id)', + "This applicant already has that skill!"), + ] + diff --git a/hr_recruitment_skill/models/hr_employee_skill.py b/hr_recruitment_skill/models/hr_employee_skill.py new file mode 100644 index 00000000..6fa7cbf4 --- /dev/null +++ b/hr_recruitment_skill/models/hr_employee_skill.py @@ -0,0 +1,16 @@ +# Copyright 2019 Oihane Crucelaegui - AvanzOSC +# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html + +from odoo import fields, models + + +class EmployeeSkill(models.Model): + _inherit = 'hr.employee.skill' + + applicant_id = fields.Many2one( + comodel_name='hr.applicant', string="Employee") + + _sql_constraints = [ + ('hr_applicant_skill_uniq', 'unique(applicant_id, skill_id)', + "This employee already has that skill!"), + ] diff --git a/hr_recruitment_skill/views/hr_applicant.xml b/hr_recruitment_skill/views/hr_applicant.xml new file mode 100644 index 00000000..831c33fa --- /dev/null +++ b/hr_recruitment_skill/views/hr_applicant.xml @@ -0,0 +1,44 @@ + + + + + hr.applicant + + + + + + + + + + + + + + + + +
+ + + + + +
+
+
+
+
+ + + + + + + + + + +
diff --git a/hr_recruitment_skill/views/hr_employee_skill.xml b/hr_recruitment_skill/views/hr_employee_skill.xml new file mode 100644 index 00000000..77cf371b --- /dev/null +++ b/hr_recruitment_skill/views/hr_employee_skill.xml @@ -0,0 +1,74 @@ + + + + hr.employee.skill.form + hr.employee.skill + +
+ + + + + + + +
+
+
+ + + hr.employee.skill.tree + hr.employee.skill + + + + + + + + + + + + hr.employee.skill.graph + hr.employee.skill + + + + + + + + + + + hr.employee.skill.pivot + hr.employee.skill + + + + + + + + + + + Employee Skills + hr.employee.skill + form + graph,pivot + +

+ Skills Reports. +

+
+
+ + + +
diff --git a/hr_recruitment_skill/views/hr_skill.xml b/hr_recruitment_skill/views/hr_skill.xml new file mode 100644 index 00000000..6c639621 --- /dev/null +++ b/hr_recruitment_skill/views/hr_skill.xml @@ -0,0 +1,58 @@ + + + + hr.skill.tree + hr.skill + child_ids + + + + + + + + + hr.skill.form + hr.skill + +
+ +
+ +
+
+
+
+
+ + + + + Skills + hr.skill + form + tree,form + + + + +