From adbce81c23330b3a9fede819b665ad55164a0598 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Thu, 25 Oct 2018 12:00:35 +0300 Subject: [PATCH 01/24] [12.0][ADD] hr_employee_relative: alternative to hr_family --- hr_employee_relative/README.rst | 73 +++ hr_employee_relative/__init__.py | 3 + hr_employee_relative/__manifest__.py | 30 ++ .../data/data_relative_relation.xml | 36 ++ hr_employee_relative/i18n/fr.po | 177 ++++++++ .../i18n/hr_employee_relative.pot | 175 ++++++++ hr_employee_relative/models/__init__.py | 5 + hr_employee_relative/models/hr_employee.py | 14 + .../models/hr_employee_relative.py | 61 +++ .../models/hr_employee_relative_relation.py | 15 + hr_employee_relative/readme/CONTRIBUTORS.rst | 1 + hr_employee_relative/readme/DESCRIPTION.rst | 1 + .../security/ir.model.access.csv | 5 + .../static/description/icon.png | Bin 0 -> 9455 bytes .../static/description/index.html | 419 ++++++++++++++++++ hr_employee_relative/tests/__init__.py | 3 + .../tests/test_hr_employee_relatives.py | 31 ++ hr_employee_relative/views/hr_employee.xml | 24 + .../views/hr_employee_relative.xml | 24 + 19 files changed, 1097 insertions(+) create mode 100644 hr_employee_relative/README.rst create mode 100644 hr_employee_relative/__init__.py create mode 100644 hr_employee_relative/__manifest__.py create mode 100644 hr_employee_relative/data/data_relative_relation.xml create mode 100644 hr_employee_relative/i18n/fr.po create mode 100644 hr_employee_relative/i18n/hr_employee_relative.pot create mode 100644 hr_employee_relative/models/__init__.py create mode 100644 hr_employee_relative/models/hr_employee.py create mode 100644 hr_employee_relative/models/hr_employee_relative.py create mode 100644 hr_employee_relative/models/hr_employee_relative_relation.py create mode 100644 hr_employee_relative/readme/CONTRIBUTORS.rst create mode 100644 hr_employee_relative/readme/DESCRIPTION.rst create mode 100644 hr_employee_relative/security/ir.model.access.csv create mode 100644 hr_employee_relative/static/description/icon.png create mode 100644 hr_employee_relative/static/description/index.html create mode 100644 hr_employee_relative/tests/__init__.py create mode 100644 hr_employee_relative/tests/test_hr_employee_relatives.py create mode 100644 hr_employee_relative/views/hr_employee.xml create mode 100644 hr_employee_relative/views/hr_employee_relative.xml diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst new file mode 100644 index 00000000000..6e8743a716d --- /dev/null +++ b/hr_employee_relative/README.rst @@ -0,0 +1,73 @@ +===================== +HR Employee Relatives +===================== + +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! 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/12.0/hr_employee_relative + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_employee_relative + :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/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows storing information about employee's family. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* Brainbean Apps + +Contributors +~~~~~~~~~~~~ + +* Alexey Pelykh + +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_employee_relative/__init__.py b/hr_employee_relative/__init__.py new file mode 100644 index 00000000000..4b76c7b2d5c --- /dev/null +++ b/hr_employee_relative/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/hr_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py new file mode 100644 index 00000000000..9984c3d1aaa --- /dev/null +++ b/hr_employee_relative/__manifest__.py @@ -0,0 +1,30 @@ +# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + 'name': 'HR Employee Relatives', + 'version': '12.0.1.0.0', + 'category': 'Human Resources', + 'website': 'https://github.com/OCA/hr', + 'author': + 'Brainbean Apps, ' + 'Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'summary': 'Allows storing information about employee\'s family', + 'depends': [ + 'hr', + ], + 'external_dependencies': { + 'python': [ + 'dateutil', + ], + }, + 'data': [ + 'data/data_relative_relation.xml', + 'security/ir.model.access.csv', + 'views/hr_employee.xml', + 'views/hr_employee_relative.xml', + ], +} diff --git a/hr_employee_relative/data/data_relative_relation.xml b/hr_employee_relative/data/data_relative_relation.xml new file mode 100644 index 00000000000..c9329e664ba --- /dev/null +++ b/hr_employee_relative/data/data_relative_relation.xml @@ -0,0 +1,36 @@ + + + + + + + + Spouse + + + Significant Other + + + Child + + + Parent + + + Sibling + + + Cousin + + + Grandparent + + + Grandchild + + + + diff --git a/hr_employee_relative/i18n/fr.po b/hr_employee_relative/i18n/fr.po new file mode 100644 index 00000000000..65bc11e6d7f --- /dev/null +++ b/hr_employee_relative/i18n/fr.po @@ -0,0 +1,177 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-05-24 10:19+0000\n" +"Last-Translator: Kévin Allard \n" +"Language-Team: none\n" +"Language: fr\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 3.6.1\n" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "Âge" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "Enfant" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "Cousin(e)" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "Créé par" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "Créé le" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "Date de naissance" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "Nom affiché" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "Employé(e)" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "Proches" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Female" +msgstr "Feminin" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "Genre" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "Petit-enfant" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "Grand-parent" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "ID" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "Dernière modification le" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "Dernière mise à jour par" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "Dernière mise à jour le" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Male" +msgstr "Masculin" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "Nom" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "Notes" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Other" +msgstr "Autre" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "Parent" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "Partenaire" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "Relation" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "Proches" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "Frère/Soeur" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "Autre" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "Époux / Épouse" diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot new file mode 100644 index 00000000000..c2d893c21ce --- /dev/null +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -0,0 +1,175 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.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_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Female" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Male" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "" + diff --git a/hr_employee_relative/models/__init__.py b/hr_employee_relative/models/__init__.py new file mode 100644 index 00000000000..7cf9f205495 --- /dev/null +++ b/hr_employee_relative/models/__init__.py @@ -0,0 +1,5 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import hr_employee +from . import hr_employee_relative +from . import hr_employee_relative_relation diff --git a/hr_employee_relative/models/hr_employee.py b/hr_employee_relative/models/hr_employee.py new file mode 100644 index 00000000000..0c529383ffd --- /dev/null +++ b/hr_employee_relative/models/hr_employee.py @@ -0,0 +1,14 @@ +# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + relative_ids = fields.One2many( + string='Relatives', + comodel_name='hr.employee.relative', + inverse_name='employee_id', + ) diff --git a/hr_employee_relative/models/hr_employee_relative.py b/hr_employee_relative/models/hr_employee_relative.py new file mode 100644 index 00000000000..a365c580f5e --- /dev/null +++ b/hr_employee_relative/models/hr_employee_relative.py @@ -0,0 +1,61 @@ +# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models, api + +from datetime import datetime +from dateutil.relativedelta import relativedelta + + +class HrEmployeeRelative(models.Model): + _name = 'hr.employee.relative' + _description = 'HR Employee Relative' + + employee_id = fields.Many2one( + string='Employee', + comodel_name='hr.employee', + ) + relation_id = fields.Many2one( + 'hr.employee.relative.relation', + string='Relation', + required=True, + ) + name = fields.Char( + string='Name', + required=True, + ) + partner_id = fields.Many2one( + 'res.partner', + string='Partner', + domain=[ + '&', ('is_company', '=', False), ('type', '=', 'contact') + ], + ) + gender = fields.Selection( + string='Gender', + selection=[ + ('male', 'Male'), + ('female', 'Female'), + ('other', 'Other'), + ], + ) + date_of_birth = fields.Date( + string='Date of Birth', + ) + age = fields.Float( + compute='_compute_age', + ) + notes = fields.Text( + string='Notes', + ) + + @api.depends('date_of_birth') + def _compute_age(self): + for record in self: + age = relativedelta(datetime.now(), record.date_of_birth) + record.age = age.years + (age.months / 12) + + @api.onchange('partner_id') + def _onchange_partner_id(self): + if self.partner_id: + self.name = self.partner_id.display_name diff --git a/hr_employee_relative/models/hr_employee_relative_relation.py b/hr_employee_relative/models/hr_employee_relative_relation.py new file mode 100644 index 00000000000..accb680ecd2 --- /dev/null +++ b/hr_employee_relative/models/hr_employee_relative_relation.py @@ -0,0 +1,15 @@ +# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class HrEmployeeRelativeRelation(models.Model): + _name = 'hr.employee.relative.relation' + _description = 'HR Employee Relative Relation' + + name = fields.Char( + string='Relation', + required=True, + translate=True + ) diff --git a/hr_employee_relative/readme/CONTRIBUTORS.rst b/hr_employee_relative/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..1c6a35a1e35 --- /dev/null +++ b/hr_employee_relative/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Alexey Pelykh diff --git a/hr_employee_relative/readme/DESCRIPTION.rst b/hr_employee_relative/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..295727acd1a --- /dev/null +++ b/hr_employee_relative/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module allows storing information about employee's family. diff --git a/hr_employee_relative/security/ir.model.access.csv b/hr_employee_relative/security/ir.model.access.csv new file mode 100644 index 00000000000..95541868a5e --- /dev/null +++ b/hr_employee_relative/security/ir.model.access.csv @@ -0,0 +1,5 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +access_hr_employee_relative_employee,hr.employee.relative,model_hr_employee_relative,base.group_user,1,0,0,0 +access_hr_employee_relative_user,hr.employee.relative,model_hr_employee_relative,hr.group_hr_manager,1,1,1,1 +access_hr_employee_relative_relation_employee,hr.employee.relative.relation,model_hr_employee_relative_relation,base.group_user,1,0,0,0 +access_hr_employee_relative_relation_user,hr.employee.relative.relation,model_hr_employee_relative_relation,hr.group_hr_manager,1,1,1,1 diff --git a/hr_employee_relative/static/description/icon.png b/hr_employee_relative/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/hr_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html new file mode 100644 index 00000000000..d2cf12b655a --- /dev/null +++ b/hr_employee_relative/static/description/index.html @@ -0,0 +1,419 @@ + + + + + + +HR Employee Relatives + + + +
+

HR Employee Relatives

+ + +

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

+

This module allows storing information about employee’s family.

+

Table of contents

+ +
+

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

