diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst new file mode 100644 index 00000000000..14dc473ae10 --- /dev/null +++ b/hr_employee_firstname/README.rst @@ -0,0 +1,102 @@ +================================= +HR Employee First Name, Last Name +================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:9bc39c8ea55d9f2166852934d1431e561fa15ee98ff0833612b79614fbd9b535 + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/18.0/hr_employee_firstname + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_employee_firstname + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=18.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module allows you to add firstname and lastname in employee form, +and concatenate both in name field. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +On the employee form view you will have 2 separate fields, one for +Firstname, second for Lastname. At least one of them is required. + +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 to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Savoir-faire Linux +* Fekete Mihai (Forest and Biomass Services Romania) +* Onestein + +Contributors +------------ + +- El Hadji Dem +- Sandy Carter +- Fekete Mihai +- David Dufresne +- Adrien Peiffer (ACSONE) +- Antonio Esposito (ONESTEIN BV) +- Andrea Stirpe + +Maintainers +----------- + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +.. |maintainer-Savoir-faire Linux| image:: https://github.com/Savoir-faire Linux.png?size=40px + :target: https://github.com/Savoir-faire Linux + :alt: Savoir-faire Linux +.. |maintainer-luisg123v| image:: https://github.com/luisg123v.png?size=40px + :target: https://github.com/luisg123v + :alt: luisg123v + +Current `maintainers `__: + +|maintainer-Savoir-faire Linux| |maintainer-luisg123v| + +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_firstname/__init__.py b/hr_employee_firstname/__init__.py new file mode 100644 index 00000000000..c0d9f3d12f7 --- /dev/null +++ b/hr_employee_firstname/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models +from .hooks import post_init_hook diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py new file mode 100644 index 00000000000..45cf68c4ba8 --- /dev/null +++ b/hr_employee_firstname/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2010-2014 Savoir-faire Linux () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "HR Employee First Name, Last Name", + "version": "18.0.1.0.0", + "author": "Savoir-faire Linux, " + "Fekete Mihai (Forest and Biomass Services Romania), " + "Onestein, " + "Odoo Community Association (OCA)", + "maintainers": ["Savoir-faire Linux", "luisg123v"], + "website": "https://github.com/OCA/hr", + "license": "AGPL-3", + "category": "Human Resources", + "summary": "Adds First Name to Employee", + "depends": ["hr"], + "data": ["views/hr_view.xml", "views/base_config_view.xml"], + "post_init_hook": "post_init_hook", + "installable": True, +} diff --git a/hr_employee_firstname/hooks.py b/hr_employee_firstname/hooks.py new file mode 100644 index 00000000000..09bb71b3707 --- /dev/null +++ b/hr_employee_firstname/hooks.py @@ -0,0 +1,6 @@ +# Copyright 2016-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + + +def post_init_hook(env): + env["hr.employee"]._install_employee_firstname() diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po new file mode 100644 index 00000000000..fd99cca939f --- /dev/null +++ b/hr_employee_firstname/i18n/ar.po @@ -0,0 +1,74 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +# abdullah alsabi , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-10 04:30+0000\n" +"PO-Revision-Date: 2017-06-10 04:30+0000\n" +"Last-Translator: abdullah alsabi , 2017\n" +"Language-Team: Arabic (https://www.transifex.com/oca/teams/23907/ar/)\n" +"Language: ar\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 " +"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "الموظف" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "الإسم الأول" + +#~ msgid "Lastname" +#~ msgstr "إسم العائلة" diff --git a/hr_employee_firstname/i18n/ca.po b/hr_employee_firstname/i18n/ca.po new file mode 100644 index 00000000000..6860c6d9bd0 --- /dev/null +++ b/hr_employee_firstname/i18n/ca.po @@ -0,0 +1,67 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-05-11 13:47+0000\n" +"Last-Translator: Haftec \n" +"Language-Team: none\n" +"Language: ca\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Empleat" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "Ordre dels noms d'empleats" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "Nom" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "Cognoms" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "No s'ha definit cap nom." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Last Modified on" +#~ msgstr "Darrera modificació el" diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po new file mode 100644 index 00000000000..d20a4cb1d85 --- /dev/null +++ b/hr_employee_firstname/i18n/cs_CZ.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-07 02:58+0000\n" +"PO-Revision-Date: 2018-06-07 02:58+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/" +"teams/23907/cs_CZ/)\n" +"Language: cs_CZ\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n " +"<= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Zaměstnanec" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po new file mode 100644 index 00000000000..e838f29f536 --- /dev/null +++ b/hr_employee_firstname/i18n/de.po @@ -0,0 +1,82 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2021-07-09 14:48+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "Normaler Mitarbeiter" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "Konfigurationseinstellungen" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Mitarbeiter" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "Reihenfolge der Namen" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "Vorname" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "Nachname" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "Es wurde kein Name eingetragen." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "Reihenfolge für die Zusammensetzung des vollen Namens" + +#~ msgid "Firstname" +#~ msgstr "Vorname" + +#~ msgid "Lastname" +#~ msgstr "Nachname" + +#~ msgid "Display Name" +#~ msgstr "Anzeigename" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Zuletzt geändert am" diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po new file mode 100644 index 00000000000..2cf79609734 --- /dev/null +++ b/hr_employee_firstname/i18n/es.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2023-08-03 21:10+0000\n" +"Last-Translator: Ivorra78 \n" +"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "Empleado básico" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "Ajustes de Configuración" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Empleado" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "Orden de los Nombres de Empleados" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "Nombre de pila" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "Apellido" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "Sin nombre establecido." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "Orden para componer el nombre completo del empleado" + +#~ msgid "Firstname" +#~ msgstr "Nombre propio" + +#~ msgid "Lastname" +#~ msgstr "Apellidos" diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po new file mode 100644 index 00000000000..6748f883c78 --- /dev/null +++ b/hr_employee_firstname/i18n/fa.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# Mehdi Zarrinkolah , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-07 02:58+0000\n" +"PO-Revision-Date: 2018-07-22 10:30+0000\n" +"Last-Translator: derKonig \n" +"Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n" +"Language: fa\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.0.1\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "کارمند" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "نام" + +#~ msgid "Lastname" +#~ msgstr "نام خانوادگی" diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po new file mode 100644 index 00000000000..53626dffae1 --- /dev/null +++ b/hr_employee_firstname/i18n/fi.po @@ -0,0 +1,66 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (10.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 04:15+0000\n" +"PO-Revision-Date: 2016-04-04 11:07+0000\n" +"Last-Translator: Jarmo Kortetjärvi \n" +"Language-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"fi/)\n" +"Language: fi\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Työntekijä" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po new file mode 100644 index 00000000000..171de3a5cb3 --- /dev/null +++ b/hr_employee_firstname/i18n/fr.po @@ -0,0 +1,72 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2017-01-28 02:12+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\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" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Employé" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Prénom" + +#~ msgid "Lastname" +#~ msgstr "Nom" diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po new file mode 100644 index 00000000000..59e945d0a0b --- /dev/null +++ b/hr_employee_firstname/i18n/hr.po @@ -0,0 +1,74 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-07-04 06:52+0000\n" +"PO-Revision-Date: 2019-11-13 16:34+0000\n" +"Last-Translator: Bole \n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Djelatnik" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "Ime nije postavljeno." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Ime" + +#~ msgid "Lastname" +#~ msgstr "Prezime" diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po new file mode 100644 index 00000000000..d8d926ddfd1 --- /dev/null +++ b/hr_employee_firstname/i18n/hr_HR.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2017-01-28 02:12+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/" +"hr_HR/)\n" +"Language: hr_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" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Djelatnik" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot new file mode 100644 index 00000000000..2fd8f162a3d --- /dev/null +++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot @@ -0,0 +1,62 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 17.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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po new file mode 100644 index 00000000000..06e4e4b2721 --- /dev/null +++ b/hr_employee_firstname/i18n/it.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2023-06-26 08:09+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "Dipendente base" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "Impostazioni configurazione" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Dipendente" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "Ordine nomi dipendente" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "Nome" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "Cognome" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "Nome non impostato." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "Ordinamento per comporre il nome completo del dipendente" + +#~ msgid "Firstname" +#~ msgstr "Nome" + +#~ msgid "Lastname" +#~ msgstr "Cognome" diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po new file mode 100644 index 00000000000..07aade5f590 --- /dev/null +++ b/hr_employee_firstname/i18n/lt.po @@ -0,0 +1,68 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-06-07 02:58+0000\n" +"PO-Revision-Date: 2018-06-07 02:58+0000\n" +"Last-Translator: OCA Transbot , 2018\n" +"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n" +"Language: lt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < " +"11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? " +"1 : n % 1 != 0 ? 2: 3);\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Darbuotojas" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po new file mode 100644 index 00000000000..22d38e247ad --- /dev/null +++ b/hr_employee_firstname/i18n/nl_NL.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2017-01-28 02:12+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Werknemer" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Voornaam" + +#~ msgid "Lastname" +#~ msgstr "Achternaam" diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po new file mode 100644 index 00000000000..a88c0a2d526 --- /dev/null +++ b/hr_employee_firstname/i18n/pt_BR.po @@ -0,0 +1,77 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2022-10-12 02:35+0000\n" +"Last-Translator: Douglas Custódio \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/pt_BR/)\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_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "Funcionário Básico" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Funcionário" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "Ordem de Nome dos Funcionários" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "Nome" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "Sobrenome" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "Nenhum nome definido." + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Primeiro nome" + +#~ msgid "Lastname" +#~ msgstr "Último nome" + +#~ msgid "Display Name" +#~ msgstr "Nome de Exibição" diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po new file mode 100644 index 00000000000..fd3ddc6ac96 --- /dev/null +++ b/hr_employee_firstname/i18n/ro.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2017-01-28 02:12+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Angajat" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Prenume" + +#~ msgid "Lastname" +#~ msgstr "Nume" diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po new file mode 100644 index 00000000000..a9d2ab9ef8c --- /dev/null +++ b/hr_employee_firstname/i18n/sl.po @@ -0,0 +1,73 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_firstname +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-28 02:12+0000\n" +"PO-Revision-Date: 2017-01-28 02:12+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base +msgid "Basic Employee" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_res_config_settings +msgid "Config Settings" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model,name:hr_employee_firstname.model_hr_employee +msgid "Employee" +msgstr "Kader" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order +#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form +msgid "Employee Names Order" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname +msgid "First name" +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname +#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname +msgid "Last name" +msgstr "" + +#. module: hr_employee_firstname +#. odoo-python +#: code:addons/hr_employee_firstname/models/hr_employee.py:0 +#, python-format +msgid "No name set." +msgstr "" + +#. module: hr_employee_firstname +#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order +msgid "Order to compose employee fullname" +msgstr "" + +#~ msgid "Firstname" +#~ msgstr "Ime" + +#~ msgid "Lastname" +#~ msgstr "Priimek" diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py new file mode 100644 index 00000000000..bdffa1bfc17 --- /dev/null +++ b/hr_employee_firstname/models/__init__.py @@ -0,0 +1,4 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +from . import base_config_settings +from . import hr_employee_base +from . import hr_employee diff --git a/hr_employee_firstname/models/base_config_settings.py b/hr_employee_firstname/models/base_config_settings.py new file mode 100644 index 00000000000..3dee6c99a99 --- /dev/null +++ b/hr_employee_firstname/models/base_config_settings.py @@ -0,0 +1,30 @@ +# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +import logging + +from odoo import fields, models + +_logger = logging.getLogger(__name__) + + +class ResConfigSettings(models.TransientModel): + _inherit = "res.config.settings" + + employee_names_order = fields.Selection( + selection="_employee_names_order_selection", + help="Order to compose employee fullname", + config_parameter="employee_names_order", + default=lambda a: a._employee_names_order_default(), + required=True, + ) + + def _employee_names_order_selection(self): + return [ + ("last_first", "Lastname Firstname"), + ("last_first_comma", "Lastname, Firstname"), + ("first_last", "Firstname Lastname"), + ] + + def _employee_names_order_default(self): + return self.env["hr.employee"]._names_order_default() diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py new file mode 100644 index 00000000000..05d859eb7c8 --- /dev/null +++ b/hr_employee_firstname/models/hr_employee.py @@ -0,0 +1,181 @@ +# Copyright 2010-2014 Savoir-faire Linux () +# Copyright 2016-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +import logging + +from odoo import _, api, models +from odoo.exceptions import ValidationError + +_logger = logging.getLogger(__name__) + +UPDATE_PARTNER_FIELDS = ["firstname", "lastname", "user_id", "address_home_id"] + + +class HrEmployee(models.Model): + _inherit = "hr.employee" + + @api.model + def _names_order_default(self): + return "first_last" + + @api.model + def _get_names_order(self): + """Get names order configuration from system parameters. + You can override this method to read configuration from language, + country, company or other""" + return ( + self.env["ir.config_parameter"] + .sudo() + .get_param("employee_names_order", self._names_order_default()) + ) + + @api.model + def _get_name(self, lastname, firstname): + order = self._get_names_order() + if order == "last_first_comma": + return ", ".join(p for p in (lastname, firstname) if p) + elif order == "first_last": + return " ".join(p for p in (firstname, lastname) if p) + else: + return " ".join(p for p in (lastname, firstname) if p) + + @api.onchange("firstname", "lastname") + def _onchange_firstname_lastname(self): + if self.firstname or self.lastname: + self.name = self._get_name(self.lastname, self.firstname) + + @api.model + def _is_partner_firstname_installed(self): + return bool( + self.env["ir.module.module"] + .sudo() + .search([("name", "=", "partner_firstname"), ("state", "=", "installed")]) + ) + + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + self._prepare_vals_on_create_firstname_lastname(vals) + res = super().create(vals_list) + if self._is_partner_firstname_installed(): + for employee in res: + employee._update_partner_firstname() + return res + + def write(self, vals): + self._prepare_vals_on_write_firstname_lastname(vals) + res = super().write(vals) + if self._is_partner_firstname_installed() and set(vals).intersection( + UPDATE_PARTNER_FIELDS + ): + self._update_partner_firstname() + return res + + def _prepare_vals_on_create_firstname_lastname(self, vals): + if vals.get("firstname") or vals.get("lastname"): + vals["name"] = self._get_name(vals.get("lastname"), vals.get("firstname")) + elif vals.get("name"): + vals["lastname"] = self.split_name(vals["name"])["lastname"] + vals["firstname"] = self.split_name(vals["name"])["firstname"] + else: + raise ValidationError(_("No name set.")) + + def _prepare_vals_on_write_firstname_lastname(self, vals): + if "firstname" in vals or "lastname" in vals: + if "lastname" in vals: + lastname = vals.get("lastname") + else: + lastname = self.lastname + if "firstname" in vals: + firstname = vals.get("firstname") + else: + firstname = self.firstname + vals["name"] = self._get_name(lastname, firstname) + elif vals.get("name"): + vals["lastname"] = self.split_name(vals["name"])["lastname"] + vals["firstname"] = self.split_name(vals["name"])["firstname"] + + @api.model + def _get_whitespace_cleaned_name(self, name, comma=False): + """Remove redundant whitespace from :param:`name`. + + Removes leading, trailing and duplicated whitespace. + """ + try: + name = " ".join(name.split()) if name else name + except UnicodeDecodeError: + name = " ".join(name.decode("utf-8").split()) if name else name + + if comma: + name = name.replace(" ,", ",").replace(", ", ",") + return name + + @api.model + def _get_inverse_name(self, name): + """Compute the inverted name. + + This method can be easily overriden by other submodules. + You can also override this method to change the order of name's + attributes + + When this method is called, :attr:`~.name` already has unified and + trimmed whitespace. + """ + order = self._get_names_order() + # Remove redundant spaces + name = self._get_whitespace_cleaned_name( + name, comma=(order == "last_first_comma") + ) + parts = name.split("," if order == "last_first_comma" else " ", 1) + if len(parts) > 1: + if order == "first_last": + parts = [" ".join(parts[1:]), parts[0]] + else: + parts = [parts[0], " ".join(parts[1:])] + else: + while len(parts) < 2: + parts.append(False) + return {"lastname": parts[0], "firstname": parts[1]} + + @api.model + def split_name(self, name): + clean_name = " ".join(name.split(None)) if name else name + return self._get_inverse_name(clean_name) + + def _inverse_name(self): + """Try to revert the effect of :meth:`._compute_name`.""" + for record in self: + parts = self._get_inverse_name(record.name) + record.lastname = parts["lastname"] + record.firstname = parts["firstname"] + + @api.model + def _install_employee_firstname(self): + """Save names correctly in the database. + + Before installing the module, field ``name`` contains all full names. + When installing it, this method parses those names and saves them + correctly into the database. This can be called later too if needed. + """ + # Find records with empty firstname and lastname + records = self.search([("firstname", "=", False), ("lastname", "=", False)]) + + # Force calculations there + records._inverse_name() + _logger.info("%d employees updated installing module.", len(records)) + + def _update_partner_firstname(self): + for employee in self: + partners = employee.mapped("user_id.partner_id") + partners |= employee.mapped("address_home_id") + partners.write( + {"firstname": employee.firstname, "lastname": employee.lastname} + ) + + @api.constrains("firstname", "lastname") + def _check_name(self): + """Ensure at least one name is set.""" + for record in self: + if not (record.firstname or record.lastname): + raise ValidationError(_("No name set.")) diff --git a/hr_employee_firstname/models/hr_employee_base.py b/hr_employee_firstname/models/hr_employee_base.py new file mode 100644 index 00000000000..c6c4a519f86 --- /dev/null +++ b/hr_employee_firstname/models/hr_employee_base.py @@ -0,0 +1,8 @@ +from odoo import fields, models + + +class HrEmployeeBase(models.AbstractModel): + _inherit = "hr.employee.base" + + firstname = fields.Char() + lastname = fields.Char() diff --git a/hr_employee_firstname/pyproject.toml b/hr_employee_firstname/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/hr_employee_firstname/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/hr_employee_firstname/readme/CONTRIBUTORS.md b/hr_employee_firstname/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..88d1b79d26c --- /dev/null +++ b/hr_employee_firstname/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- El Hadji Dem \<\> +- Sandy Carter \<\> +- Fekete Mihai \<\> +- David Dufresne \<\> +- Adrien Peiffer (ACSONE) \<\> +- Antonio Esposito (ONESTEIN BV) \<\> +- Andrea Stirpe \<\> diff --git a/hr_employee_firstname/readme/DESCRIPTION.md b/hr_employee_firstname/readme/DESCRIPTION.md new file mode 100644 index 00000000000..519644a7f4c --- /dev/null +++ b/hr_employee_firstname/readme/DESCRIPTION.md @@ -0,0 +1,2 @@ +This module allows you to add firstname and lastname in employee form, +and concatenate both in name field. diff --git a/hr_employee_firstname/readme/USAGE.md b/hr_employee_firstname/readme/USAGE.md new file mode 100644 index 00000000000..038cb371222 --- /dev/null +++ b/hr_employee_firstname/readme/USAGE.md @@ -0,0 +1,2 @@ +On the employee form view you will have 2 separate fields, one for +Firstname, second for Lastname. At least one of them is required. diff --git a/hr_employee_firstname/static/description/icon.png b/hr_employee_firstname/static/description/icon.png new file mode 100644 index 00000000000..297dc71c85c Binary files /dev/null and b/hr_employee_firstname/static/description/icon.png differ diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html new file mode 100644 index 00000000000..a8469dada02 --- /dev/null +++ b/hr_employee_firstname/static/description/index.html @@ -0,0 +1,440 @@ + + + + + +HR Employee First Name, Last Name + + + +
+

