diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst new file mode 100644 index 00000000000..f760cfb3e38 --- /dev/null +++ b/hr_employee_age/README.rst @@ -0,0 +1,90 @@ +============ +Employee Age +============ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:562bc7a14c6494d67ecdc257acf134c6dc0f21e46d975385817660a0906c798c + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/17.0/hr_employee_age + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-17-0/hr-17-0-hr_employee_age + :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=17.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Adds and computes age field on employee + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +When you add the birthday of an employee, the age of an employee will +auto-populate. + +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 +------- + +* Salton Massally + +Contributors +------------ + +- Salton Massally (iDT Labs) +- Serpent Consulting Services Pvt. Ltd. +- Saran Lim. +- Komsan Somwong +- `Pesol `__: + + - Pedro Evaristo Gonzalez Sanchez + +- Manish Bohra + +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_age/__init__.py b/hr_employee_age/__init__.py new file mode 100644 index 00000000000..7242cef4722 --- /dev/null +++ b/hr_employee_age/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2015 Salton Massally (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import models diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py new file mode 100644 index 00000000000..49179158e33 --- /dev/null +++ b/hr_employee_age/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright (C) 2015 Salton Massally (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "Employee Age", + "version": "17.0.1.0.0", + "license": "AGPL-3", + "author": "Salton Massally , " + "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/hr", + "category": "Human Resources", + "summary": "Age field for employee", + "depends": ["hr"], + "data": ["views/hr_employee.xml"], + "installable": True, +} diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po new file mode 100644 index 00000000000..9c8a6fbc8d9 --- /dev/null +++ b/hr_employee_age/i18n/ar.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2016 +# 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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "العمر" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "الموظف" diff --git a/hr_employee_age/i18n/cs_CZ.po b/hr_employee_age/i18n/cs_CZ.po new file mode 100644 index 00000000000..89451b3b216 --- /dev/null +++ b/hr_employee_age/i18n/cs_CZ.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# Lukáš Spurný , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-02-23 03:45+0000\n" +"PO-Revision-Date: 2018-02-23 03:45+0000\n" +"Last-Translator: Lukáš Spurný , 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=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Stáří" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Zaměstnanec" diff --git a/hr_employee_age/i18n/de.po b/hr_employee_age/i18n/de.po new file mode 100644 index 00000000000..730659cf2c9 --- /dev/null +++ b/hr_employee_age/i18n/de.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-11-28 01:43+0000\n" +"PO-Revision-Date: 2019-10-09 12:36+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 3.8\n" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Alter" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Angestellter" diff --git a/hr_employee_age/i18n/es.po b/hr_employee_age/i18n/es.po new file mode 100644 index 00000000000..0bc3a533c1a --- /dev/null +++ b/hr_employee_age/i18n/es.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2016 +# José Antonio Cuello , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-07 02:19+0000\n" +"PO-Revision-Date: 2017-01-07 02:19+0000\n" +"Last-Translator: José Antonio Cuello , 2017\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" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Edad" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Empleado" diff --git a/hr_employee_age/i18n/fi.po b/hr_employee_age/i18n/fi.po new file mode 100644 index 00000000000..cc18cb0fb02 --- /dev/null +++ b/hr_employee_age/i18n/fi.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 04:15+0000\n" +"PO-Revision-Date: 2016-04-04 11: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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Työntekijä" diff --git a/hr_employee_age/i18n/fr.po b/hr_employee_age/i18n/fr.po new file mode 100644 index 00000000000..5f0fbee275a --- /dev/null +++ b/hr_employee_age/i18n/fr.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2016 +# leemannd , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 11:36+0000\n" +"PO-Revision-Date: 2016-11-29 11:36+0000\n" +"Last-Translator: leemannd , 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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Age" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Employé" diff --git a/hr_employee_age/i18n/hr.po b/hr_employee_age/i18n/hr.po new file mode 100644 index 00000000000..c350b32658c --- /dev/null +++ b/hr_employee_age/i18n/hr.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# 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: 2017-07-04 06:52+0000\n" +"Last-Translator: Bole , 2017\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" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Starost" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Djelatnik" diff --git a/hr_employee_age/i18n/hr_HR.po b/hr_employee_age/i18n/hr_HR.po new file mode 100644 index 00000000000..748ee042ff3 --- /dev/null +++ b/hr_employee_age/i18n/hr_HR.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# Bole , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 03:45+0000\n" +"PO-Revision-Date: 2016-11-29 03:45+0000\n" +"Last-Translator: Bole , 2016\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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Godine" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Djelatnik" diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot new file mode 100644 index 00000000000..324fff361ad --- /dev/null +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -0,0 +1,24 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "" diff --git a/hr_employee_age/i18n/it.po b/hr_employee_age/i18n/it.po new file mode 100644 index 00000000000..f835bd70d04 --- /dev/null +++ b/hr_employee_age/i18n/it.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2017 +# Marco Calcagni , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-03-31 03:38+0000\n" +"PO-Revision-Date: 2018-03-31 03:38+0000\n" +"Last-Translator: Marco Calcagni , 2018\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" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Età" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Dipendente" diff --git a/hr_employee_age/i18n/lt.po b/hr_employee_age/i18n/lt.po new file mode 100644 index 00000000000..924678c6a9a --- /dev/null +++ b/hr_employee_age/i18n/lt.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# Viktoras Norkus , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-01-17 12:15+0000\n" +"PO-Revision-Date: 2018-01-17 12:15+0000\n" +"Last-Translator: Viktoras Norkus , 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=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n" +"%100<10 || n%100>=20) ? 1 : 2);\n" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Amžius" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Darbuotojas" diff --git a/hr_employee_age/i18n/nl_NL.po b/hr_employee_age/i18n/nl_NL.po new file mode 100644 index 00000000000..68adca05c79 --- /dev/null +++ b/hr_employee_age/i18n/nl_NL.po @@ -0,0 +1,31 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2016 +# Cas Vissers , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-28 03:17+0000\n" +"PO-Revision-Date: 2017-03-28 03:17+0000\n" +"Last-Translator: Cas Vissers , 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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Leeftijd" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Werknemer" diff --git a/hr_employee_age/i18n/pt_BR.po b/hr_employee_age/i18n/pt_BR.po new file mode 100644 index 00000000000..7d54ea94034 --- /dev/null +++ b/hr_employee_age/i18n/pt_BR.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-11 01:48+0000\n" +"PO-Revision-Date: 2021-03-13 03:46+0000\n" +"Last-Translator: Eder Brito \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/" +"language/pt_BR/)\n" +"Language: pt_BR\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Idade" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Funcionário" diff --git a/hr_employee_age/i18n/ro.po b/hr_employee_age/i18n/ro.po new file mode 100644 index 00000000000..b642f41414d --- /dev/null +++ b/hr_employee_age/i18n/ro.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-20 18:46+0000\n" +"PO-Revision-Date: 2015-10-19 08:39+0000\n" +"Last-Translator: <>\n" +"Language-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"ro/)\n" +"Language: ro\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Angajat" diff --git a/hr_employee_age/i18n/sl.po b/hr_employee_age/i18n/sl.po new file mode 100644 index 00000000000..2a59fa74bf2 --- /dev/null +++ b/hr_employee_age/i18n/sl.po @@ -0,0 +1,30 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# OCA Transbot , 2016 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-29 01:35+0000\n" +"PO-Revision-Date: 2016-11-29 01:35+0000\n" +"Last-Translator: OCA Transbot , 2016\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_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age +msgid "Age" +msgstr "Starost" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Kader" diff --git a/hr_employee_age/models/__init__.py b/hr_employee_age/models/__init__.py new file mode 100644 index 00000000000..9c157e52ca4 --- /dev/null +++ b/hr_employee_age/models/__init__.py @@ -0,0 +1,4 @@ +# Copyright (C) 2015 Salton Massally (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import hr_employee diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py new file mode 100644 index 00000000000..ba2ae7e2a0c --- /dev/null +++ b/hr_employee_age/models/hr_employee.py @@ -0,0 +1,23 @@ +# Copyright (C) 2015 Salton Massally (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from dateutil.relativedelta import relativedelta + +from odoo import api, fields, models + + +class HrEmployee(models.Model): + _inherit = "hr.employee" + + # The age field uses a depends (birthday) that has defined + # groups="hr.group_hr_user", if a user without permissions in HR tries to get + # the value of this field will have an error. + # The correct way to avoid this inconsistency is to define groups to field age + age = fields.Integer(compute="_compute_age", groups="hr.group_hr_user") + + @api.depends("birthday") + def _compute_age(self): + for record in self: + age = 0 + if record.birthday: + age = relativedelta(fields.Date.today(), record.birthday).years + record.age = age diff --git a/hr_employee_age/pyproject.toml b/hr_employee_age/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/hr_employee_age/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/hr_employee_age/readme/CONTRIBUTORS.md b/hr_employee_age/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..cff17c5878b --- /dev/null +++ b/hr_employee_age/readme/CONTRIBUTORS.md @@ -0,0 +1,7 @@ +- Salton Massally (iDT Labs) \<\> +- Serpent Consulting Services Pvt. Ltd. \<\> +- Saran Lim. \<\> +- Komsan Somwong \<\> +- [Pesol](https://www.pesol.es): + - Pedro Evaristo Gonzalez Sanchez \<\> +- Manish Bohra \<\> diff --git a/hr_employee_age/readme/DESCRIPTION.md b/hr_employee_age/readme/DESCRIPTION.md new file mode 100644 index 00000000000..9bd2fa2b82e --- /dev/null +++ b/hr_employee_age/readme/DESCRIPTION.md @@ -0,0 +1 @@ +Adds and computes age field on employee diff --git a/hr_employee_age/readme/USAGE.md b/hr_employee_age/readme/USAGE.md new file mode 100644 index 00000000000..67789e55989 --- /dev/null +++ b/hr_employee_age/readme/USAGE.md @@ -0,0 +1,2 @@ +When you add the birthday of an employee, the age of an employee will +auto-populate. diff --git a/hr_employee_age/static/description/icon.png b/hr_employee_age/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/hr_employee_age/static/description/icon.png differ diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html new file mode 100644 index 00000000000..9d95864baad --- /dev/null +++ b/hr_employee_age/static/description/index.html @@ -0,0 +1,435 @@ + + + + + + +Employee Age + + + +
+

Employee Age

+ + +

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

+

Adds and computes age field on employee

+

Table of contents

+ +
+

Usage

+

When you add the birthday of an employee, the age of an employee will +auto-populate.

+
+
+

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

+ +
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

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

+

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

+
+
+
+ + diff --git a/hr_employee_age/tests/__init__.py b/hr_employee_age/tests/__init__.py new file mode 100644 index 00000000000..b21b3880de2 --- /dev/null +++ b/hr_employee_age/tests/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from . import test_hr_employee diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py new file mode 100644 index 00000000000..d908ea7367f --- /dev/null +++ b/hr_employee_age/tests/test_hr_employee.py @@ -0,0 +1,18 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from dateutil.relativedelta import relativedelta + +from odoo import fields +from odoo.tests import common + + +class TestHrEmployee(common.TransactionCase): + def setUp(self): + super().setUp() + self.employee_admin = self.env.ref("hr.employee_admin") + self.employee_admin.write({"birthday": "1990-05-15"}) + + def test_compute_age(self): + self.employee_admin._compute_age() + age = relativedelta(fields.Date.today(), self.employee_admin.birthday).years + self.assertEqual(self.employee_admin.age, age) diff --git a/hr_employee_age/views/hr_employee.xml b/hr_employee_age/views/hr_employee.xml new file mode 100644 index 00000000000..51bcf4684b6 --- /dev/null +++ b/hr_employee_age/views/hr_employee.xml @@ -0,0 +1,13 @@ + + + + hr.employee.view.form + hr.employee + + + + + + + +