+
    +
  • Brainbean Apps
  • +
+
+ +
+

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_employee_relative/tests/__init__.py b/hr_employee_relative/tests/__init__.py new file mode 100644 index 00000000000..5cda1739c90 --- /dev/null +++ b/hr_employee_relative/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import test_hr_employee_relatives diff --git a/hr_employee_relative/tests/test_hr_employee_relatives.py b/hr_employee_relative/tests/test_hr_employee_relatives.py new file mode 100644 index 00000000000..8e65c1ccb00 --- /dev/null +++ b/hr_employee_relative/tests/test_hr_employee_relatives.py @@ -0,0 +1,31 @@ +# Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.tests import common + +from datetime import datetime +from dateutil.relativedelta import relativedelta + +_ns = 'hr_employee_relative' + + +class TestHrEmployeeRelatives(common.TransactionCase): + + def setUp(self): + super().setUp() + self.Employee = self.env['hr.employee'] + self.EmployeeRelative = self.env['hr.employee.relative'] + + def test_age_calculation(self): + employee = self.Employee.create({ + 'name': 'Employee', + 'relative_ids': [ + (0, 0, { + 'relation_id': self.env.ref(_ns + '.relation_sibling').id, + 'name': 'Relative', + 'date_of_birth': datetime.now() + relativedelta(years=-42), + }) + ], + }) + relative = self.EmployeeRelative.browse(employee.relative_ids[0].id) + self.assertEqual(int(relative.age), 42) diff --git a/hr_employee_relative/views/hr_employee.xml b/hr_employee_relative/views/hr_employee.xml new file mode 100644 index 00000000000..462c2d01973 --- /dev/null +++ b/hr_employee_relative/views/hr_employee.xml @@ -0,0 +1,24 @@ + + + + + + hr.employee.view.form.inherit.relatives + hr.employee + + + + + + + + + + + + + + diff --git a/hr_employee_relative/views/hr_employee_relative.xml b/hr_employee_relative/views/hr_employee_relative.xml new file mode 100644 index 00000000000..ab26febb866 --- /dev/null +++ b/hr_employee_relative/views/hr_employee_relative.xml @@ -0,0 +1,24 @@ + + + + + + hr.employee.relative.view.tree + hr.employee.relative + + + + + + + + + + + + + + From 5156390648befc452d1c5cffeea096c293de7c79 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Wed, 14 Aug 2019 10:27:54 +0200 Subject: [PATCH 02/24] [12.0][IMP] Add migration script hr_family -> hr_employee_relative --- .../migrations/12.0.1.0.0/post-migration.py | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 hr_employee_relative/migrations/12.0.1.0.0/post-migration.py diff --git a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py new file mode 100644 index 00000000000..22c4a0ed851 --- /dev/null +++ b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py @@ -0,0 +1,50 @@ +# Copyright 2019 Creu Blanca +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openupgradelib import openupgrade + + +@openupgrade.migrate() +def migrate(env, version): + cr = env.cr + columns = 'fam_spouse, fam_spouse_employer, fam_spouse_tel, fam_father,' \ + ' fam_father_date_of_birth, fam_mother, fam_mother_date_of_birth' + cr.execute('SELECT id, %s FROM hr_employee' % columns) + + relation_spouse = env.ref('hr_employee_relative.relation_spouse').id + relation_parent = env.ref('hr_employee_relative.relation_parent').id + relation_child = env.ref('hr_employee_relative.relation_child').id + + for employee in cr.fetchall(): + if employee[1] or employee[2] or employee[3]: + env['hr.employee.relative'].create({ + 'employee_id': employee[0], + 'name': employee[1] or 'Spouse', + 'relation_id': relation_spouse + }) + if employee[4] or employee[5]: + env['hr.employee.relative'].create({ + 'employee_id': employee[0], + 'name': employee[4] or 'Father', + 'date_of_birth': employee[5] or False, + 'relation_id': relation_parent + }) + if employee[6] or employee[7]: + env['hr.employee.relative'].create({ + 'employee_id': employee[0], + 'name': employee[6] or 'Mother', + 'date_of_birth': employee[7] or False, + 'relation_id': relation_parent + }) + cr.execute( + 'SELECT name, date_of_birth, employee_id, gender' + ' FROM hr_employee_children' + ) + for children in cr.fetchall(): + env['hr.employee.relative'].create({ + 'name': children[0] or 'Child', + 'date_of_birth': children[1] or False, + 'employee_id': children[2], + 'gender': children[3] or False, + 'relation_id': relation_child + }) From 1dbe919120f4348a7939c530ed1014c52cbcffe4 Mon Sep 17 00:00:00 2001 From: Jaime Arroyo Date: Tue, 3 Sep 2019 12:01:30 +0200 Subject: [PATCH 03/24] [12.0][IMP] Add phone number and job to hr_employee_relative --- hr_employee_relative/__manifest__.py | 2 +- hr_employee_relative/i18n/es.po | 187 +++++++++++++++++ hr_employee_relative/i18n/fr.po | 12 +- hr_employee_relative/i18n/hr.po | 188 ++++++++++++++++++ .../i18n/hr_employee_relative.pot | 10 + .../migrations/12.0.1.0.0/post-migration.py | 2 + .../models/hr_employee_relative.py | 4 + .../views/hr_employee_relative.xml | 2 + 8 files changed, 405 insertions(+), 2 deletions(-) create mode 100644 hr_employee_relative/i18n/es.po create mode 100644 hr_employee_relative/i18n/hr.po diff --git a/hr_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index 9984c3d1aaa..bc1c4ba9b19 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -3,7 +3,7 @@ { 'name': 'HR Employee Relatives', - 'version': '12.0.1.0.0', + 'version': '12.0.1.1.0', 'category': 'Human Resources', 'website': 'https://github.com/OCA/hr', 'author': diff --git a/hr_employee_relative/i18n/es.po b/hr_employee_relative/i18n/es.po new file mode 100644 index 00000000000..0b9054ee0e8 --- /dev/null +++ b/hr_employee_relative/i18n/es.po @@ -0,0 +1,187 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-12-03 16:06+0000\n" +"Last-Translator: Pedro S. Lopez \n" +"Language-Team: none\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 3.9.1\n" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "Edad" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "Hijo(a)" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "Primo(a)" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "Creado por" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "Creado en" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "Fecha de nacimiento" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "Nombre a mostrar" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "Empleado" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "Parientes de Empleados" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Female" +msgstr "Femenino" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "Sexo" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "Nieto(a)" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "Abuelo(a)" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "RRHH Parientes de Empleados" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "RRHH Relación de Pariente de Empleado" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "ID" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "Profesión" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "Última modificación el" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "Última actualización por" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "Última actualización el" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Male" +msgstr "Masculino" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "Nombre" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "Notas" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Other" +msgstr "Otro" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "Padre" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "Contacto" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "Teléfono" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "Parentesco" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "Parientes" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "Hermano(a)" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "Pareja" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "Cónyugue" diff --git a/hr_employee_relative/i18n/fr.po b/hr_employee_relative/i18n/fr.po index 65bc11e6d7f..20990def83e 100644 --- a/hr_employee_relative/i18n/fr.po +++ b/hr_employee_relative/i18n/fr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_employee_relative +# * hr_employee_relative # msgid "" msgstr "" @@ -101,6 +101,11 @@ msgstr "" msgid "ID" msgstr "ID" +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update @@ -149,6 +154,11 @@ msgstr "Parent" msgid "Partner" msgstr "Partenaire" +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name diff --git a/hr_employee_relative/i18n/hr.po b/hr_employee_relative/i18n/hr.po new file mode 100644 index 00000000000..652c9946dd2 --- /dev/null +++ b/hr_employee_relative/i18n/hr.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-11-18 14:34+0000\n" +"Last-Translator: Bole \n" +"Language-Team: none\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" +"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.8\n" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "Dob" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "Djete" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "Rođak" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "Kreirao" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "Kreirano" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "Datum rođenja" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "Naziv" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "Djelatnik" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "Rodbina djelatnika" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Female" +msgstr "Žensko" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "Spol" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "Unuk" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "Pra roditelj" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "Rodbina djelatnika" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Male" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "" + +#. module: hr_employee_relative +#: selection:hr.employee.relative,gender:0 +msgid "Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "" diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot index c2d893c21ce..9fadc9e8e71 100644 --- a/hr_employee_relative/i18n/hr_employee_relative.pot +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -98,6 +98,11 @@ msgstr "" msgid "ID" msgstr "" +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update @@ -146,6 +151,11 @@ msgstr "" msgid "Partner" msgstr "" +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name diff --git a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py index 22c4a0ed851..b75cead9dae 100644 --- a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py +++ b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py @@ -19,6 +19,8 @@ def migrate(env, version): if employee[1] or employee[2] or employee[3]: env['hr.employee.relative'].create({ 'employee_id': employee[0], + 'job': employee[2], + 'phone_number': employee[3], 'name': employee[1] or 'Spouse', 'relation_id': relation_spouse }) diff --git a/hr_employee_relative/models/hr_employee_relative.py b/hr_employee_relative/models/hr_employee_relative.py index a365c580f5e..ab07dfe6332 100644 --- a/hr_employee_relative/models/hr_employee_relative.py +++ b/hr_employee_relative/models/hr_employee_relative.py @@ -45,6 +45,10 @@ class HrEmployeeRelative(models.Model): age = fields.Float( compute='_compute_age', ) + + job = fields.Char() + phone_number = fields.Char() + notes = fields.Text( string='Notes', ) diff --git a/hr_employee_relative/views/hr_employee_relative.xml b/hr_employee_relative/views/hr_employee_relative.xml index ab26febb866..eafb59e3f21 100644 --- a/hr_employee_relative/views/hr_employee_relative.xml +++ b/hr_employee_relative/views/hr_employee_relative.xml @@ -16,6 +16,8 @@ + + From 3cbf15bc0b5811a17ae3fb83b578c08a0929d35f Mon Sep 17 00:00:00 2001 From: Saran440 Date: Mon, 30 Mar 2020 15:57:30 +0700 Subject: [PATCH 04/24] [IMP] hr_employee_relative: black, isort --- hr_employee_relative/__manifest__.py | 40 ++++------ .../data/data_relative_relation.xml | 20 +++-- .../migrations/12.0.1.0.0/post-migration.py | 77 +++++++++++-------- hr_employee_relative/models/hr_employee.py | 8 +- .../models/hr_employee_relative.py | 55 +++++-------- .../models/hr_employee_relative_relation.py | 12 +-- .../tests/test_hr_employee_relatives.py | 38 +++++---- hr_employee_relative/views/hr_employee.xml | 12 ++- .../views/hr_employee_relative.xml | 20 +++-- 9 files changed, 130 insertions(+), 152 deletions(-) diff --git a/hr_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index bc1c4ba9b19..c1a983d37b4 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -2,29 +2,21 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'HR Employee Relatives', - 'version': '12.0.1.1.0', - 'category': 'Human Resources', - 'website': 'https://github.com/OCA/hr', - 'author': - 'Brainbean Apps, ' - 'Odoo Community Association (OCA)', - 'license': 'AGPL-3', - 'installable': True, - 'application': False, - 'summary': 'Allows storing information about employee\'s family', - 'depends': [ - 'hr', - ], - 'external_dependencies': { - 'python': [ - 'dateutil', - ], - }, - 'data': [ - 'data/data_relative_relation.xml', - 'security/ir.model.access.csv', - 'views/hr_employee.xml', - 'views/hr_employee_relative.xml', + "name": "HR Employee Relatives", + "version": "12.0.1.1.0", + "category": "Human Resources", + "website": "https://github.com/OCA/hr", + "author": "Brainbean Apps, " "Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "application": False, + "summary": "Allows storing information about employee's family", + "depends": ["hr"], + "external_dependencies": {"python": ["dateutil"]}, + "data": [ + "data/data_relative_relation.xml", + "security/ir.model.access.csv", + "views/hr_employee.xml", + "views/hr_employee_relative.xml", ], } diff --git a/hr_employee_relative/data/data_relative_relation.xml b/hr_employee_relative/data/data_relative_relation.xml index c9329e664ba..c1f805fb727 100644 --- a/hr_employee_relative/data/data_relative_relation.xml +++ b/hr_employee_relative/data/data_relative_relation.xml @@ -1,36 +1,34 @@ - + - - Spouse + Spouse - Significant Other + Significant Other - Child + Child - Parent + Parent - Sibling + Sibling - Cousin + Cousin - Grandparent + Grandparent - Grandchild + Grandchild - diff --git a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py index b75cead9dae..9bebec5b642 100644 --- a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py +++ b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py @@ -7,46 +7,55 @@ @openupgrade.migrate() def migrate(env, version): cr = env.cr - columns = 'fam_spouse, fam_spouse_employer, fam_spouse_tel, fam_father,' \ - ' fam_father_date_of_birth, fam_mother, fam_mother_date_of_birth' - cr.execute('SELECT id, %s FROM hr_employee' % columns) + columns = ( + "fam_spouse, fam_spouse_employer, fam_spouse_tel, fam_father," + " fam_father_date_of_birth, fam_mother, fam_mother_date_of_birth" + ) + cr.execute("SELECT id, %s FROM hr_employee" % columns) - relation_spouse = env.ref('hr_employee_relative.relation_spouse').id - relation_parent = env.ref('hr_employee_relative.relation_parent').id - relation_child = env.ref('hr_employee_relative.relation_child').id + relation_spouse = env.ref("hr_employee_relative.relation_spouse").id + relation_parent = env.ref("hr_employee_relative.relation_parent").id + relation_child = env.ref("hr_employee_relative.relation_child").id for employee in cr.fetchall(): if employee[1] or employee[2] or employee[3]: - env['hr.employee.relative'].create({ - 'employee_id': employee[0], - 'job': employee[2], - 'phone_number': employee[3], - 'name': employee[1] or 'Spouse', - 'relation_id': relation_spouse - }) + env["hr.employee.relative"].create( + { + "employee_id": employee[0], + "job": employee[2], + "phone_number": employee[3], + "name": employee[1] or "Spouse", + "relation_id": relation_spouse, + } + ) if employee[4] or employee[5]: - env['hr.employee.relative'].create({ - 'employee_id': employee[0], - 'name': employee[4] or 'Father', - 'date_of_birth': employee[5] or False, - 'relation_id': relation_parent - }) + env["hr.employee.relative"].create( + { + "employee_id": employee[0], + "name": employee[4] or "Father", + "date_of_birth": employee[5] or False, + "relation_id": relation_parent, + } + ) if employee[6] or employee[7]: - env['hr.employee.relative'].create({ - 'employee_id': employee[0], - 'name': employee[6] or 'Mother', - 'date_of_birth': employee[7] or False, - 'relation_id': relation_parent - }) + env["hr.employee.relative"].create( + { + "employee_id": employee[0], + "name": employee[6] or "Mother", + "date_of_birth": employee[7] or False, + "relation_id": relation_parent, + } + ) cr.execute( - 'SELECT name, date_of_birth, employee_id, gender' - ' FROM hr_employee_children' + "SELECT name, date_of_birth, employee_id, gender" " FROM hr_employee_children" ) for children in cr.fetchall(): - env['hr.employee.relative'].create({ - 'name': children[0] or 'Child', - 'date_of_birth': children[1] or False, - 'employee_id': children[2], - 'gender': children[3] or False, - 'relation_id': relation_child - }) + env["hr.employee.relative"].create( + { + "name": children[0] or "Child", + "date_of_birth": children[1] or False, + "employee_id": children[2], + "gender": children[3] or False, + "relation_id": relation_child, + } + ) diff --git a/hr_employee_relative/models/hr_employee.py b/hr_employee_relative/models/hr_employee.py index 0c529383ffd..9d8707e6e3a 100644 --- a/hr_employee_relative/models/hr_employee.py +++ b/hr_employee_relative/models/hr_employee.py @@ -5,10 +5,10 @@ class HrEmployee(models.Model): - _inherit = 'hr.employee' + _inherit = "hr.employee" relative_ids = fields.One2many( - string='Relatives', - comodel_name='hr.employee.relative', - inverse_name='employee_id', + string="Relatives", + comodel_name="hr.employee.relative", + inverse_name="employee_id", ) diff --git a/hr_employee_relative/models/hr_employee_relative.py b/hr_employee_relative/models/hr_employee_relative.py index ab07dfe6332..6a3def6a3c5 100644 --- a/hr_employee_relative/models/hr_employee_relative.py +++ b/hr_employee_relative/models/hr_employee_relative.py @@ -1,65 +1,46 @@ # Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import fields, models, api - from datetime import datetime + from dateutil.relativedelta import relativedelta +from odoo import api, fields, models + class HrEmployeeRelative(models.Model): - _name = 'hr.employee.relative' - _description = 'HR Employee Relative' + _name = "hr.employee.relative" + _description = "HR Employee Relative" - employee_id = fields.Many2one( - string='Employee', - comodel_name='hr.employee', - ) + employee_id = fields.Many2one(string="Employee", comodel_name="hr.employee",) relation_id = fields.Many2one( - 'hr.employee.relative.relation', - string='Relation', - required=True, - ) - name = fields.Char( - string='Name', - required=True, + "hr.employee.relative.relation", string="Relation", required=True, ) + name = fields.Char(string="Name", required=True,) partner_id = fields.Many2one( - 'res.partner', - string='Partner', - domain=[ - '&', ('is_company', '=', False), ('type', '=', 'contact') - ], + "res.partner", + string="Partner", + domain=["&", ("is_company", "=", False), ("type", "=", "contact")], ) gender = fields.Selection( - string='Gender', - selection=[ - ('male', 'Male'), - ('female', 'Female'), - ('other', 'Other'), - ], - ) - date_of_birth = fields.Date( - string='Date of Birth', - ) - age = fields.Float( - compute='_compute_age', + string="Gender", + selection=[("male", "Male"), ("female", "Female"), ("other", "Other")], ) + date_of_birth = fields.Date(string="Date of Birth",) + age = fields.Float(compute="_compute_age",) job = fields.Char() phone_number = fields.Char() - notes = fields.Text( - string='Notes', - ) + notes = fields.Text(string="Notes",) - @api.depends('date_of_birth') + @api.depends("date_of_birth") def _compute_age(self): for record in self: age = relativedelta(datetime.now(), record.date_of_birth) record.age = age.years + (age.months / 12) - @api.onchange('partner_id') + @api.onchange("partner_id") def _onchange_partner_id(self): if self.partner_id: self.name = self.partner_id.display_name diff --git a/hr_employee_relative/models/hr_employee_relative_relation.py b/hr_employee_relative/models/hr_employee_relative_relation.py index accb680ecd2..60137215549 100644 --- a/hr_employee_relative/models/hr_employee_relative_relation.py +++ b/hr_employee_relative/models/hr_employee_relative_relation.py @@ -5,11 +5,7 @@ class HrEmployeeRelativeRelation(models.Model): - _name = 'hr.employee.relative.relation' - _description = 'HR Employee Relative Relation' - - name = fields.Char( - string='Relation', - required=True, - translate=True - ) + _name = "hr.employee.relative.relation" + _description = "HR Employee Relative Relation" + + name = fields.Char(string="Relation", required=True, translate=True) diff --git a/hr_employee_relative/tests/test_hr_employee_relatives.py b/hr_employee_relative/tests/test_hr_employee_relatives.py index 8e65c1ccb00..8b61ae7e9df 100644 --- a/hr_employee_relative/tests/test_hr_employee_relatives.py +++ b/hr_employee_relative/tests/test_hr_employee_relatives.py @@ -1,31 +1,37 @@ # Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). -from odoo.tests import common - from datetime import datetime + from dateutil.relativedelta import relativedelta -_ns = 'hr_employee_relative' +from odoo.tests import common +_ns = "hr_employee_relative" -class TestHrEmployeeRelatives(common.TransactionCase): +class TestHrEmployeeRelatives(common.TransactionCase): def setUp(self): super().setUp() - self.Employee = self.env['hr.employee'] - self.EmployeeRelative = self.env['hr.employee.relative'] + self.Employee = self.env["hr.employee"] + self.EmployeeRelative = self.env["hr.employee.relative"] def test_age_calculation(self): - employee = self.Employee.create({ - 'name': 'Employee', - 'relative_ids': [ - (0, 0, { - 'relation_id': self.env.ref(_ns + '.relation_sibling').id, - 'name': 'Relative', - 'date_of_birth': datetime.now() + relativedelta(years=-42), - }) - ], - }) + employee = self.Employee.create( + { + "name": "Employee", + "relative_ids": [ + ( + 0, + 0, + { + "relation_id": self.env.ref(_ns + ".relation_sibling").id, + "name": "Relative", + "date_of_birth": datetime.now() + relativedelta(years=-42), + }, + ) + ], + } + ) relative = self.EmployeeRelative.browse(employee.relative_ids[0].id) self.assertEqual(int(relative.age), 42) diff --git a/hr_employee_relative/views/hr_employee.xml b/hr_employee_relative/views/hr_employee.xml index 462c2d01973..653f2aa260f 100644 --- a/hr_employee_relative/views/hr_employee.xml +++ b/hr_employee_relative/views/hr_employee.xml @@ -4,21 +4,19 @@ Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - hr.employee.view.form.inherit.relatives hr.employee - + - - - + + + - + - diff --git a/hr_employee_relative/views/hr_employee_relative.xml b/hr_employee_relative/views/hr_employee_relative.xml index eafb59e3f21..dfb73092f46 100644 --- a/hr_employee_relative/views/hr_employee_relative.xml +++ b/hr_employee_relative/views/hr_employee_relative.xml @@ -4,23 +4,21 @@ Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - hr.employee.relative.view.tree hr.employee.relative - - - - - - - - - + + + + + + + + + - From a95bec665c00ff4e342084c4aeda599d2b053e5f Mon Sep 17 00:00:00 2001 From: Saran440 Date: Mon, 30 Mar 2020 15:59:45 +0700 Subject: [PATCH 05/24] [13.0][MIG] hr_employee_relative --- hr_employee_relative/README.rst | 11 ++-- hr_employee_relative/__manifest__.py | 4 +- hr_employee_relative/i18n/es.po | 8 +-- hr_employee_relative/i18n/fr.po | 6 +- hr_employee_relative/i18n/hr.po | 12 ++-- .../i18n/hr_employee_relative.pot | 13 ++-- .../migrations/12.0.1.0.0/post-migration.py | 61 ------------------- .../models/hr_employee_relative.py | 12 ++-- hr_employee_relative/readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 7 ++- .../tests/test_hr_employee_relatives.py | 15 ++++- 11 files changed, 52 insertions(+), 98 deletions(-) delete mode 100644 hr_employee_relative/migrations/12.0.1.0.0/post-migration.py diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index 6e8743a716d..6d213f2e57b 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -14,13 +14,13 @@ HR Employee Relatives :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/12.0/hr_employee_relative + :target: https://github.com/OCA/hr/tree/13.0/hr_employee_relative :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_employee_relative + :target: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_relative :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/12.0 + :target: https://runbot.odoo-community.org/runbot/116/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -54,6 +54,7 @@ Contributors ~~~~~~~~~~~~ * Alexey Pelykh +* Saran Lim. Maintainers ~~~~~~~~~~~ @@ -68,6 +69,6 @@ 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. +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_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index c1a983d37b4..479cb879739 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -3,10 +3,10 @@ { "name": "HR Employee Relatives", - "version": "12.0.1.1.0", + "version": "13.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", - "author": "Brainbean Apps, " "Odoo Community Association (OCA)", + "author": "Brainbean Apps, Odoo Community Association (OCA)", "license": "AGPL-3", "installable": True, "application": False, diff --git a/hr_employee_relative/i18n/es.po b/hr_employee_relative/i18n/es.po index 0b9054ee0e8..3d425fb51e8 100644 --- a/hr_employee_relative/i18n/es.po +++ b/hr_employee_relative/i18n/es.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_employee_relative +# * hr_employee_relative # msgid "" msgstr "" @@ -66,7 +66,7 @@ msgid "Employee Relatives" msgstr "Parientes de Empleados" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" msgstr "Femenino" @@ -125,7 +125,7 @@ msgid "Last Updated on" msgstr "Última actualización el" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" msgstr "Masculino" @@ -140,7 +140,7 @@ msgid "Notes" msgstr "Notas" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" msgstr "Otro" diff --git a/hr_employee_relative/i18n/fr.po b/hr_employee_relative/i18n/fr.po index 20990def83e..52490769987 100644 --- a/hr_employee_relative/i18n/fr.po +++ b/hr_employee_relative/i18n/fr.po @@ -66,7 +66,7 @@ msgid "Employee Relatives" msgstr "Proches" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" msgstr "Feminin" @@ -125,7 +125,7 @@ msgid "Last Updated on" msgstr "Dernière mise à jour le" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" msgstr "Masculin" @@ -140,7 +140,7 @@ msgid "Notes" msgstr "Notes" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" msgstr "Autre" diff --git a/hr_employee_relative/i18n/hr.po b/hr_employee_relative/i18n/hr.po index 652c9946dd2..858f7e7cc42 100644 --- a/hr_employee_relative/i18n/hr.po +++ b/hr_employee_relative/i18n/hr.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_employee_relative +# * hr_employee_relative # msgid "" msgstr "" @@ -13,8 +13,8 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=" -"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" "X-Generator: Weblate 3.8\n" #. module: hr_employee_relative @@ -67,7 +67,7 @@ msgid "Employee Relatives" msgstr "Rodbina djelatnika" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" msgstr "Žensko" @@ -126,7 +126,7 @@ msgid "Last Updated on" msgstr "" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" msgstr "" @@ -141,7 +141,7 @@ msgid "Notes" msgstr "" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" msgstr "" diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot index 9fadc9e8e71..b1a655f5139 100644 --- a/hr_employee_relative/i18n/hr_employee_relative.pot +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_employee_relative +# * hr_employee_relative # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -63,7 +63,7 @@ msgid "Employee Relatives" msgstr "" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" msgstr "" @@ -122,7 +122,7 @@ msgid "Last Updated on" msgstr "" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" msgstr "" @@ -137,7 +137,7 @@ msgid "Notes" msgstr "" #. module: hr_employee_relative -#: selection:hr.employee.relative,gender:0 +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" msgstr "" @@ -182,4 +182,3 @@ msgstr "" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "" - diff --git a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py b/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py deleted file mode 100644 index 9bebec5b642..00000000000 --- a/hr_employee_relative/migrations/12.0.1.0.0/post-migration.py +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright 2019 Creu Blanca -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(env, version): - cr = env.cr - columns = ( - "fam_spouse, fam_spouse_employer, fam_spouse_tel, fam_father," - " fam_father_date_of_birth, fam_mother, fam_mother_date_of_birth" - ) - cr.execute("SELECT id, %s FROM hr_employee" % columns) - - relation_spouse = env.ref("hr_employee_relative.relation_spouse").id - relation_parent = env.ref("hr_employee_relative.relation_parent").id - relation_child = env.ref("hr_employee_relative.relation_child").id - - for employee in cr.fetchall(): - if employee[1] or employee[2] or employee[3]: - env["hr.employee.relative"].create( - { - "employee_id": employee[0], - "job": employee[2], - "phone_number": employee[3], - "name": employee[1] or "Spouse", - "relation_id": relation_spouse, - } - ) - if employee[4] or employee[5]: - env["hr.employee.relative"].create( - { - "employee_id": employee[0], - "name": employee[4] or "Father", - "date_of_birth": employee[5] or False, - "relation_id": relation_parent, - } - ) - if employee[6] or employee[7]: - env["hr.employee.relative"].create( - { - "employee_id": employee[0], - "name": employee[6] or "Mother", - "date_of_birth": employee[7] or False, - "relation_id": relation_parent, - } - ) - cr.execute( - "SELECT name, date_of_birth, employee_id, gender" " FROM hr_employee_children" - ) - for children in cr.fetchall(): - env["hr.employee.relative"].create( - { - "name": children[0] or "Child", - "date_of_birth": children[1] or False, - "employee_id": children[2], - "gender": children[3] or False, - "relation_id": relation_child, - } - ) diff --git a/hr_employee_relative/models/hr_employee_relative.py b/hr_employee_relative/models/hr_employee_relative.py index 6a3def6a3c5..925f96bf48d 100644 --- a/hr_employee_relative/models/hr_employee_relative.py +++ b/hr_employee_relative/models/hr_employee_relative.py @@ -12,11 +12,11 @@ class HrEmployeeRelative(models.Model): _name = "hr.employee.relative" _description = "HR Employee Relative" - employee_id = fields.Many2one(string="Employee", comodel_name="hr.employee",) + employee_id = fields.Many2one(string="Employee", comodel_name="hr.employee") relation_id = fields.Many2one( - "hr.employee.relative.relation", string="Relation", required=True, + "hr.employee.relative.relation", string="Relation", required=True ) - name = fields.Char(string="Name", required=True,) + name = fields.Char(string="Name", required=True) partner_id = fields.Many2one( "res.partner", string="Partner", @@ -26,13 +26,13 @@ class HrEmployeeRelative(models.Model): string="Gender", selection=[("male", "Male"), ("female", "Female"), ("other", "Other")], ) - date_of_birth = fields.Date(string="Date of Birth",) - age = fields.Float(compute="_compute_age",) + date_of_birth = fields.Date(string="Date of Birth") + age = fields.Float(compute="_compute_age") job = fields.Char() phone_number = fields.Char() - notes = fields.Text(string="Notes",) + notes = fields.Text(string="Notes") @api.depends("date_of_birth") def _compute_age(self): diff --git a/hr_employee_relative/readme/CONTRIBUTORS.rst b/hr_employee_relative/readme/CONTRIBUTORS.rst index 1c6a35a1e35..4ebc5c8b18b 100644 --- a/hr_employee_relative/readme/CONTRIBUTORS.rst +++ b/hr_employee_relative/readme/CONTRIBUTORS.rst @@ -1 +1,2 @@ * Alexey Pelykh +* Saran Lim. diff --git a/hr_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html index d2cf12b655a..12b6f844ac9 100644 --- a/hr_employee_relative/static/description/index.html +++ b/hr_employee_relative/static/description/index.html @@ -367,7 +367,7 @@

