From 263a0ad67fbb742e5e057e1ba3687c939215e88f Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Thu, 3 Jan 2019 14:39:28 +0200 Subject: [PATCH 1/4] hr_job_category: Migrate to 11.0 --- hr_job_category/README.rst | 103 ++++ hr_job_category/__init__.py | 2 + hr_job_category/__manifest__.py | 22 + hr_job_category/i18n/de.po | 41 ++ hr_job_category/i18n/es.po | 39 ++ hr_job_category/i18n/fi.po | 38 ++ hr_job_category/i18n/fr.po | 38 ++ hr_job_category/i18n/it.po | 38 ++ hr_job_category/i18n/pt_BR.po | 39 ++ hr_job_category/i18n/ro.po | 38 ++ hr_job_category/i18n/sl.po | 39 ++ hr_job_category/models/__init__.py | 1 + hr_job_category/models/hr.py | 74 +++ hr_job_category/readme/CONTRIBUTORS.rst | 3 + hr_job_category/readme/DESCRIPTION.rst | 6 + hr_job_category/readme/INSTALL.rst | 7 + hr_job_category/readme/USAGE.rst | 6 + hr_job_category/static/description/icon.png | Bin 0 -> 5938 bytes hr_job_category/static/description/index.html | 449 ++++++++++++++++++ hr_job_category/tests/__init__.py | 1 + .../tests/test_hr_job_categories.py | 59 +++ hr_job_category/views/hr_view.xml | 16 + 22 files changed, 1059 insertions(+) create mode 100644 hr_job_category/README.rst create mode 100644 hr_job_category/__init__.py create mode 100644 hr_job_category/__manifest__.py create mode 100644 hr_job_category/i18n/de.po create mode 100644 hr_job_category/i18n/es.po create mode 100644 hr_job_category/i18n/fi.po create mode 100644 hr_job_category/i18n/fr.po create mode 100644 hr_job_category/i18n/it.po create mode 100644 hr_job_category/i18n/pt_BR.po create mode 100644 hr_job_category/i18n/ro.po create mode 100644 hr_job_category/i18n/sl.po create mode 100644 hr_job_category/models/__init__.py create mode 100644 hr_job_category/models/hr.py create mode 100644 hr_job_category/readme/CONTRIBUTORS.rst create mode 100644 hr_job_category/readme/DESCRIPTION.rst create mode 100644 hr_job_category/readme/INSTALL.rst create mode 100644 hr_job_category/readme/USAGE.rst create mode 100644 hr_job_category/static/description/icon.png create mode 100644 hr_job_category/static/description/index.html create mode 100644 hr_job_category/tests/__init__.py create mode 100644 hr_job_category/tests/test_hr_job_categories.py create mode 100644 hr_job_category/views/hr_view.xml diff --git a/hr_job_category/README.rst b/hr_job_category/README.rst new file mode 100644 index 00000000000..2343da29acb --- /dev/null +++ b/hr_job_category/README.rst @@ -0,0 +1,103 @@ +========================== +HR Job Employee Categories +========================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/11.0/hr_job_category + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-11-0/hr-11-0-hr_job_category + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/116/11.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module was written to extend the functionality of jobs +to support tagging employees based on their job positions. +For example, all Supervisors could be attached to the Supervisors category. +Define which categories a job belongs to in the configuration for the job. +When an employee is assigned a particular job the categories attached to that +job will be attached to the employee record as well. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +To install this module, you need to: + +* clone the branch 11.0 of the repository https://github.com/OCA/hr +* add the path to this repository in your configuration (addons-path) +* update the module list +* search for "HR Job Employee Categories" in your addons +* install the module + +Usage +===== + +Just like on Employee form, you can select Tags on every Job form view. +Once a contract is defined for an employee, the tags assigned to the job +position selected are copied to the employee. + +Note: If the job position is changed on the same contract, the tags from +old job position will be removed from employee. + +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 smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Michael Telahun Makonnen +* Savoir-faire Linux +* Fekete Mihai (FBSR) + +Contributors +~~~~~~~~~~~~ + +* Michael Telahun Makonnen +* Savoir-faire Linux +* Fekete Mihai + +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. + +This module is part of the `OCA/hr `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_job_category/__init__.py b/hr_job_category/__init__.py new file mode 100644 index 00000000000..a9e3372262c --- /dev/null +++ b/hr_job_category/__init__.py @@ -0,0 +1,2 @@ + +from . import models diff --git a/hr_job_category/__manifest__.py b/hr_job_category/__manifest__.py new file mode 100644 index 00000000000..9cccc0513f1 --- /dev/null +++ b/hr_job_category/__manifest__.py @@ -0,0 +1,22 @@ +# Copyright 2013 Michael Telahun Makonnen +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'HR Job Employee Categories', + 'version': '11.0.1.0.0', + 'category': 'Generic Modules/Human Resources', + 'summary': 'Adds tags to employee trough contract and job position', + 'author': "Michael Telahun Makonnen , " + "Savoir-faire Linux, " + "Fekete Mihai (FBSR), " + "Odoo Community Association (OCA)", + 'website': 'https://github.com/OCA/hr', + 'license': 'AGPL-3', + 'depends': [ + 'hr_contract', + ], + 'data': [ + 'views/hr_view.xml', + ], + 'installable': True, +} diff --git a/hr_job_category/i18n/de.po b/hr_job_category/i18n/de.po new file mode 100644 index 00000000000..04ee3d28b1e --- /dev/null +++ b/hr_job_category/i18n/de.po @@ -0,0 +1,41 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +# Rudolf Schnapka , 2016 +# Thomas A. Jaeger, 2015 +# Thomas A. Jaeger, 2015 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-30 05:19+0000\n" +"PO-Revision-Date: 2016-01-26 09:53+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "Assoziierte Schlagwörter" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Vertrag" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "Arbeitsplatzpositionen" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "z. B. Teilzeit" diff --git a/hr_job_category/i18n/es.po b/hr_job_category/i18n/es.po new file mode 100644 index 00000000000..91cd61ae2c3 --- /dev/null +++ b/hr_job_category/i18n/es.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +# Antonio Trueba, 2016 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-11-30 05:19+0000\n" +"PO-Revision-Date: 2016-02-10 16:53+0000\n" +"Last-Translator: Antonio Trueba\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "Etiquetas asociadas" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Contrato" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "p.e., Tiempo parcial" diff --git a/hr_job_category/i18n/fi.po b/hr_job_category/i18n/fi.po new file mode 100644 index 00000000000..4ada75e8309 --- /dev/null +++ b/hr_job_category/i18n/fi.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 04:15+0000\n" +"PO-Revision-Date: 2016-04-04 11:09+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/fi/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Sopimus" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "" diff --git a/hr_job_category/i18n/fr.po b/hr_job_category/i18n/fr.po new file mode 100644 index 00000000000..246b696091b --- /dev/null +++ b/hr_job_category/i18n/fr.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Contrat" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "Poste" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "p.e. À temps partiel" diff --git a/hr_job_category/i18n/it.po b/hr_job_category/i18n/it.po new file mode 100644 index 00000000000..d46bb65f96d --- /dev/null +++ b/hr_job_category/i18n/it.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-12 12:02+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Contratto" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "" diff --git a/hr_job_category/i18n/pt_BR.po b/hr_job_category/i18n/pt_BR.po new file mode 100644 index 00000000000..60436dc55dc --- /dev/null +++ b/hr_job_category/i18n/pt_BR.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +# danimaribeiro , 2016 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-11 01:48+0000\n" +"PO-Revision-Date: 2016-03-08 03:19+0000\n" +"Last-Translator: danimaribeiro \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Contrato" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "Cargo" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "ex. Meio período" diff --git a/hr_job_category/i18n/ro.po b/hr_job_category/i18n/ro.po new file mode 100644 index 00000000000..5b5308ae810 --- /dev/null +++ b/hr_job_category/i18n/ro.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-07-27 23:44+0000\n" +"Last-Translator: <>\n" +"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/ro/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Contract" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "Funcție" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "" diff --git a/hr_job_category/i18n/sl.po b/hr_job_category/i18n/sl.po new file mode 100644 index 00000000000..6a1d3f3cfdc --- /dev/null +++ b/hr_job_category/i18n/sl.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +# Translators: +# Matjaž Mozetič , 2015 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-08-18 13:10+0000\n" +"PO-Revision-Date: 2015-08-01 15:48+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: hr_job_category +#: field:hr.job,category_ids:0 +msgid "Associated Tags" +msgstr "Povezane oznake" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Contract" +msgstr "Pogodba" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "Delovno mesto" + +#. module: hr_job_category +#: view:hr.job:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "npr. Občasno" diff --git a/hr_job_category/models/__init__.py b/hr_job_category/models/__init__.py new file mode 100644 index 00000000000..b80db13ee6b --- /dev/null +++ b/hr_job_category/models/__init__.py @@ -0,0 +1 @@ +from . import hr diff --git a/hr_job_category/models/hr.py b/hr_job_category/models/hr.py new file mode 100644 index 00000000000..63389b10136 --- /dev/null +++ b/hr_job_category/models/hr.py @@ -0,0 +1,74 @@ +# Copyright 2013 Michael Telahun Makonnen +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import models, fields, api +import logging + +_logger = logging.getLogger(__name__) + + +class HRJob(models.Model): + _inherit = 'hr.job' + + category_ids = fields.Many2many('hr.employee.category', + 'job_category_rel', + 'job_id', + 'category_id', + string='Associated Tags') + + +class HRContract(models.Model): + _inherit = 'hr.contract' + + @api.multi + def _remove_tags(self, employee_id=None, job_id=None): + # TODO write tags only once + if not employee_id or not job_id: + return + employee = self.env['hr.employee'].browse(employee_id) + empl_tags = employee.category_ids + job = self.env['hr.job'].browse(job_id) + _logger.debug('Removing employee tags if tag exists on contract ' + 'job: %s', empl_tags) + for tag in job.category_ids: + if tag in empl_tags: + employee.write({'category_ids': [(3, tag.id)]}) + + @api.multi + def _tag_employees(self, employee_id=None, job_id=None): + if not employee_id or not job_id: + return + employee = self.env['hr.employee'].browse(employee_id) + empl_tags = employee.category_ids + job = self.env['hr.job'].browse(job_id) + for tag in job.category_ids: + if tag not in empl_tags: + _logger.debug("Adding employee tag if job tag doesn't " + "exists: %s", tag.name) + employee.write({'category_ids': [(4, tag.id)]}) + + @api.model + def create(self, vals): + res = super().create(vals) + self._tag_employees(vals.get('employee_id', False), + vals.get('job_id', False)) + return res + + @api.multi + def write(self, vals): + prev_data = self.read(['job_id']) + + res = super().write(vals) + + # Go through each record and delete tags associated with the previous + # job, then add the tags of the new job. + # + for contract in self: + for data in prev_data: + if (data.get('id') == contract.id and data['job_id'] and + data['job_id'][0] != contract.job_id.id): + self._remove_tags(contract.employee_id.id, + data['job_id'][0]) + self._tag_employees(contract.employee_id.id, + contract.job_id.id) + return res diff --git a/hr_job_category/readme/CONTRIBUTORS.rst b/hr_job_category/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..53714833f12 --- /dev/null +++ b/hr_job_category/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Michael Telahun Makonnen +* Savoir-faire Linux +* Fekete Mihai \ No newline at end of file diff --git a/hr_job_category/readme/DESCRIPTION.rst b/hr_job_category/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..e5cddb071ba --- /dev/null +++ b/hr_job_category/readme/DESCRIPTION.rst @@ -0,0 +1,6 @@ +This module was written to extend the functionality of jobs +to support tagging employees based on their job positions. +For example, all Supervisors could be attached to the Supervisors category. +Define which categories a job belongs to in the configuration for the job. +When an employee is assigned a particular job the categories attached to that +job will be attached to the employee record as well. \ No newline at end of file diff --git a/hr_job_category/readme/INSTALL.rst b/hr_job_category/readme/INSTALL.rst new file mode 100644 index 00000000000..e3253deed81 --- /dev/null +++ b/hr_job_category/readme/INSTALL.rst @@ -0,0 +1,7 @@ +To install this module, you need to: + +* clone the branch 11.0 of the repository https://github.com/OCA/hr +* add the path to this repository in your configuration (addons-path) +* update the module list +* search for "HR Job Employee Categories" in your addons +* install the module \ No newline at end of file diff --git a/hr_job_category/readme/USAGE.rst b/hr_job_category/readme/USAGE.rst new file mode 100644 index 00000000000..108d6a55429 --- /dev/null +++ b/hr_job_category/readme/USAGE.rst @@ -0,0 +1,6 @@ +Just like on Employee form, you can select Tags on every Job form view. +Once a contract is defined for an employee, the tags assigned to the job +position selected are copied to the employee. + +Note: If the job position is changed on the same contract, the tags from +old job position will be removed from employee. \ No newline at end of file diff --git a/hr_job_category/static/description/icon.png b/hr_job_category/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..297dc71c85c5fdd8deafabfbb46093e04adc32d1 GIT binary patch literal 5938 zcmZ{oWmFXI^Y&S~Q@W%NlQZ+2a^I50RaI=RYgJPA7%a%I_ke%>+HSx52!Zk$_fat|3z_c zRp!46hL?)5??0;iPfBC1QvVhGy<{E#QRaU-zJ^;NAdm>DD#+>uuAb#%d@$Y59w{n} zV@#J(iOk|Fp-kV&k~3Y^QH$!(b+Vq~dGD0q{}wxo1QD4Ps4`oh%BjA|XuNqJw)KbU zmpavmsg3xhhiZr2#20(@&3p63$LZ&9j3cTAh>i|#FLw%kr!zU3W-neY9@ut3l-qwa z#k^E@g@A`1VZjown>hzQ!q3=j>*ndcspz`~cX97qSv}6)AC;AA@7E#4tV-J2{*Hha z)r3^~l!T6WtKR|f=s>a~gDr;nr)*aNd2P!8qI( zt@@jCF0-niv+}!9!YT1ys6a}j=R&qeYbXcKL^aareQJmn zt*AYTL#Hk6JWoOVVwM}p9j|>vl2v zj7Z~drXXFMN6y3u55X24pj*p`8-1JyGw}9{MVh`$Q-YlcgP-2c-JsjrQ)%X@)XvO@ z=k4sM?J(iU9B-bGdb!sT%9-m;cSwJTIJO04K4;Lnu;VPXfzl;APGBN?`uau zFkV!VR*dwmL?ErsR?bk?9`nuF7V?~OXX*8}I~2qCMDF*XHJ2^Q0LxR#F0Rx-16x}7 zrl(JH)ci$U1p^>-{%jjblml7BX5LQ{6?Y49E(!=q_B=mN_JK!n*)60X9WiQqjW8wO zYIr1H6nWkMEz9hl-kqY6q8tU;RfYUW#50W0)IZ*I{>lJn!-2ON4kY+S|Nh(btN8>K zTT~lIq>lhN+io33zP>sIqeOVh%@+>PqqkJwmi9A5P8eY<6bRGN6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JSk~Ttd5GY({L&1e?@ro;X?i4Ydl);F;wRVRx9Bn&kc!o)Sl~z_ z5CQ#86V0KQ-(9hBGUwud@rXduz%Mk|H{?8!wKzZ-O|LnpQ?+E;o^A!~V>^k6D6xnd zIH(qQ2<1O5{oVuI+Z|4ljOkl$8fWCQoRVkuv)in~o164Wzg-7S+U)G*09}+29bg-k z6|fFK0<%QNWb+Fb+3iD13oqZpvlsX3_mojiiInYFH`6Hf7)O~;ahL_4ubvp9`%UGp z$4M(6d~&)2-lA0-nLOpnwZuxjB`(iIufhdS;V%yiTBR5ca;J7Iwk%4mY5;+dFI7V; zz7^=|Q!NMo{@GM4@(t6Bw4yNg>M1as7 z(YKyLW4AaK(X=h#HMD}7BWG+}9EgNBfcL11b-Jw{g-ZnBAypD%V{C=a_RP9+%&mXv zYA!=`cuYK?S`G+ECwenaSJ^Yf?T3E1pL`42z?_cH$B1^Uy`R%FUR#geTc;oQU4v5O zDWGtLejeaw9f<(a^=oi+1*;)Np4onst25!+{sHy+FbRRd zPn{b1<`{#;i4{Pd-v>#1N^|3=j~2yNm1MJzAOMP%14VIuUuBixf~dO?jso!wj36qN#&u}7i( z(&mmB*QfBxJUKMh_Wbz~@Oh@10!Aik%d(Qjwj{icpZ#2S^1pDcuy{pM!1qsjWuJci zcS>gZplI~L&iaGBn5~cfKOpe&@Q8B$d%XO5yaHmp{9-&j>^yw`@*g!m+W*Jk?rG=j z5cK~yWRfPA{WFmNH$m6a;X{D6k3B*_KmeDshpVrxwU<4Yr;lU)xdg?(CInSQ4TVNI HtLXm&e3x`` literal 0 HcmV?d00001 diff --git a/hr_job_category/static/description/index.html b/hr_job_category/static/description/index.html new file mode 100644 index 00000000000..07358b4528b --- /dev/null +++ b/hr_job_category/static/description/index.html @@ -0,0 +1,449 @@ + + + + + + +HR Job Employee Categories + + + +
+