HR Employee First Name, Last Name

+ + +

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

+

This module allows you to add firstname and lastname in employee form, +and concatenate both in name field.

+

Table of contents

+ +
+

Usage

+

On the employee form view you will have 2 separate fields, one for +Firstname, second for Lastname. At least one of them is required.

+
+
+

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

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Savoir-faire Linux
  • +
  • Fekete Mihai (Forest and Biomass Services Romania)
  • +
  • Onestein
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

Current maintainers:

+

Savoir-faire Linux luisg123v

+

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_firstname/tests/__init__.py b/hr_employee_firstname/tests/__init__.py new file mode 100644 index 00000000000..94eb89dd759 --- /dev/null +++ b/hr_employee_firstname/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import test_hr_employee_firstname diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py new file mode 100644 index 00000000000..468c41d6c34 --- /dev/null +++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py @@ -0,0 +1,183 @@ +# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved. +# Copyright 2016-2019 Onestein () +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +import odoo +from odoo.exceptions import ValidationError +from odoo.tests.common import TransactionCase +from odoo.tools.misc import submap + + +class TestEmployeeFirstname(TransactionCase): + def setUp(self): + super().setUp() + + # Create 3 employees to concatenate the firstname and lastname + # in name_related + self.employee1_id = self.env["hr.employee"].create( + {"firstname": "Jan", "lastname": "Van-Eyck"} + ) + self.employee2_id = self.env["hr.employee"].create( + {"firstname": "Jean-Pierre", "lastname": "Carnaud"} + ) + self.employee3_id = self.env["hr.employee"].create( + {"firstname": "Famke", "lastname": "Jenssens"} + ) + + # Create 3 employees for split the name_related to + # firstname and lastname + self.employee10_id = self.env["hr.employee"].create({"name": " Jan Van-Eyck"}) + self.employee20_id = self.env["hr.employee"].create( + {"name": "Jean-Pierre Carnaud"} + ) + self.employee30_id = self.env["hr.employee"].create({"name": "JenssensFamke"}) + + def test_get_name(self): + """ + Validate the _get_name method is concatenating + the firstname and lastname + """ + # Check for employee1 + self.assertEqual(self.employee1_id.name, "Jan Van-Eyck") + + # Check for employee2 + self.assertEqual(self.employee2_id.name, "Jean-Pierre Carnaud") + + # Check for employee3 + self.assertEqual(self.employee3_id.name, "Famke Jenssens") + + def test_onchange(self): + """ + Validate the get_name method is not failing + """ + # Check that fields used to generate the name and also name field + # are empty before onchange + fields_spec = self.env["hr.employee"]._get_fields_spec() + self.assertEqual( + submap(fields_spec, ("firstname", "lastname", "name")), + { + "firstname": {}, + "lastname": {}, + "name": {}, + }, + ) + + values = { + "firstname": "Antonio", + "lastname": "Esposito", + "name": "test employee", + } + for field in self.env["hr.employee"]._fields: + if field not in values: + values[field] = False + # we work on a temporary record + new_record = self.env["hr.employee"].new(values) + + updates = new_record.onchange(values, ["firstname", "lastname"], fields_spec) + values.update(updates.get("value", {})) + self.assertEqual(values["name"], "Antonio Esposito") + + def test_auto_init_name(self): + """ + Validate the create method if the name is split + in firstname and lastname + """ + # Check for employee10 + self.assertEqual(self.employee10_id.firstname, "Jan") + self.assertEqual(self.employee10_id.lastname, "Van-Eyck") + + # Check for employee20 + self.assertEqual(self.employee20_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee20_id.lastname, "Carnaud") + + # Check for employee30 + self.assertEqual(self.employee30_id.firstname, False) + self.assertEqual(self.employee30_id.lastname, "JenssensFamke") + + def test_change_name(self): + self.employee1_id.write({"name": "Jean-Pierre Carnaud-Eyck"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck") + + def test_change_name_with_space(self): + self.employee1_id.write({"name": " Jean-Pierre Carnaud-Eyck"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck") + + def test_change_firstname(self): + self.employee1_id.write({"firstname": "Jean-Pierre"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.name, "Jean-Pierre Van-Eyck") + + def test_change_lastname(self): + self.employee1_id.write({"lastname": "Carnaud"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.name, "Jan Carnaud") + + def test_change_firstname_and_lastname(self): + self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.name, "Jean-Pierre Carnaud") + + def test_lastname_firstname(self): + self.env["ir.config_parameter"].sudo().set_param( + "employee_names_order", "last_first" + ) + + self.employee1_id.write({"name": "Carnaud-Eyck Jean-Pierre"}) + self.employee1_id.invalidate_recordset() + self.assertEqual(self.employee1_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck") + + self.employee1_id.write({"name": " Carnaud-Eyck Jean-Pierre"}) + self.employee1_id.invalidate_recordset() + self.assertEqual(self.employee1_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck") + + self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"}) + self.employee1_id.invalidate_recordset() + self.assertEqual(self.employee1_id.name, "Carnaud Jean-Pierre") + + @odoo.tests.tagged("-at_install", "post_install") + def test_update_name_post_install(self): + empl_demo = self.env.ref("hr.employee_admin") + + self.assertEqual(empl_demo.firstname, "Mitchell") + self.assertEqual(empl_demo.lastname, "Admin") + + def test_no_name(self): + self.env["hr.employee"].create({"firstname": "test"}) + self.env["hr.employee"].create({"lastname": "test"}) + self.env["hr.employee"].create({"name": "test"}) + with self.assertRaises(ValidationError): + self.env["hr.employee"].create({}) + + def test_no_firstname_and_lastname(self): + with self.assertRaises(ValidationError): + self.employee1_id.write({"firstname": "", "lastname": ""}) + + def test_change_firstname_and_lastname_with_set_last_first_comma(self): + self.env["ir.config_parameter"].sudo().set_param( + "employee_names_order", "last_first_comma" + ) + self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.name, "Carnaud, Jean-Pierre") + + def test_change_name_with_space_with_set_last_first_comma(self): + self.env["ir.config_parameter"].sudo().set_param( + "employee_names_order", "last_first_comma" + ) + self.employee1_id.write({"name": " Carnaud-Eyck, Jean-Pierre"}) + self.employee1_id.invalidate_recordset() + + self.assertEqual(self.employee1_id.firstname, "Jean-Pierre") + self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck") diff --git a/hr_employee_firstname/views/base_config_view.xml b/hr_employee_firstname/views/base_config_view.xml new file mode 100644 index 00000000000..02b92938d4d --- /dev/null +++ b/hr_employee_firstname/views/base_config_view.xml @@ -0,0 +1,20 @@ + + + + Add employee_names_order config parameter + res.config.settings + + + +

Employee Names Order

+
+
+
+ +
+
+
+
+
+
+
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml new file mode 100644 index 00000000000..fe844115c0b --- /dev/null +++ b/hr_employee_firstname/views/hr_view.xml @@ -0,0 +1,20 @@ + + + + hr.employee + + + + 1 + 1 + 0 + + + + + + + + + +