HR Employee Relatives

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module allows storing information about employee’s family.

Table of contents

@@ -386,7 +386,7 @@

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.

+feedback.

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

@@ -401,6 +401,7 @@

Authors

Contributors

@@ -410,7 +411,7 @@

Maintainers

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.

+

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_employee_relative/tests/test_hr_employee_relatives.py b/hr_employee_relative/tests/test_hr_employee_relatives.py index 8b61ae7e9df..a000f4296cb 100644 --- a/hr_employee_relative/tests/test_hr_employee_relatives.py +++ b/hr_employee_relative/tests/test_hr_employee_relatives.py @@ -5,7 +5,7 @@ from dateutil.relativedelta import relativedelta -from odoo.tests import common +from odoo.tests import Form, common _ns = "hr_employee_relative" @@ -26,6 +26,7 @@ def test_age_calculation(self): 0, { "relation_id": self.env.ref(_ns + ".relation_sibling").id, + "partner_id": self.env.ref("base.res_partner_1").id, "name": "Relative", "date_of_birth": datetime.now() + relativedelta(years=-42), }, @@ -35,3 +36,15 @@ def test_age_calculation(self): ) relative = self.EmployeeRelative.browse(employee.relative_ids[0].id) self.assertEqual(int(relative.age), 42) + # onchange partner + ctx = { + "active_ids": [relative.id], + "active_id": relative.id, + "active_model": "hr.employee.relative", + } + self.assertEqual(relative.name, "Relative") + with Form(self.EmployeeRelative.with_context(ctx)) as f: + f.partner_id = self.env.ref("base.res_partner_2") + f.relation_id = self.env.ref(_ns + ".relation_sibling") + relative = f.save() + self.assertEqual(relative.name, relative.partner_id.display_name) From 7a462de5f2d59fed3dd71ebbd3caef8afc08f1b7 Mon Sep 17 00:00:00 2001 From: Alexey Pelykh Date: Sun, 8 Nov 2020 08:13:49 +0200 Subject: [PATCH 06/24] [UPD] Brainbean Apps => CorporateHub --- hr_employee_relative/README.rst | 7 +++++-- hr_employee_relative/__manifest__.py | 3 ++- hr_employee_relative/readme/CONTRIBUTORS.rst | 5 ++++- hr_employee_relative/static/description/index.html | 7 +++++-- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index 6d213f2e57b..c66b69283db 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -48,12 +48,15 @@ Credits Authors ~~~~~~~ -* Brainbean Apps +* CorporateHub Contributors ~~~~~~~~~~~~ -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh + * Saran Lim. Maintainers diff --git a/hr_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index 479cb879739..6f3a906e7fc 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -1,4 +1,5 @@ # Copyright (C) 2018 Brainbean Apps (https://brainbeanapps.com) +# Copyright 2020 CorporateHub (https://corporatehub.eu) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { @@ -6,7 +7,7 @@ "version": "13.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", - "author": "Brainbean Apps, Odoo Community Association (OCA)", + "author": "CorporateHub, Odoo Community Association (OCA)", "license": "AGPL-3", "installable": True, "application": False, diff --git a/hr_employee_relative/readme/CONTRIBUTORS.rst b/hr_employee_relative/readme/CONTRIBUTORS.rst index 4ebc5c8b18b..1d4aab89524 100644 --- a/hr_employee_relative/readme/CONTRIBUTORS.rst +++ b/hr_employee_relative/readme/CONTRIBUTORS.rst @@ -1,2 +1,5 @@ -* Alexey Pelykh +* `CorporateHub `__ + + * Alexey Pelykh + * Saran Lim. diff --git a/hr_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html index 12b6f844ac9..9b26cfab7cf 100644 --- a/hr_employee_relative/static/description/index.html +++ b/hr_employee_relative/static/description/index.html @@ -394,13 +394,16 @@