HR Job Employee Categories

+ + +

Beta License: AGPL-3 OCA/hr Translate me on Weblate Try me on Runbot

+

This module was written to extend the functionality of jobs +to support tagging employees based on their job positions. +For example, all Supervisors could be attached to the Supervisors category. +Define which categories a job belongs to in the configuration for the job. +When an employee is assigned a particular job the categories attached to that +job will be attached to the employee record as well.

+

Table of contents

+ +
+

Installation

+

To install this module, you need to:

+
    +
  • clone the branch 11.0 of the repository https://github.com/OCA/hr
  • +
  • add the path to this repository in your configuration (addons-path)
  • +
  • update the module list
  • +
  • search for “HR Job Employee Categories” in your addons
  • +
  • install the module
  • +
+
+
+

Usage

+

Just like on Employee form, you can select Tags on every Job form view. +Once a contract is defined for an employee, the tags assigned to the job +position selected are copied to the employee.

+

Note: If the job position is changed on the same contract, the tags from +old job position will be removed from employee.

+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+ +
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/hr project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/hr_job_category/tests/__init__.py b/hr_job_category/tests/__init__.py new file mode 100644 index 00000000000..16ace3d28d4 --- /dev/null +++ b/hr_job_category/tests/__init__.py @@ -0,0 +1 @@ +from . import test_hr_job_categories diff --git a/hr_job_category/tests/test_hr_job_categories.py b/hr_job_category/tests/test_hr_job_categories.py new file mode 100644 index 00000000000..efcb58814c6 --- /dev/null +++ b/hr_job_category/tests/test_hr_job_categories.py @@ -0,0 +1,59 @@ +# Copyright 2014 Savoir-faire Linux +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo.tests import common + + +class TestHrJobCategories(common.TransactionCase): + def setUp(self): + super(TestHrJobCategories, self).setUp() + self.employee_model = self.env['hr.employee'] + self.employee_categ_model = self.env['hr.employee.category'] + self.user_model = self.env['res.users'] + self.job_model = self.env['hr.job'] + self.contract_model = self.env['hr.contract'] + + # Create a employee + self.employee_id = self.employee_model.create({'name': 'Employee 1'}) + + # Create two employee categories + self.categ_id = self.employee_categ_model.create( + {'name': 'Category 1'}) + self.categ_2_id = self.employee_categ_model.create( + {'name': 'Category 2'}) + + # Create two jobs + self.job_id = self.job_model.create( + {'name': 'Job 1', + 'category_ids': [(6, 0, [self.categ_id.id])]}) + + self.job_2_id = self.job_model.create( + {'name': 'Job 2', + 'category_ids': [(6, 0, [self.categ_2_id.id])]}) + + # Create one contract + self.contract_id = self.contract_model.create( + {'name': 'Contract 1', + 'employee_id': self.employee_id.id, + 'wage': 50000}) + + def test_write_computes_with_normal_args(self): + """ + Test that write method on hr_contract computes without error + when the required data is given in parameter + + Check if the job categories are written to the employee. + """ + # Check if job categories are written to the employee + self.contract_id.write({'job_id': self.job_id.id}) + job_categ = [categ.id for categ in self.job_id.category_ids] + empl_categ = [categ.id for categ in self.employee_id.category_ids] + + self.assertTrue(all(x in empl_categ for x in job_categ)) + + # Check if job2 categories are written to the employee + self.contract_id.write({'job_id': self.job_2_id.id}) + job_categ = [categ.id for categ in self.job_2_id.category_ids] + empl_categ = [categ.id for categ in self.employee_id.category_ids] + + self.assertTrue(all(x in empl_categ for x in job_categ)) diff --git a/hr_job_category/views/hr_view.xml b/hr_job_category/views/hr_view.xml new file mode 100644 index 00000000000..fa0da9fa476 --- /dev/null +++ b/hr_job_category/views/hr_view.xml @@ -0,0 +1,16 @@ + + + + + hr.job.category + hr.job + + + + + + + + From 4d7a9b4731910c035e20f195054036b1e5b122cb Mon Sep 17 00:00:00 2001 From: oca-travis Date: Wed, 16 Jan 2019 09:02:14 +0000 Subject: [PATCH 2/4] Update hr_job_category.pot --- hr_job_category/i18n/de.po | 14 ++++++---- hr_job_category/i18n/es.po | 14 ++++++---- hr_job_category/i18n/fi.po | 14 ++++++---- hr_job_category/i18n/fr.po | 14 ++++++---- hr_job_category/i18n/hr_job_category.pot | 35 ++++++++++++++++++++++++ hr_job_category/i18n/it.po | 14 ++++++---- hr_job_category/i18n/pt_BR.po | 14 ++++++---- hr_job_category/i18n/ro.po | 17 +++++++----- hr_job_category/i18n/sl.po | 17 +++++++----- 9 files changed, 103 insertions(+), 50 deletions(-) create mode 100644 hr_job_category/i18n/hr_job_category.pot diff --git a/hr_job_category/i18n/de.po b/hr_job_category/i18n/de.po index 04ee3d28b1e..452fe8e8c95 100644 --- a/hr_job_category/i18n/de.po +++ b/hr_job_category/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: # Rudolf Schnapka , 2016 # Thomas A. Jaeger, 2015 @@ -13,21 +13,23 @@ msgstr "" "POT-Creation-Date: 2015-11-30 05:19+0000\n" "PO-Revision-Date: 2016-01-26 09:53+0000\n" "Last-Translator: Rudolf Schnapka \n" -"Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/de/)\n" +"Language-Team: German (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"de/)\n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "Assoziierte Schlagwörter" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Vertrag" #. module: hr_job_category @@ -36,6 +38,6 @@ msgid "Job Position" msgstr "Arbeitsplatzpositionen" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "z. B. Teilzeit" diff --git a/hr_job_category/i18n/es.po b/hr_job_category/i18n/es.po index 91cd61ae2c3..fd0bf4e5740 100644 --- a/hr_job_category/i18n/es.po +++ b/hr_job_category/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: # Antonio Trueba, 2016 msgid "" @@ -11,21 +11,23 @@ msgstr "" "POT-Creation-Date: 2015-11-30 05:19+0000\n" "PO-Revision-Date: 2016-02-10 16:53+0000\n" "Last-Translator: Antonio Trueba\n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "Etiquetas asociadas" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Contrato" #. module: hr_job_category @@ -34,6 +36,6 @@ msgid "Job Position" msgstr "" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "p.e., Tiempo parcial" diff --git a/hr_job_category/i18n/fi.po b/hr_job_category/i18n/fi.po index 4ada75e8309..764acdf482b 100644 --- a/hr_job_category/i18n/fi.po +++ b/hr_job_category/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: msgid "" msgstr "" @@ -10,21 +10,23 @@ msgstr "" "POT-Creation-Date: 2016-04-14 04:15+0000\n" "PO-Revision-Date: 2016-04-04 11:09+0000\n" "Last-Translator: Jarmo Kortetjärvi \n" -"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/fi/)\n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"fi/)\n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Sopimus" #. module: hr_job_category @@ -33,6 +35,6 @@ msgid "Job Position" msgstr "" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "" diff --git a/hr_job_category/i18n/fr.po b/hr_job_category/i18n/fr.po index 246b696091b..b25096e93ad 100644 --- a/hr_job_category/i18n/fr.po +++ b/hr_job_category/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: msgid "" msgstr "" @@ -10,21 +10,23 @@ msgstr "" "POT-Creation-Date: 2015-08-18 13:10+0000\n" "PO-Revision-Date: 2015-07-27 23:44+0000\n" "Last-Translator: <>\n" -"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"fr/)\n" +"Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Contrat" #. module: hr_job_category @@ -33,6 +35,6 @@ msgid "Job Position" msgstr "Poste" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "p.e. À temps partiel" diff --git a/hr_job_category/i18n/hr_job_category.pot b/hr_job_category/i18n/hr_job_category.pot new file mode 100644 index 00000000000..e36422bf37e --- /dev/null +++ b/hr_job_category/i18n/hr_job_category.pot @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_job_category +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.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_job_category +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids +msgid "Associated Tags" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_contract +msgid "Employee Contract" +msgstr "" + +#. module: hr_job_category +#: model:ir.model,name:hr_job_category.model_hr_job +msgid "Job Position" +msgstr "" + +#. module: hr_job_category +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form +msgid "e.g. Part Time" +msgstr "" + diff --git a/hr_job_category/i18n/it.po b/hr_job_category/i18n/it.po index d46bb65f96d..0b8a13ccdce 100644 --- a/hr_job_category/i18n/it.po +++ b/hr_job_category/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: msgid "" msgstr "" @@ -10,21 +10,23 @@ msgstr "" "POT-Creation-Date: 2016-03-12 12:02+0000\n" "PO-Revision-Date: 2015-07-27 23:44+0000\n" "Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/it/)\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"it/)\n" +"Language: it\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Contratto" #. module: hr_job_category @@ -33,6 +35,6 @@ msgid "Job Position" msgstr "" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "" diff --git a/hr_job_category/i18n/pt_BR.po b/hr_job_category/i18n/pt_BR.po index 60436dc55dc..3d78a3f3bca 100644 --- a/hr_job_category/i18n/pt_BR.po +++ b/hr_job_category/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: # danimaribeiro , 2016 msgid "" @@ -11,21 +11,23 @@ msgstr "" "POT-Creation-Date: 2016-03-11 01:48+0000\n" "PO-Revision-Date: 2016-03-08 03:19+0000\n" "Last-Translator: danimaribeiro \n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/" +"language/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Contrato" #. module: hr_job_category @@ -34,6 +36,6 @@ msgid "Job Position" msgstr "Cargo" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "ex. Meio período" diff --git a/hr_job_category/i18n/ro.po b/hr_job_category/i18n/ro.po index 5b5308ae810..849a5206086 100644 --- a/hr_job_category/i18n/ro.po +++ b/hr_job_category/i18n/ro.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: msgid "" msgstr "" @@ -10,21 +10,24 @@ msgstr "" "POT-Creation-Date: 2015-08-18 13:10+0000\n" "PO-Revision-Date: 2015-07-27 23:44+0000\n" "Last-Translator: <>\n" -"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/ro/)\n" +"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"ro/)\n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Contract" #. module: hr_job_category @@ -33,6 +36,6 @@ msgid "Job Position" msgstr "Funcție" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "" diff --git a/hr_job_category/i18n/sl.po b/hr_job_category/i18n/sl.po index 6a1d3f3cfdc..9c4a3aafebd 100644 --- a/hr_job_category/i18n/sl.po +++ b/hr_job_category/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_job_category -# +# # Translators: # Matjaž Mozetič , 2015 msgid "" @@ -11,21 +11,24 @@ msgstr "" "POT-Creation-Date: 2015-08-18 13:10+0000\n" "PO-Revision-Date: 2015-08-01 15:48+0000\n" "Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"sl/)\n" +"Language: sl\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: hr_job_category -#: field:hr.job,category_ids:0 +#: model:ir.model.fields,field_description:hr_job_category.field_hr_job_category_ids msgid "Associated Tags" msgstr "Povezane oznake" #. module: hr_job_category #: model:ir.model,name:hr_job_category.model_hr_contract -msgid "Contract" +#, fuzzy +msgid "Employee Contract" msgstr "Pogodba" #. module: hr_job_category @@ -34,6 +37,6 @@ msgid "Job Position" msgstr "Delovno mesto" #. module: hr_job_category -#: view:hr.job:hr_job_category.view_job_form +#: model:ir.ui.view,arch_db:hr_job_category.view_job_form msgid "e.g. Part Time" msgstr "npr. Občasno" From e8a0adce1a3a21e7383cfa8af04e998571edc234 Mon Sep 17 00:00:00 2001 From: Nikul-Chaudhary Date: Mon, 21 Jan 2019 00:18:36 +0530 Subject: [PATCH 3/4] [MIG] hr_job_category v11 to v12 --- hr_job_category/README.rst | 1 + hr_job_category/__init__.py | 1 + hr_job_category/__manifest__.py | 2 +- hr_job_category/models/__init__.py | 2 ++ hr_job_category/models/hr.py | 12 +++++++----- hr_job_category/readme/CONTRIBUTORS.rst | 3 ++- hr_job_category/tests/__init__.py | 2 ++ 7 files changed, 16 insertions(+), 7 deletions(-) diff --git a/hr_job_category/README.rst b/hr_job_category/README.rst index 2343da29acb..05f71a9580c 100644 --- a/hr_job_category/README.rst +++ b/hr_job_category/README.rst @@ -84,6 +84,7 @@ Contributors * Michael Telahun Makonnen * Savoir-faire Linux * Fekete Mihai +* Nikul Chaudhary Maintainers ~~~~~~~~~~~ diff --git a/hr_job_category/__init__.py b/hr_job_category/__init__.py index a9e3372262c..69f7babdfb1 100644 --- a/hr_job_category/__init__.py +++ b/hr_job_category/__init__.py @@ -1,2 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from . import models diff --git a/hr_job_category/__manifest__.py b/hr_job_category/__manifest__.py index 9cccc0513f1..dc9a518453b 100644 --- a/hr_job_category/__manifest__.py +++ b/hr_job_category/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'HR Job Employee Categories', - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'category': 'Generic Modules/Human Resources', 'summary': 'Adds tags to employee trough contract and job position', 'author': "Michael Telahun Makonnen , " diff --git a/hr_job_category/models/__init__.py b/hr_job_category/models/__init__.py index b80db13ee6b..0cabad10f7d 100644 --- a/hr_job_category/models/__init__.py +++ b/hr_job_category/models/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import hr diff --git a/hr_job_category/models/hr.py b/hr_job_category/models/hr.py index 63389b10136..9e3d0285b53 100644 --- a/hr_job_category/models/hr.py +++ b/hr_job_category/models/hr.py @@ -10,11 +10,13 @@ class HRJob(models.Model): _inherit = 'hr.job' - category_ids = fields.Many2many('hr.employee.category', - 'job_category_rel', - 'job_id', - 'category_id', - string='Associated Tags') + category_ids = fields.Many2many( + 'hr.employee.category', + 'job_category_rel', + 'job_id', + 'category_id', + string='Associated Tags' + ) class HRContract(models.Model): diff --git a/hr_job_category/readme/CONTRIBUTORS.rst b/hr_job_category/readme/CONTRIBUTORS.rst index 53714833f12..71ff60e08b0 100644 --- a/hr_job_category/readme/CONTRIBUTORS.rst +++ b/hr_job_category/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Michael Telahun Makonnen * Savoir-faire Linux -* Fekete Mihai \ No newline at end of file +* Fekete Mihai +* Nikul Chaudhary \ No newline at end of file diff --git a/hr_job_category/tests/__init__.py b/hr_job_category/tests/__init__.py index 16ace3d28d4..95196a8de46 100644 --- a/hr_job_category/tests/__init__.py +++ b/hr_job_category/tests/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import test_hr_job_categories From f95839b25edbec8b76846d3fb0aa137531c17a7c Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Wed, 30 Jan 2019 11:41:58 +0200 Subject: [PATCH 4/4] [11.0][FIX] hr_job_category: fix access group --- hr_job_category/views/hr_view.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hr_job_category/views/hr_view.xml b/hr_job_category/views/hr_view.xml index fa0da9fa476..34fb11b6afb 100644 --- a/hr_job_category/views/hr_view.xml +++ b/hr_job_category/views/hr_view.xml @@ -7,8 +7,8 @@ -