Credits

Authors

    -
  • Brainbean Apps
  • +
  • CorporateHub
From 69417f3ae304df5359d69f7ebd683b9befc60f6d Mon Sep 17 00:00:00 2001 From: aphon61bank Date: Thu, 12 Nov 2020 16:18:30 +0700 Subject: [PATCH 07/24] [14.0][MIG] hr_employee_relative --- hr_employee_relative/README.rst | 12 +- hr_employee_relative/__manifest__.py | 2 +- .../i18n/hr_employee_relative.pot | 5 +- hr_employee_relative/i18n/pt_BR.po | 188 ++++++++++++++++++ hr_employee_relative/readme/CONTRIBUTORS.rst | 2 + .../static/description/index.html | 7 +- 6 files changed, 206 insertions(+), 10 deletions(-) create mode 100644 hr_employee_relative/i18n/pt_BR.po diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index c66b69283db..82f2528cfd6 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -14,13 +14,13 @@ HR Employee Relatives :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/13.0/hr_employee_relative + :target: https://github.com/OCA/hr/tree/14.0/hr_employee_relative :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_relative + :target: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_relative :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/13.0 + :target: https://runbot.odoo-community.org/runbot/116/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -59,6 +59,8 @@ Contributors * Saran Lim. +* Nattapong W. + Maintainers ~~~~~~~~~~~ @@ -72,6 +74,6 @@ 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. +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_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index 6f3a906e7fc..77c2925bf61 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -4,7 +4,7 @@ { "name": "HR Employee Relatives", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "CorporateHub, Odoo Community Association (OCA)", diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot index b1a655f5139..72a2be11e24 100644 --- a/hr_employee_relative/i18n/hr_employee_relative.pot +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -46,6 +46,7 @@ msgid "Date of Birth" msgstr "" #. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" @@ -93,6 +94,7 @@ msgid "HR Employee Relative Relation" msgstr "" #. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" @@ -104,6 +106,7 @@ msgid "Job" msgstr "" #. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" diff --git a/hr_employee_relative/i18n/pt_BR.po b/hr_employee_relative/i18n/pt_BR.po new file mode 100644 index 00000000000..d4712e99119 --- /dev/null +++ b/hr_employee_relative/i18n/pt_BR.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: pt_BR\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_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female +msgid "Female" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male +msgid "Male" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other +msgid "Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "" diff --git a/hr_employee_relative/readme/CONTRIBUTORS.rst b/hr_employee_relative/readme/CONTRIBUTORS.rst index 1d4aab89524..a1838cb4938 100644 --- a/hr_employee_relative/readme/CONTRIBUTORS.rst +++ b/hr_employee_relative/readme/CONTRIBUTORS.rst @@ -3,3 +3,5 @@ * Alexey Pelykh * Saran Lim. + +* Nattapong W. diff --git a/hr_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html index 9b26cfab7cf..88a2375a1a9 100644 --- a/hr_employee_relative/static/description/index.html +++ b/hr_employee_relative/static/description/index.html @@ -367,7 +367,7 @@

HR Employee Relatives

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module allows storing information about employee’s family.

Table of contents

@@ -386,7 +386,7 @@

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.

+feedback.

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

@@ -405,6 +405,7 @@

Contributors

  • Saran Lim. <saranl@ecosoft.co.th>
  • +
  • Nattapong W. <aphon61bank@gmail.com>
  • @@ -414,7 +415,7 @@

    Maintainers

    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.

    +

    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.

    From e45a18790b1efdf2d27f8d48a4c6fe200a69c031 Mon Sep 17 00:00:00 2001 From: Eder Brito Date: Sat, 13 Mar 2021 01:38:49 +0000 Subject: [PATCH 08/24] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (32 of 32 strings) Translation: hr-14.0/hr-14.0-hr_employee_relative Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_relative/pt_BR/ --- hr_employee_relative/i18n/pt_BR.po | 68 +++++++++++++++--------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/hr_employee_relative/i18n/pt_BR.po b/hr_employee_relative/i18n/pt_BR.po index d4712e99119..380f0305b65 100644 --- a/hr_employee_relative/i18n/pt_BR.po +++ b/hr_employee_relative/i18n/pt_BR.po @@ -6,183 +6,185 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2021-03-13 03:46+0000\n" +"Last-Translator: Eder Brito \n" "Language-Team: none\n" "Language: pt_BR\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.3.2\n" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age msgid "Age" -msgstr "" +msgstr "Idade" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child msgid "Child" -msgstr "" +msgstr "Criança" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin msgid "Cousin" -msgstr "" +msgstr "Primo" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid msgid "Created by" -msgstr "" +msgstr "Criado por" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date msgid "Created on" -msgstr "" +msgstr "Criado em" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth msgid "Date of Birth" -msgstr "" +msgstr "Data de Nascimento" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" -msgstr "" +msgstr "Nome de Exibição" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id msgid "Employee" -msgstr "" +msgstr "Funcionário" #. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree msgid "Employee Relatives" -msgstr "" +msgstr "Parentes do Funcionário" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" -msgstr "" +msgstr "Feminino" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender msgid "Gender" -msgstr "" +msgstr "Gênero" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild msgid "Grandchild" -msgstr "" +msgstr "Neto(a)" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent msgid "Grandparent" -msgstr "" +msgstr "Avô" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative msgid "HR Employee Relative" -msgstr "" +msgstr "Parentes de Funcionário" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation msgid "HR Employee Relative Relation" -msgstr "" +msgstr "Relação de Parentesco de Funcionário" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" -msgstr "" +msgstr "ID" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job msgid "Job" -msgstr "" +msgstr "Trabalho" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" -msgstr "" +msgstr "Última Modificação em" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Última Atualização por" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date msgid "Last Updated on" -msgstr "" +msgstr "Última Atualização em" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" -msgstr "" +msgstr "Masculino" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name msgid "Name" -msgstr "" +msgstr "Nome" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes msgid "Notes" -msgstr "" +msgstr "Observações" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" -msgstr "" +msgstr "Outro" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent msgid "Parent" -msgstr "" +msgstr "Parente" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id msgid "Partner" -msgstr "" +msgstr "Parceiro" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number msgid "Phone Number" -msgstr "" +msgstr "Número de Telefone" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name msgid "Relation" -msgstr "" +msgstr "Relação" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" -msgstr "" +msgstr "Parentes" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling msgid "Sibling" -msgstr "" +msgstr "Irmão" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other msgid "Significant Other" -msgstr "" +msgstr "Outro Significativo" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" -msgstr "" +msgstr "Cônjuge" From e339053a65116c25a457ad1d521061090c701f21 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 31 Mar 2022 01:40:32 +0200 Subject: [PATCH 09/24] [FIX] hr_employee_relative: Avoid W7940 (dangerous-view-replace-wo-priority) --- hr_employee_relative/i18n/de.po | 188 +++++++++++++++++++++ hr_employee_relative/views/hr_employee.xml | 12 +- 2 files changed, 197 insertions(+), 3 deletions(-) create mode 100644 hr_employee_relative/i18n/de.po diff --git a/hr_employee_relative/i18n/de.po b/hr_employee_relative/i18n/de.po new file mode 100644 index 00000000000..de083c32b85 --- /dev/null +++ b/hr_employee_relative/i18n/de.po @@ -0,0 +1,188 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: de\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_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date of Birth" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree +msgid "Employee Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female +msgid "Female" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male +msgid "Male" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other +msgid "Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "" diff --git a/hr_employee_relative/views/hr_employee.xml b/hr_employee_relative/views/hr_employee.xml index 653f2aa260f..5c4be168d22 100644 --- a/hr_employee_relative/views/hr_employee.xml +++ b/hr_employee_relative/views/hr_employee.xml @@ -9,9 +9,15 @@ hr.employee - - - + + 1 + + + 1 + + + 1 + From 4e59503e109b4f7a7038e4b82ccdbfa55375bd68 Mon Sep 17 00:00:00 2001 From: Maria Sparenberg Date: Wed, 11 May 2022 10:49:45 +0000 Subject: [PATCH 10/24] Translated using Weblate (German) Currently translated at 93.7% (30 of 32 strings) Translation: hr-14.0/hr-14.0-hr_employee_relative Translate-URL: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_relative/de/ --- hr_employee_relative/i18n/de.po | 64 +++++++++++++++++---------------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/hr_employee_relative/i18n/de.po b/hr_employee_relative/i18n/de.po index de083c32b85..8ad2f4bf779 100644 --- a/hr_employee_relative/i18n/de.po +++ b/hr_employee_relative/i18n/de.po @@ -6,159 +6,161 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2022-05-11 13:05+0000\n" +"Last-Translator: Maria Sparenberg \n" "Language-Team: none\n" "Language: de\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.3.2\n" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age msgid "Age" -msgstr "" +msgstr "Alter" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child msgid "Child" -msgstr "" +msgstr "Kind" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin msgid "Cousin" -msgstr "" +msgstr "Cousin(e)" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid msgid "Created by" -msgstr "" +msgstr "Erstellt von" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date msgid "Created on" -msgstr "" +msgstr "Erstellt am" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth msgid "Date of Birth" -msgstr "" +msgstr "Geburtsdatum" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" -msgstr "" +msgstr "Anzeigename" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id msgid "Employee" -msgstr "" +msgstr "Mitarbeiter" #. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree msgid "Employee Relatives" -msgstr "" +msgstr "Mitarbeiter-Verwandschaft" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" -msgstr "" +msgstr "Weiblich" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender msgid "Gender" -msgstr "" +msgstr "Geschlecht" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild msgid "Grandchild" -msgstr "" +msgstr "Enkel(in)" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent msgid "Grandparent" -msgstr "" +msgstr "Großeltern" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative msgid "HR Employee Relative" -msgstr "" +msgstr "HR Mitarbeiter-Verwandschaft" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation msgid "HR Employee Relative Relation" -msgstr "" +msgstr "HR Mitarbeiter-Verwandschaft-Relation" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" -msgstr "" +msgstr "ID" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job msgid "Job" -msgstr "" +msgstr "Job" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" -msgstr "" +msgstr "Zuletzt geändert am" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Zuletzt aktualisiert von" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date msgid "Last Updated on" -msgstr "" +msgstr "Zuletzt aktualisiert am" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" -msgstr "" +msgstr "Männlich" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name msgid "Name" -msgstr "" +msgstr "Name" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes msgid "Notes" -msgstr "" +msgstr "Notizen" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" -msgstr "" +msgstr "Anderes" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent msgid "Parent" -msgstr "" +msgstr "Eltern" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id msgid "Partner" -msgstr "" +msgstr "Partner" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number msgid "Phone Number" -msgstr "" +msgstr "Telefon" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id @@ -170,12 +172,12 @@ msgstr "" #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" -msgstr "" +msgstr "Verwandschaft" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling msgid "Sibling" -msgstr "" +msgstr "Geschwister" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other @@ -185,4 +187,4 @@ msgstr "" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" -msgstr "" +msgstr "Ehepartner" From e645b7f92f5ffe9ad06b5f46272c42e70f2fceef Mon Sep 17 00:00:00 2001 From: Olga Marco Date: Thu, 12 May 2022 12:49:31 +0200 Subject: [PATCH 11/24] [MIG] hr_employee_relative: Migration to 15.0 --- hr_employee_relative/README.rst | 10 +++++----- hr_employee_relative/__manifest__.py | 2 +- hr_employee_relative/data/data_relative_relation.xml | 4 +--- hr_employee_relative/i18n/hr_employee_relative.pot | 10 +--------- hr_employee_relative/models/hr_employee_relative.py | 5 ++--- hr_employee_relative/static/description/index.html | 6 +++--- .../tests/test_hr_employee_relatives.py | 2 +- hr_employee_relative/views/hr_employee_relative.xml | 2 +- 8 files changed, 15 insertions(+), 26 deletions(-) diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index 82f2528cfd6..e41cb29c568 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -14,13 +14,13 @@ HR Employee Relatives :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/14.0/hr_employee_relative + :target: https://github.com/OCA/hr/tree/15.0/hr_employee_relative :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_relative + :target: https://translation.odoo-community.org/projects/hr-15-0/hr-15-0-hr_employee_relative :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/14.0 + :target: https://runbot.odoo-community.org/runbot/116/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -74,6 +74,6 @@ 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. +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_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index 77c2925bf61..cde5adef77b 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -4,7 +4,7 @@ { "name": "HR Employee Relatives", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "CorporateHub, Odoo Community Association (OCA)", diff --git a/hr_employee_relative/data/data_relative_relation.xml b/hr_employee_relative/data/data_relative_relation.xml index c1f805fb727..ef84f60357c 100644 --- a/hr_employee_relative/data/data_relative_relation.xml +++ b/hr_employee_relative/data/data_relative_relation.xml @@ -1,6 +1,5 @@ - - + -

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

    +

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

    This module allows storing information about employee’s family.

    Table of contents

    @@ -386,7 +386,7 @@

    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.

    +feedback.

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

    @@ -415,7 +415,7 @@

    Maintainers

    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.

    +

    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_employee_relative/tests/test_hr_employee_relatives.py b/hr_employee_relative/tests/test_hr_employee_relatives.py index a000f4296cb..421dc53de6a 100644 --- a/hr_employee_relative/tests/test_hr_employee_relatives.py +++ b/hr_employee_relative/tests/test_hr_employee_relatives.py @@ -43,7 +43,7 @@ def test_age_calculation(self): "active_model": "hr.employee.relative", } self.assertEqual(relative.name, "Relative") - with Form(self.EmployeeRelative.with_context(ctx)) as f: + with Form(self.EmployeeRelative.with_context(**ctx)) as f: f.partner_id = self.env.ref("base.res_partner_2") f.relation_id = self.env.ref(_ns + ".relation_sibling") relative = f.save() diff --git a/hr_employee_relative/views/hr_employee_relative.xml b/hr_employee_relative/views/hr_employee_relative.xml index dfb73092f46..ca7fe36d425 100644 --- a/hr_employee_relative/views/hr_employee_relative.xml +++ b/hr_employee_relative/views/hr_employee_relative.xml @@ -8,7 +8,7 @@ hr.employee.relative.view.tree hr.employee.relative - + From f7c9bde7da5a64270c03812238914801220ccd85 Mon Sep 17 00:00:00 2001 From: BT-anieto Date: Tue, 27 Dec 2022 10:30:02 +0100 Subject: [PATCH 12/24] [16.0][MIG] hr_employee_relative: Migration to 16.0. --- hr_employee_relative/__manifest__.py | 2 +- hr_employee_relative/models/hr_employee.py | 1 - .../models/hr_employee_relative.py | 9 +++------ hr_employee_relative/readme/CONTRIBUTORS.rst | 2 ++ .../tests/test_hr_employee_relatives.py | 17 +++++------------ .../views/hr_employee_relative.xml | 2 +- 6 files changed, 12 insertions(+), 21 deletions(-) diff --git a/hr_employee_relative/__manifest__.py b/hr_employee_relative/__manifest__.py index cde5adef77b..d6c1f3f27eb 100644 --- a/hr_employee_relative/__manifest__.py +++ b/hr_employee_relative/__manifest__.py @@ -4,7 +4,7 @@ { "name": "HR Employee Relatives", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "category": "Human Resources", "website": "https://github.com/OCA/hr", "author": "CorporateHub, Odoo Community Association (OCA)", diff --git a/hr_employee_relative/models/hr_employee.py b/hr_employee_relative/models/hr_employee.py index 9d8707e6e3a..479686a5b9b 100644 --- a/hr_employee_relative/models/hr_employee.py +++ b/hr_employee_relative/models/hr_employee.py @@ -8,7 +8,6 @@ class HrEmployee(models.Model): _inherit = "hr.employee" relative_ids = fields.One2many( - string="Relatives", comodel_name="hr.employee.relative", inverse_name="employee_id", ) diff --git a/hr_employee_relative/models/hr_employee_relative.py b/hr_employee_relative/models/hr_employee_relative.py index d3ffca81e81..21ed4c63e73 100644 --- a/hr_employee_relative/models/hr_employee_relative.py +++ b/hr_employee_relative/models/hr_employee_relative.py @@ -12,20 +12,17 @@ class HrEmployeeRelative(models.Model): _name = "hr.employee.relative" _description = "HR Employee Relative" - employee_id = fields.Many2one(string="Employee", comodel_name="hr.employee") - relation_id = fields.Many2one( - "hr.employee.relative.relation", string="Relation", required=True - ) + employee_id = fields.Many2one(comodel_name="hr.employee") + relation_id = fields.Many2one("hr.employee.relative.relation", required=True) name = fields.Char(required=True) partner_id = fields.Many2one( "res.partner", - string="Partner", domain=["&", ("is_company", "=", False), ("type", "=", "contact")], ) gender = fields.Selection( selection=[("male", "Male"), ("female", "Female"), ("other", "Other")], ) - date_of_birth = fields.Date(string="Date of Birth") + date_of_birth = fields.Date() age = fields.Float(compute="_compute_age") job = fields.Char() diff --git a/hr_employee_relative/readme/CONTRIBUTORS.rst b/hr_employee_relative/readme/CONTRIBUTORS.rst index a1838cb4938..79c3d4dc05a 100644 --- a/hr_employee_relative/readme/CONTRIBUTORS.rst +++ b/hr_employee_relative/readme/CONTRIBUTORS.rst @@ -5,3 +5,5 @@ * Saran Lim. * Nattapong W. + +* Alberto Nieto de Pablos (https://braintec.com) diff --git a/hr_employee_relative/tests/test_hr_employee_relatives.py b/hr_employee_relative/tests/test_hr_employee_relatives.py index 421dc53de6a..3d5d02fc34f 100644 --- a/hr_employee_relative/tests/test_hr_employee_relatives.py +++ b/hr_employee_relative/tests/test_hr_employee_relatives.py @@ -7,14 +7,13 @@ from odoo.tests import Form, common -_ns = "hr_employee_relative" - class TestHrEmployeeRelatives(common.TransactionCase): def setUp(self): super().setUp() self.Employee = self.env["hr.employee"] self.EmployeeRelative = self.env["hr.employee.relative"] + self.relation_sibling = self.env.ref("hr_employee_relative.relation_sibling") def test_age_calculation(self): employee = self.Employee.create( @@ -25,7 +24,7 @@ def test_age_calculation(self): 0, 0, { - "relation_id": self.env.ref(_ns + ".relation_sibling").id, + "relation_id": self.relation_sibling.id, "partner_id": self.env.ref("base.res_partner_1").id, "name": "Relative", "date_of_birth": datetime.now() + relativedelta(years=-42), @@ -36,15 +35,9 @@ def test_age_calculation(self): ) relative = self.EmployeeRelative.browse(employee.relative_ids[0].id) self.assertEqual(int(relative.age), 42) - # onchange partner - ctx = { - "active_ids": [relative.id], - "active_id": relative.id, - "active_model": "hr.employee.relative", - } self.assertEqual(relative.name, "Relative") - with Form(self.EmployeeRelative.with_context(**ctx)) as f: + # onchange partner + with Form(relative) as f: f.partner_id = self.env.ref("base.res_partner_2") - f.relation_id = self.env.ref(_ns + ".relation_sibling") - relative = f.save() + f.relation_id = self.relation_sibling self.assertEqual(relative.name, relative.partner_id.display_name) diff --git a/hr_employee_relative/views/hr_employee_relative.xml b/hr_employee_relative/views/hr_employee_relative.xml index ca7fe36d425..b1ddd11673e 100644 --- a/hr_employee_relative/views/hr_employee_relative.xml +++ b/hr_employee_relative/views/hr_employee_relative.xml @@ -14,7 +14,7 @@ - + From 4bd4d3eefba824228d1012959e42965c3e18cb83 Mon Sep 17 00:00:00 2001 From: oca-ci Date: Mon, 20 Feb 2023 11:31:44 +0000 Subject: [PATCH 13/24] [UPD] Update hr_employee_relative.pot --- hr_employee_relative/i18n/hr_employee_relative.pot | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hr_employee_relative/i18n/hr_employee_relative.pot b/hr_employee_relative/i18n/hr_employee_relative.pot index 8832ccc5381..c9e54bb0f8a 100644 --- a/hr_employee_relative/i18n/hr_employee_relative.pot +++ b/hr_employee_relative/i18n/hr_employee_relative.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -42,7 +42,7 @@ msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" +msgid "Date Of Birth" msgstr "" #. module: hr_employee_relative @@ -159,6 +159,10 @@ msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "" From 9a51daafeb6e5a2cdbcbf188193e324de100aeee Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 20 Feb 2023 11:33:53 +0000 Subject: [PATCH 14/24] [UPD] README.rst --- hr_employee_relative/README.rst | 12 +++++++----- hr_employee_relative/static/description/index.html | 7 ++++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index e41cb29c568..a46825207c0 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -14,13 +14,13 @@ HR Employee Relatives :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/15.0/hr_employee_relative + :target: https://github.com/OCA/hr/tree/16.0/hr_employee_relative :alt: OCA/hr .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/hr-15-0/hr-15-0-hr_employee_relative + :target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_relative :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/15.0 + :target: https://runbot.odoo-community.org/runbot/116/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -61,6 +61,8 @@ Contributors * Nattapong W. +* Alberto Nieto de Pablos (https://braintec.com) + Maintainers ~~~~~~~~~~~ @@ -74,6 +76,6 @@ 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. +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_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html index ce29a85eff0..4db6358287b 100644 --- a/hr_employee_relative/static/description/index.html +++ b/hr_employee_relative/static/description/index.html @@ -367,7 +367,7 @@

    HR Employee Relatives

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module allows storing information about employee’s family.

    Table of contents

    @@ -386,7 +386,7 @@

    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.

    +feedback.

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

    @@ -406,6 +406,7 @@

    Contributors

  • Saran Lim. <saranl@ecosoft.co.th>
  • Nattapong W. <aphon61bank@gmail.com>
  • +
  • Alberto Nieto de Pablos <alberto.nieto@braintec.com> (https://braintec.com)
  • @@ -415,7 +416,7 @@

    Maintainers

    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.

    +

    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.

    From 955975be8674e03697c4cba0e61ca1d05cff74d8 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 20 Feb 2023 12:10:34 +0000 Subject: [PATCH 15/24] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-16.0/hr-16.0-hr_employee_relative Translate-URL: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_relative/ --- hr_employee_relative/i18n/de.po | 22 ++++++++++++---------- hr_employee_relative/i18n/es.po | 19 ++++++++++++------- hr_employee_relative/i18n/fr.po | 19 ++++++++++++------- hr_employee_relative/i18n/hr.po | 19 ++++++++++++------- hr_employee_relative/i18n/pt_BR.po | 22 ++++++++++++---------- 5 files changed, 60 insertions(+), 41 deletions(-) diff --git a/hr_employee_relative/i18n/de.po b/hr_employee_relative/i18n/de.po index 8ad2f4bf779..f758b8e11af 100644 --- a/hr_employee_relative/i18n/de.po +++ b/hr_employee_relative/i18n/de.po @@ -45,11 +45,10 @@ msgstr "Erstellt am" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" -msgstr "Geburtsdatum" +msgid "Date Of Birth" +msgstr "" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" @@ -61,11 +60,6 @@ msgstr "Anzeigename" msgid "Employee" msgstr "Mitarbeiter" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "Mitarbeiter-Verwandschaft" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" @@ -97,7 +91,6 @@ msgid "HR Employee Relative Relation" msgstr "HR Mitarbeiter-Verwandschaft-Relation" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" @@ -109,7 +102,6 @@ msgid "Job" msgstr "Job" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" @@ -170,6 +162,10 @@ msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "Verwandschaft" @@ -188,3 +184,9 @@ msgstr "" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "Ehepartner" + +#~ msgid "Date of Birth" +#~ msgstr "Geburtsdatum" + +#~ msgid "Employee Relatives" +#~ msgstr "Mitarbeiter-Verwandschaft" diff --git a/hr_employee_relative/i18n/es.po b/hr_employee_relative/i18n/es.po index 3d425fb51e8..8bd3e0a10e2 100644 --- a/hr_employee_relative/i18n/es.po +++ b/hr_employee_relative/i18n/es.po @@ -45,8 +45,8 @@ msgstr "Creado en" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" -msgstr "Fecha de nacimiento" +msgid "Date Of Birth" +msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name @@ -60,11 +60,6 @@ msgstr "Nombre a mostrar" msgid "Employee" msgstr "Empleado" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "Parientes de Empleados" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" @@ -167,6 +162,10 @@ msgstr "Parentesco" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "Parientes" @@ -185,3 +184,9 @@ msgstr "Pareja" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "Cónyugue" + +#~ msgid "Date of Birth" +#~ msgstr "Fecha de nacimiento" + +#~ msgid "Employee Relatives" +#~ msgstr "Parientes de Empleados" diff --git a/hr_employee_relative/i18n/fr.po b/hr_employee_relative/i18n/fr.po index 52490769987..4a424138abb 100644 --- a/hr_employee_relative/i18n/fr.po +++ b/hr_employee_relative/i18n/fr.po @@ -45,8 +45,8 @@ msgstr "Créé le" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" -msgstr "Date de naissance" +msgid "Date Of Birth" +msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name @@ -60,11 +60,6 @@ msgstr "Nom affiché" msgid "Employee" msgstr "Employé(e)" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "Proches" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" @@ -167,6 +162,10 @@ msgstr "Relation" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "Proches" @@ -185,3 +184,9 @@ msgstr "Autre" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "Époux / Épouse" + +#~ msgid "Date of Birth" +#~ msgstr "Date de naissance" + +#~ msgid "Employee Relatives" +#~ msgstr "Proches" diff --git a/hr_employee_relative/i18n/hr.po b/hr_employee_relative/i18n/hr.po index 858f7e7cc42..6f272179d3e 100644 --- a/hr_employee_relative/i18n/hr.po +++ b/hr_employee_relative/i18n/hr.po @@ -46,8 +46,8 @@ msgstr "Kreirano" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" -msgstr "Datum rođenja" +msgid "Date Of Birth" +msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name @@ -61,11 +61,6 @@ msgstr "Naziv" msgid "Employee" msgstr "Djelatnik" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "Rodbina djelatnika" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" @@ -168,6 +163,10 @@ msgstr "" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "" @@ -186,3 +185,9 @@ msgstr "" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "" + +#~ msgid "Date of Birth" +#~ msgstr "Datum rođenja" + +#~ msgid "Employee Relatives" +#~ msgstr "Rodbina djelatnika" diff --git a/hr_employee_relative/i18n/pt_BR.po b/hr_employee_relative/i18n/pt_BR.po index 380f0305b65..fbc99b81108 100644 --- a/hr_employee_relative/i18n/pt_BR.po +++ b/hr_employee_relative/i18n/pt_BR.po @@ -45,11 +45,10 @@ msgstr "Criado em" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth -msgid "Date of Birth" -msgstr "Data de Nascimento" +msgid "Date Of Birth" +msgstr "" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" @@ -61,11 +60,6 @@ msgstr "Nome de Exibição" msgid "Employee" msgstr "Funcionário" -#. module: hr_employee_relative -#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_relative_view_tree -msgid "Employee Relatives" -msgstr "Parentes do Funcionário" - #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" @@ -97,7 +91,6 @@ msgid "HR Employee Relative Relation" msgstr "Relação de Parentesco de Funcionário" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" @@ -109,7 +102,6 @@ msgid "Job" msgstr "Trabalho" #. module: hr_employee_relative -#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" @@ -170,6 +162,10 @@ msgstr "Relação" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" msgstr "Parentes" @@ -188,3 +184,9 @@ msgstr "Outro Significativo" #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" msgstr "Cônjuge" + +#~ msgid "Date of Birth" +#~ msgstr "Data de Nascimento" + +#~ msgid "Employee Relatives" +#~ msgstr "Parentes do Funcionário" From 31207811a1927460282cec90611e1bf0859585bb Mon Sep 17 00:00:00 2001 From: mymage Date: Wed, 17 May 2023 13:29:37 +0000 Subject: [PATCH 16/24] Added translation using Weblate (Italian) --- hr_employee_relative/i18n/it.po | 184 ++++++++++++++++++++++++++++++++ 1 file changed, 184 insertions(+) create mode 100644 hr_employee_relative/i18n/it.po diff --git a/hr_employee_relative/i18n/it.po b/hr_employee_relative/i18n/it.po new file mode 100644 index 00000000000..fa63837451b --- /dev/null +++ b/hr_employee_relative/i18n/it.po @@ -0,0 +1,184 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_relative +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: it\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_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age +msgid "Age" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child +msgid "Child" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin +msgid "Cousin" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid +msgid "Created by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date +msgid "Created on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth +msgid "Date Of Birth" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name +msgid "Display Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id +msgid "Employee" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female +msgid "Female" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender +msgid "Gender" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild +msgid "Grandchild" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent +msgid "Grandparent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative +msgid "HR Employee Relative" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation +msgid "HR Employee Relative Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id +msgid "ID" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job +msgid "Job" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update +msgid "Last Modified on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid +msgid "Last Updated by" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date +msgid "Last Updated on" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male +msgid "Male" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name +msgid "Name" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes +msgid "Notes" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other +msgid "Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent +msgid "Parent" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id +msgid "Partner" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number +msgid "Phone Number" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name +msgid "Relation" +msgstr "" + +#. module: hr_employee_relative +#: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids +msgid "Relative" +msgstr "" + +#. module: hr_employee_relative +#: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form +msgid "Relatives" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling +msgid "Sibling" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other +msgid "Significant Other" +msgstr "" + +#. module: hr_employee_relative +#: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse +msgid "Spouse" +msgstr "" From ea5ed3009a3af09471146a3a079cd16ae4a93e16 Mon Sep 17 00:00:00 2001 From: mymage Date: Thu, 18 May 2023 06:55:28 +0000 Subject: [PATCH 17/24] Translated using Weblate (Italian) Currently translated at 15.6% (5 of 32 strings) Translation: hr-16.0/hr-16.0-hr_employee_relative Translate-URL: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_relative/it/ --- hr_employee_relative/i18n/it.po | 68 +++++++++++++++++---------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/hr_employee_relative/i18n/it.po b/hr_employee_relative/i18n/it.po index fa63837451b..a92cd178143 100644 --- a/hr_employee_relative/i18n/it.po +++ b/hr_employee_relative/i18n/it.po @@ -6,179 +6,181 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: Automatically generated\n" +"PO-Revision-Date: 2023-05-30 09:10+0000\n" +"Last-Translator: mymage \n" "Language-Team: none\n" "Language: it\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_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age msgid "Age" -msgstr "" +msgstr "Età" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_child msgid "Child" -msgstr "" +msgstr "Figlio" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_cousin msgid "Cousin" -msgstr "" +msgstr "Cugino" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_uid msgid "Created by" -msgstr "" +msgstr "Creato da" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__create_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__create_date msgid "Created on" -msgstr "" +msgstr "Creato il" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth msgid "Date Of Birth" -msgstr "" +msgstr "Data di nascita" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__display_name msgid "Display Name" -msgstr "" +msgstr "Nome visualizzato" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__employee_id msgid "Employee" -msgstr "" +msgstr "Dipendente" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__female msgid "Female" -msgstr "" +msgstr "Femmina" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__gender msgid "Gender" -msgstr "" +msgstr "Genere" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandchild msgid "Grandchild" -msgstr "" +msgstr "Nipote" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_grandparent msgid "Grandparent" -msgstr "" +msgstr "Nonno" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative msgid "HR Employee Relative" -msgstr "" +msgstr "Parente dipendente RU" #. module: hr_employee_relative #: model:ir.model,name:hr_employee_relative.model_hr_employee_relative_relation msgid "HR Employee Relative Relation" -msgstr "" +msgstr "Relazione parente dipendente RU" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__id msgid "ID" -msgstr "" +msgstr "ID" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__job msgid "Job" -msgstr "" +msgstr "Lavoro" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative____last_update #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation____last_update msgid "Last Modified on" -msgstr "" +msgstr "Ultima modifica il" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_uid #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_uid msgid "Last Updated by" -msgstr "" +msgstr "Ultimo aggiornamento di" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__write_date #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__write_date msgid "Last Updated on" -msgstr "" +msgstr "Ultimo aggiornamento il" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__male msgid "Male" -msgstr "" +msgstr "Maschio" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__name msgid "Name" -msgstr "" +msgstr "Nome" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__notes msgid "Notes" -msgstr "" +msgstr "Note" #. module: hr_employee_relative #: model:ir.model.fields.selection,name:hr_employee_relative.selection__hr_employee_relative__gender__other msgid "Other" -msgstr "" +msgstr "Altro" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_parent msgid "Parent" -msgstr "" +msgstr "Padre" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__partner_id msgid "Partner" -msgstr "" +msgstr "Partner" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__phone_number msgid "Phone Number" -msgstr "" +msgstr "Numero di telefono" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__relation_id #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative_relation__name msgid "Relation" -msgstr "" +msgstr "Relazione" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids msgid "Relative" -msgstr "" +msgstr "Parente" #. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form msgid "Relatives" -msgstr "" +msgstr "Parenti" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_sibling msgid "Sibling" -msgstr "" +msgstr "Fratello" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_significant_other msgid "Significant Other" -msgstr "" +msgstr "Altri importanti" #. module: hr_employee_relative #: model:hr.employee.relative.relation,name:hr_employee_relative.relation_spouse msgid "Spouse" -msgstr "" +msgstr "Moglie" From d7947ae9c2e8e00cdeab1442d58e6e9dcef91731 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Thu, 3 Aug 2023 19:01:18 +0000 Subject: [PATCH 18/24] Translated using Weblate (Spanish) Currently translated at 100.0% (32 of 32 strings) Translation: hr-16.0/hr-16.0-hr_employee_relative Translate-URL: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_relative/es/ --- hr_employee_relative/i18n/es.po | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hr_employee_relative/i18n/es.po b/hr_employee_relative/i18n/es.po index 8bd3e0a10e2..eafc80c8b05 100644 --- a/hr_employee_relative/i18n/es.po +++ b/hr_employee_relative/i18n/es.po @@ -6,15 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-12-03 16:06+0000\n" -"Last-Translator: Pedro S. Lopez \n" +"PO-Revision-Date: 2023-08-03 21:10+0000\n" +"Last-Translator: Ivorra78 \n" "Language-Team: none\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 3.9.1\n" +"X-Generator: Weblate 4.17\n" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__age @@ -46,7 +46,7 @@ msgstr "Creado en" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__date_of_birth msgid "Date Of Birth" -msgstr "" +msgstr "Fecha de nacimiento" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee_relative__display_name @@ -163,7 +163,7 @@ msgstr "Parentesco" #. module: hr_employee_relative #: model:ir.model.fields,field_description:hr_employee_relative.field_hr_employee__relative_ids msgid "Relative" -msgstr "" +msgstr "Relativo" #. module: hr_employee_relative #: model_terms:ir.ui.view,arch_db:hr_employee_relative.hr_employee_view_form From 2f99bf97c992a6176d5bc00e30659f3587c34696 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 13:09:14 +0000 Subject: [PATCH 19/24] [UPD] README.rst --- hr_employee_relative/README.rst | 15 ++++---- .../static/description/index.html | 34 ++++++++++--------- 2 files changed, 27 insertions(+), 22 deletions(-) diff --git a/hr_employee_relative/README.rst b/hr_employee_relative/README.rst index a46825207c0..b765bb3fbc3 100644 --- a/hr_employee_relative/README.rst +++ b/hr_employee_relative/README.rst @@ -2,10 +2,13 @@ HR Employee Relatives ===================== -.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9978b31df0e194b808faaadf77e51a1ccdea14914c5164002db25d4a940c7b1a + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png :target: https://odoo-community.org/page/development-status @@ -19,11 +22,11 @@ HR Employee Relatives .. |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_relative :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/16.0 - :alt: Try me on Runbot +.. |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| +|badge1| |badge2| |badge3| |badge4| |badge5| This module allows storing information about employee's family. @@ -37,7 +40,7 @@ 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 +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/hr_employee_relative/static/description/index.html b/hr_employee_relative/static/description/index.html index 4db6358287b..7775242fc4d 100644 --- a/hr_employee_relative/static/description/index.html +++ b/hr_employee_relative/static/description/index.html @@ -1,20 +1,20 @@ - + - + HR Employee Relatives