From 07bf7b1b8c7d324bf3f4355f92d854c97e0ff0bf Mon Sep 17 00:00:00 2001 From: Salton Date: Thu, 15 Oct 2015 10:57:07 +0000 Subject: [PATCH 01/22] [ADD] hr_employee_age --- hr_employee_age/README.rst | 62 +++++++++++++++++++++++++++ hr_employee_age/__init__.py | 21 +++++++++ hr_employee_age/__openerp__.py | 37 ++++++++++++++++ hr_employee_age/models/__init__.py | 21 +++++++++ hr_employee_age/models/hr_employee.py | 40 +++++++++++++++++ hr_employee_age/views/hr_employee.xml | 19 ++++++++ 6 files changed, 200 insertions(+) create mode 100644 hr_employee_age/README.rst create mode 100644 hr_employee_age/__init__.py create mode 100644 hr_employee_age/__openerp__.py create mode 100644 hr_employee_age/models/__init__.py create mode 100644 hr_employee_age/models/hr_employee.py create mode 100644 hr_employee_age/views/hr_employee.xml diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst new file mode 100644 index 00000000000..eb2b84eaf0c --- /dev/null +++ b/hr_employee_age/README.rst @@ -0,0 +1,62 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +============ +Employee Age +============ + +Adds and computes age field on employee + +Installation +============ + +To install this module, you need to: + +* clone the branch 8.0 of the repository https://github.com/OCA/hr +* add the path to this repository in your configuration (addons-path) +* update the module list +* search for "Employee Age" in your addons +* install the module + +Configuration +============= + +This module does not require any special configuration apart from enabling it as +shown above. + +Usage +===== + + +Known issues / Roadmap +====================== + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + +Credits +======= + +Contributors +------------ + +* Salton Massally (iDT Labs) + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/hr_employee_age/__init__.py b/hr_employee_age/__init__.py new file mode 100644 index 00000000000..a8c4e47810e --- /dev/null +++ b/hr_employee_age/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Copyright (C) 2015 Salton Massally (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +from . import models diff --git a/hr_employee_age/__openerp__.py b/hr_employee_age/__openerp__.py new file mode 100644 index 00000000000..8da9262b040 --- /dev/null +++ b/hr_employee_age/__openerp__.py @@ -0,0 +1,37 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Copyright (C) 2015 Salton Massally (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +{ + "name": "Employee Age", + 'version': '8.0.1.0.0', + 'license': 'AGPL-3', + 'author': "Salton Massally , " + "Odoo Community Association (OCA)", + "website": "http://idtlabs.sl", + "category": "Human Resources", + "summary": "Age field for employee", + "depends": [ + "hr", + ], + "data": [ + 'views/hr_employee.xml', + ], + 'installable': True, +} diff --git a/hr_employee_age/models/__init__.py b/hr_employee_age/models/__init__.py new file mode 100644 index 00000000000..6ea3a8287e7 --- /dev/null +++ b/hr_employee_age/models/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Copyright (C) 2015 Salton Massally (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### + +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..0d42f87123c --- /dev/null +++ b/hr_employee_age/models/hr_employee.py @@ -0,0 +1,40 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Copyright (C) 2015 Salton Massally (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################### +from datetime import datetime + +from openerp import fields, models, api +from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT + + +class HrEmployee(models.Model): + _inherit = 'hr.employee' + + age = fields.Integer( + 'Age', + readonly=True, + compute='_compute_age' + ) + + @api.one + def _compute_age(self): + if self.birthday: + dBday = datetime.strptime(self.birthday, OE_DFORMAT).date() + dToday = datetime.now().date() + self.age = (dToday - dBday).days / 365 diff --git a/hr_employee_age/views/hr_employee.xml b/hr_employee_age/views/hr_employee.xml new file mode 100644 index 00000000000..7bcffec0be8 --- /dev/null +++ b/hr_employee_age/views/hr_employee.xml @@ -0,0 +1,19 @@ + + + + + + hr.employee.view.form + hr.employee + + + + + + + + + + + + From 22fb7dd9997301b4d8f7bc5e3330e7d32416f0fe Mon Sep 17 00:00:00 2001 From: Salton Date: Thu, 15 Oct 2015 13:44:26 +0000 Subject: [PATCH 02/22] implementation update --- hr_employee_age/i18n/ar.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/de.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/en.po | 28 ++++++++++++++++++++++++++ hr_employee_age/i18n/es.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/fi.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/fr.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/it.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/nl_NL.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/pt_BR.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/ro.po | 23 +++++++++++++++++++++ hr_employee_age/i18n/sl.po | 29 +++++++++++++++++++++++++++ hr_employee_age/models/hr_employee.py | 3 ++- 12 files changed, 266 insertions(+), 1 deletion(-) create mode 100644 hr_employee_age/i18n/ar.po create mode 100644 hr_employee_age/i18n/de.po create mode 100644 hr_employee_age/i18n/en.po create mode 100644 hr_employee_age/i18n/es.po create mode 100644 hr_employee_age/i18n/fi.po create mode 100644 hr_employee_age/i18n/fr.po create mode 100644 hr_employee_age/i18n/it.po create mode 100644 hr_employee_age/i18n/nl_NL.po create mode 100644 hr_employee_age/i18n/pt_BR.po create mode 100644 hr_employee_age/i18n/ro.po create mode 100644 hr_employee_age/i18n/sl.po diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po new file mode 100644 index 00000000000..9bbcba7e89a --- /dev/null +++ b/hr_employee_age/i18n/ar.po @@ -0,0 +1,23 @@ +# 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-11-30 05:19+0000\n" +"PO-Revision-Date: 2015-10-19 08:39+0000\n" +"Last-Translator: <>\n" +"Language-Team: Arabic (http://www.transifex.com/oca/OCA-hr-8-0/language/ar/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ar\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,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "الموظف" diff --git a/hr_employee_age/i18n/de.po b/hr_employee_age/i18n/de.po new file mode 100644 index 00000000000..3aeb5fc344a --- /dev/null +++ b/hr_employee_age/i18n/de.po @@ -0,0 +1,23 @@ +# 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: German (http://www.transifex.com/oca/OCA-hr-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Angestellte" diff --git a/hr_employee_age/i18n/en.po b/hr_employee_age/i18n/en.po new file mode 100644 index 00000000000..96f68a21986 --- /dev/null +++ b/hr_employee_age/i18n/en.po @@ -0,0 +1,28 @@ +# 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-30 02:40+0000\n" +"PO-Revision-Date: 2016-04-28 14:59+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-hr-8-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_employee_age +#: field:hr.employee,age:0 +msgid "Age" +msgstr "Age" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Employee" diff --git a/hr_employee_age/i18n/es.po b/hr_employee_age/i18n/es.po new file mode 100644 index 00000000000..7ef73818785 --- /dev/null +++ b/hr_employee_age/i18n/es.po @@ -0,0 +1,23 @@ +# 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: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_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..b331d2dc45c --- /dev/null +++ b/hr_employee_age/i18n/fi.po @@ -0,0 +1,23 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fi\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_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..0aa119434da --- /dev/null +++ b/hr_employee_age/i18n/fr.po @@ -0,0 +1,23 @@ +# 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: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Employé" diff --git a/hr_employee_age/i18n/it.po b/hr_employee_age/i18n/it.po new file mode 100644 index 00000000000..92525a8175d --- /dev/null +++ b/hr_employee_age/i18n/it.po @@ -0,0 +1,23 @@ +# 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-12 12:02+0000\n" +"PO-Revision-Date: 2015-10-19 08:39+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Dipendente" diff --git a/hr_employee_age/i18n/nl_NL.po b/hr_employee_age/i18n/nl_NL.po new file mode 100644 index 00000000000..a907c3f6b76 --- /dev/null +++ b/hr_employee_age/i18n/nl_NL.po @@ -0,0 +1,23 @@ +# 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: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_NL/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: nl_NL\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. 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..31d0a53de24 --- /dev/null +++ b/hr_employee_age/i18n/pt_BR.po @@ -0,0 +1,23 @@ +# 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: 2015-10-19 08:39+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: hr_employee_age +#: model:ir.model,name:hr_employee_age.model_hr_employee +msgid "Employee" +msgstr "Empregado" diff --git a/hr_employee_age/i18n/ro.po b/hr_employee_age/i18n/ro.po new file mode 100644 index 00000000000..9c0ad9f60f5 --- /dev/null +++ b/hr_employee_age/i18n/ro.po @@ -0,0 +1,23 @@ +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: ro\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" + +#. module: hr_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..0c7df7f5ba6 --- /dev/null +++ b/hr_employee_age/i18n/sl.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +# Translators: +# Matjaž Mozetič , 2016 +msgid "" +msgstr "" +"Project-Id-Version: hr (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-30 02:40+0000\n" +"PO-Revision-Date: 2016-04-30 06:15+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" + +#. module: hr_employee_age +#: field:hr.employee,age:0 +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/hr_employee.py b/hr_employee_age/models/hr_employee.py index 0d42f87123c..5716f250a62 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -37,4 +37,5 @@ def _compute_age(self): if self.birthday: dBday = datetime.strptime(self.birthday, OE_DFORMAT).date() dToday = datetime.now().date() - self.age = (dToday - dBday).days / 365 + self.age = dToday.year - dBday.year - (( + dToday.month, dToday.day) < (dBday.month, dBday.day)) From 2b5acaf87a31ec22540b5846a7b743f7edaf955a Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Tue, 5 Jul 2016 20:19:28 +0200 Subject: [PATCH 03/22] [MIG] Make modules uninstallable --- hr_employee_age/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_employee_age/__openerp__.py b/hr_employee_age/__openerp__.py index 8da9262b040..f97af4916c9 100644 --- a/hr_employee_age/__openerp__.py +++ b/hr_employee_age/__openerp__.py @@ -33,5 +33,5 @@ "data": [ 'views/hr_employee.xml', ], - 'installable': True, + 'installable': False, } From b7eddbfa6772d38d7ea1f0c620626eebffed8cdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul=20=28ACSONE=29?= Date: Mon, 15 Aug 2016 22:13:29 +0200 Subject: [PATCH 04/22] [FIX] remove en.po that was erroneously created by transbot --- hr_employee_age/i18n/en.po | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 hr_employee_age/i18n/en.po diff --git a/hr_employee_age/i18n/en.po b/hr_employee_age/i18n/en.po deleted file mode 100644 index 96f68a21986..00000000000 --- a/hr_employee_age/i18n/en.po +++ /dev/null @@ -1,28 +0,0 @@ -# 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-30 02:40+0000\n" -"PO-Revision-Date: 2016-04-28 14:59+0000\n" -"Last-Translator: OCA Transbot \n" -"Language-Team: English (http://www.transifex.com/oca/OCA-hr-8-0/language/en/)\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Language: en\n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" - -#. module: hr_employee_age -#: field:hr.employee,age:0 -msgid "Age" -msgstr "Age" - -#. module: hr_employee_age -#: model:ir.model,name:hr_employee_age.model_hr_employee -msgid "Employee" -msgstr "Employee" From 20412918d7d433d3d405cd00d57ff0fa8aed422d Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 14:52:24 +0200 Subject: [PATCH 05/22] [MIG] Rename manifest files --- hr_employee_age/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename hr_employee_age/{__openerp__.py => __manifest__.py} (100%) diff --git a/hr_employee_age/__openerp__.py b/hr_employee_age/__manifest__.py similarity index 100% rename from hr_employee_age/__openerp__.py rename to hr_employee_age/__manifest__.py From c5a1c2bd3b12735675fa208304b443e82bb54a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Antonio=20Cuello=20Principal?= Date: Tue, 29 Nov 2016 01:33:33 +0100 Subject: [PATCH 06/22] [MIG] 10.0 Porting hr_employee_age (#293) --- hr_employee_age/__manifest__.py | 4 +-- hr_employee_age/i18n/ar.po | 24 ++++++++++++------ hr_employee_age/i18n/cs_CZ.po | 30 +++++++++++++++++++++++ hr_employee_age/i18n/de.po | 22 +++++++++++------ hr_employee_age/i18n/es.po | 21 ++++++++++------ hr_employee_age/i18n/fi.po | 12 ++++++--- hr_employee_age/i18n/fr.po | 21 ++++++++++------ hr_employee_age/i18n/hr.po | 30 +++++++++++++++++++++++ hr_employee_age/i18n/hr_HR.po | 31 ++++++++++++++++++++++++ hr_employee_age/i18n/hr_employee_age.pot | 25 +++++++++++++++++++ hr_employee_age/i18n/it.po | 21 ++++++++++------ hr_employee_age/i18n/lt.po | 30 +++++++++++++++++++++++ hr_employee_age/i18n/nl_NL.po | 22 +++++++++++------ hr_employee_age/i18n/pt_BR.po | 12 ++++++--- hr_employee_age/i18n/ro.po | 15 +++++++++--- hr_employee_age/i18n/sl.po | 21 ++++++++-------- hr_employee_age/models/hr_employee.py | 22 +++++++++-------- hr_employee_age/views/hr_employee.xml | 31 +++++++++--------------- 18 files changed, 299 insertions(+), 95 deletions(-) create mode 100644 hr_employee_age/i18n/cs_CZ.po create mode 100644 hr_employee_age/i18n/hr.po create mode 100644 hr_employee_age/i18n/hr_HR.po create mode 100644 hr_employee_age/i18n/hr_employee_age.pot create mode 100644 hr_employee_age/i18n/lt.po diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index f97af4916c9..2ff1387747e 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -20,7 +20,7 @@ { "name": "Employee Age", - 'version': '8.0.1.0.0', + 'version': '10.0.1.0.0', 'license': 'AGPL-3', 'author': "Salton Massally , " "Odoo Community Association (OCA)", @@ -33,5 +33,5 @@ "data": [ 'views/hr_employee.xml', ], - 'installable': False, + 'installable': True, } diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po index 9bbcba7e89a..50fa47d4c92 100644 --- a/hr_employee_age/i18n/ar.po +++ b/hr_employee_age/i18n/ar.po @@ -1,21 +1,29 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-11-30 05:19+0000\n" -"PO-Revision-Date: 2015-10-19 08:39+0000\n" -"Last-Translator: <>\n" -"Language-Team: Arabic (http://www.transifex.com/oca/OCA-hr-8-0/language/ar/)\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" -"Language: ar\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" +"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 diff --git a/hr_employee_age/i18n/cs_CZ.po b/hr_employee_age/i18n/cs_CZ.po new file mode 100644 index 00000000000..6adb5cae028 --- /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 index 3aeb5fc344a..accdd588d37 100644 --- a/hr_employee_age/i18n/de.po +++ b/hr_employee_age/i18n/de.po @@ -1,23 +1,29 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.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: German (http://www.transifex.com/oca/OCA-hr-8-0/language/de/)\n" +"POT-Creation-Date: 2017-11-28 01:43+0000\n" +"PO-Revision-Date: 2017-11-28 01:43+0000\n" +"Last-Translator: OCA Transbot , 2017\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" -"Language: de\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 "Angestellte" +msgstr "Angestellter" diff --git a/hr_employee_age/i18n/es.po b/hr_employee_age/i18n/es.po index 7ef73818785..93a00172c6b 100644 --- a/hr_employee_age/i18n/es.po +++ b/hr_employee_age/i18n/es.po @@ -1,22 +1,29 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.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: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\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" -"Language: es\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" diff --git a/hr_employee_age/i18n/fi.po b/hr_employee_age/i18n/fi.po index b331d2dc45c..1b5175f05da 100644 --- a/hr_employee_age/i18n/fi.po +++ b/hr_employee_age/i18n/fi.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_employee_age -# +# # Translators: msgid "" msgstr "" @@ -10,13 +10,19 @@ msgstr "" "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-Team: Finnish (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"fi/)\n" +"Language: fi\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: fi\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: hr_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" diff --git a/hr_employee_age/i18n/fr.po b/hr_employee_age/i18n/fr.po index 0aa119434da..72484de4fe8 100644 --- a/hr_employee_age/i18n/fr.po +++ b/hr_employee_age/i18n/fr.po @@ -1,22 +1,29 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.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: French (http://www.transifex.com/oca/OCA-hr-8-0/language/fr/)\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" -"Language: fr\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" diff --git a/hr_employee_age/i18n/hr.po b/hr_employee_age/i18n/hr.po new file mode 100644 index 00000000000..bfae6743110 --- /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..0fa32a71b8c --- /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..ccd1d05ee95 --- /dev/null +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * hr_employee_age +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.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 index 92525a8175d..0ca243818fb 100644 --- a/hr_employee_age/i18n/it.po +++ b/hr_employee_age/i18n/it.po @@ -1,22 +1,29 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-03-12 12:02+0000\n" -"PO-Revision-Date: 2015-10-19 08:39+0000\n" -"Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/it/)\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" -"Language: it\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" diff --git a/hr_employee_age/i18n/lt.po b/hr_employee_age/i18n/lt.po new file mode 100644 index 00000000000..52a6e7a85d3 --- /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 index a907c3f6b76..a326788d195 100644 --- a/hr_employee_age/i18n/nl_NL.po +++ b/hr_employee_age/i18n/nl_NL.po @@ -1,22 +1,30 @@ # 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: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.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: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_NL/)\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" -"Language: nl_NL\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" diff --git a/hr_employee_age/i18n/pt_BR.po b/hr_employee_age/i18n/pt_BR.po index 31d0a53de24..bad666b8479 100644 --- a/hr_employee_age/i18n/pt_BR.po +++ b/hr_employee_age/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_employee_age -# +# # Translators: msgid "" msgstr "" @@ -10,13 +10,19 @@ msgstr "" "POT-Creation-Date: 2016-03-11 01:48+0000\n" "PO-Revision-Date: 2015-10-19 08:39+0000\n" "Last-Translator: <>\n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/" +"language/pt_BR/)\n" +"Language: pt_BR\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" +#. module: hr_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" diff --git a/hr_employee_age/i18n/ro.po b/hr_employee_age/i18n/ro.po index 9c0ad9f60f5..0dd3721e2cd 100644 --- a/hr_employee_age/i18n/ro.po +++ b/hr_employee_age/i18n/ro.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_employee_age -# +# # Translators: msgid "" msgstr "" @@ -10,12 +10,19 @@ msgstr "" "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-Team: Romanian (http://www.transifex.com/oca/OCA-hr-8-0/language/" +"ro/)\n" +"Language: ro\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: ro\n" -"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?2:1));\n" +"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?" +"2:1));\n" + +#. module: hr_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 diff --git a/hr_employee_age/i18n/sl.po b/hr_employee_age/i18n/sl.po index 0c7df7f5ba6..5eec5a502c1 100644 --- a/hr_employee_age/i18n/sl.po +++ b/hr_employee_age/i18n/sl.po @@ -1,25 +1,26 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * hr_employee_age -# +# # Translators: -# Matjaž Mozetič , 2016 +# OCA Transbot , 2016 msgid "" msgstr "" -"Project-Id-Version: hr (8.0)\n" +"Project-Id-Version: Odoo Server 10.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2016-04-30 02:40+0000\n" -"PO-Revision-Date: 2016-04-30 06:15+0000\n" -"Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-hr-8-0/language/sl/)\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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" #. module: hr_employee_age -#: field:hr.employee,age:0 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee_age msgid "Age" msgstr "Starost" diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 5716f250a62..3fbe96e74c4 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -17,25 +17,27 @@ # along with this program. If not, see . # ############################################################################### -from datetime import datetime -from openerp import fields, models, api -from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as OE_DFORMAT +from odoo import api, fields, models +from dateutil.relativedelta import relativedelta class HrEmployee(models.Model): _inherit = 'hr.employee' age = fields.Integer( - 'Age', + string='Age', readonly=True, compute='_compute_age' ) - @api.one + @api.multi + @api.depends('birthday') def _compute_age(self): - if self.birthday: - dBday = datetime.strptime(self.birthday, OE_DFORMAT).date() - dToday = datetime.now().date() - self.age = dToday.year - dBday.year - (( - dToday.month, dToday.day) < (dBday.month, dBday.day)) + for record in self: + if record.birthday: + record.age = relativedelta( + fields.Date.from_string(fields.Date.today()), + fields.Date.from_string(record.birthday)).years + else: + record.age = 0 diff --git a/hr_employee_age/views/hr_employee.xml b/hr_employee_age/views/hr_employee.xml index 7bcffec0be8..ca101e5bd8d 100644 --- a/hr_employee_age/views/hr_employee.xml +++ b/hr_employee_age/views/hr_employee.xml @@ -1,19 +1,12 @@ - - - - - - hr.employee.view.form - hr.employee - - - - - - - - - - - - + + + hr.employee.view.form + hr.employee + + + + + + + + From 08185e679e3163ffdea5b88f01805a7e6a82fae2 Mon Sep 17 00:00:00 2001 From: Vacha Trivedi Date: Tue, 3 Jul 2018 17:07:40 +0530 Subject: [PATCH 07/22] [Mig][IMP]hr_employee_age:Migration to 11.0. --- hr_employee_age/README.rst | 17 ++++++----- hr_employee_age/__init__.py | 21 ++----------- hr_employee_age/__manifest__.py | 25 +++------------- hr_employee_age/i18n/de.po | 9 +++--- hr_employee_age/i18n/hr_employee_age.pot | 2 +- hr_employee_age/models/__init__.py | 21 ++----------- hr_employee_age/models/hr_employee.py | 31 +++++--------------- hr_employee_age/static/description/icon.png | Bin 0 -> 9455 bytes hr_employee_age/tests/__init__.py | 2 ++ hr_employee_age/tests/test_hr_employee.py | 21 +++++++++++++ hr_employee_age/views/hr_employee.xml | 4 +-- 11 files changed, 55 insertions(+), 98 deletions(-) create mode 100644 hr_employee_age/static/description/icon.png create mode 100644 hr_employee_age/tests/__init__.py create mode 100644 hr_employee_age/tests/test_hr_employee.py diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index eb2b84eaf0c..a934b4ecff4 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -12,7 +12,7 @@ Installation To install this module, you need to: -* clone the branch 8.0 of the repository https://github.com/OCA/hr +* clone the branch 11.0 of the repository https://github.com/OCA/hr * add the path to this repository in your configuration (addons-path) * update the module list * search for "Employee Age" in your addons @@ -26,11 +26,11 @@ shown above. Usage ===== +When you add the birthday of an employee, the age of an employee will auto-populate. - -Known issues / Roadmap -====================== - +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/116/11.0 Bug Tracker =========== @@ -47,16 +47,17 @@ Contributors ------------ * Salton Massally (iDT Labs) +* Serpent Consulting Services Pvt. Ltd. Maintainer ---------- -.. image:: http://odoo-community.org/logo.png +.. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association - :target: http://odoo-community.org + :target: https://odoo-community.org This module is maintained by the OCA. 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. -To contribute to this module, please visit http://odoo-community.org. +To contribute to this module, please visit https://odoo-community.org. diff --git a/hr_employee_age/__init__.py b/hr_employee_age/__init__.py index a8c4e47810e..7242cef4722 100644 --- a/hr_employee_age/__init__.py +++ b/hr_employee_age/__init__.py @@ -1,21 +1,4 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Copyright (C) 2015 Salton Massally (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################### +# 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 index 2ff1387747e..43127ceca41 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -1,30 +1,13 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Copyright (C) 2015 Salton Massally (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################### +# Copyright (C) 2015 Salton Massally (). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Employee Age", - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'license': 'AGPL-3', 'author': "Salton Massally , " "Odoo Community Association (OCA)", - "website": "http://idtlabs.sl", + "website": "https://github.com/OCA/hr", "category": "Human Resources", "summary": "Age field for employee", "depends": [ diff --git a/hr_employee_age/i18n/de.po b/hr_employee_age/i18n/de.po index accdd588d37..e2a8ef710d8 100644 --- a/hr_employee_age/i18n/de.po +++ b/hr_employee_age/i18n/de.po @@ -9,19 +9,20 @@ 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: 2017-11-28 01:43+0000\n" -"Last-Translator: OCA Transbot , 2017\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" +"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 "" +msgstr "Alter" #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index ccd1d05ee95..3161cbfd809 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" +"Project-Id-Version: Odoo Server 11.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" diff --git a/hr_employee_age/models/__init__.py b/hr_employee_age/models/__init__.py index 6ea3a8287e7..9c157e52ca4 100644 --- a/hr_employee_age/models/__init__.py +++ b/hr_employee_age/models/__init__.py @@ -1,21 +1,4 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Copyright (C) 2015 Salton Massally (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################### +# 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 index 3fbe96e74c4..dd90b2a4de6 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -1,25 +1,8 @@ -# -*- coding: utf-8 -*- -############################################################################### -# -# Copyright (C) 2015 Salton Massally (). -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################### +# 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 -from dateutil.relativedelta import relativedelta class HrEmployee(models.Model): @@ -28,16 +11,16 @@ class HrEmployee(models.Model): age = fields.Integer( string='Age', readonly=True, - compute='_compute_age' + compute='_compute_age', ) @api.multi @api.depends('birthday') def _compute_age(self): for record in self: + age = 0 if record.birthday: - record.age = relativedelta( + age = relativedelta( fields.Date.from_string(fields.Date.today()), fields.Date.from_string(record.birthday)).years - else: - record.age = 0 + record.age = age diff --git a/hr_employee_age/static/description/icon.png b/hr_employee_age/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 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 z 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 Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/hr_employee_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..e3d68ae6548 --- /dev/null +++ b/hr_employee_age/tests/test_hr_employee.py @@ -0,0 +1,21 @@ +# 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(TestHrEmployee, self).setUp() + self.emp_root = self.env.ref('hr.employee_root') + self.emp_root.write({ + 'birthday': '1990-05-15' + }) + + def test_compute_age(self): + self.emp_root._compute_age() + age = relativedelta( + fields.Date.from_string(fields.Date.today()), + fields.Date.from_string(self.emp_root.birthday)).years + self.assertEqual(self.emp_root.age, age) diff --git a/hr_employee_age/views/hr_employee.xml b/hr_employee_age/views/hr_employee.xml index ca101e5bd8d..f0a5a4972f2 100644 --- a/hr_employee_age/views/hr_employee.xml +++ b/hr_employee_age/views/hr_employee.xml @@ -4,9 +4,9 @@ hr.employee - + - + From 3bd7e2cf2d510084bee17ecbe031b3ebfe8da8b9 Mon Sep 17 00:00:00 2001 From: Manuel Claeys Bouuaert Date: Thu, 16 Jan 2020 16:53:07 +0100 Subject: [PATCH 08/22] [REF] hr_employee_age: blacken --- hr_employee_age/__manifest__.py | 18 +++++++----------- hr_employee_age/models/hr_employee.py | 13 +++++-------- hr_employee_age/tests/test_hr_employee.py | 9 ++++----- 3 files changed, 16 insertions(+), 24 deletions(-) diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index 43127ceca41..f996d32820e 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,18 +3,14 @@ { "name": "Employee Age", - 'version': '11.0.1.0.0', - 'license': 'AGPL-3', - 'author': "Salton Massally , " - "Odoo Community Association (OCA)", + "version": "11.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, + "depends": ["hr"], + "data": ["views/hr_employee.xml"], + "installable": True, } diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index dd90b2a4de6..a4290f5caf2 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -6,21 +6,18 @@ class HrEmployee(models.Model): - _inherit = 'hr.employee' + _inherit = "hr.employee" - age = fields.Integer( - string='Age', - readonly=True, - compute='_compute_age', - ) + age = fields.Integer(string="Age", readonly=True, compute="_compute_age") @api.multi - @api.depends('birthday') + @api.depends("birthday") def _compute_age(self): for record in self: age = 0 if record.birthday: age = relativedelta( fields.Date.from_string(fields.Date.today()), - fields.Date.from_string(record.birthday)).years + fields.Date.from_string(record.birthday), + ).years record.age = age diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py index e3d68ae6548..8c7df757494 100644 --- a/hr_employee_age/tests/test_hr_employee.py +++ b/hr_employee_age/tests/test_hr_employee.py @@ -8,14 +8,13 @@ class TestHrEmployee(common.TransactionCase): def setUp(self): super(TestHrEmployee, self).setUp() - self.emp_root = self.env.ref('hr.employee_root') - self.emp_root.write({ - 'birthday': '1990-05-15' - }) + self.emp_root = self.env.ref("hr.employee_root") + self.emp_root.write({"birthday": "1990-05-15"}) def test_compute_age(self): self.emp_root._compute_age() age = relativedelta( fields.Date.from_string(fields.Date.today()), - fields.Date.from_string(self.emp_root.birthday)).years + fields.Date.from_string(self.emp_root.birthday), + ).years self.assertEqual(self.emp_root.age, age) From 88d1b994af20269e6f1bc655d6d49286c84150f3 Mon Sep 17 00:00:00 2001 From: Manuel Claeys Bouuaert Date: Thu, 16 Jan 2020 17:08:49 +0100 Subject: [PATCH 09/22] [MIG] hr_employee_age --- hr_employee_age/README.rst | 63 ++- hr_employee_age/__manifest__.py | 2 +- hr_employee_age/models/hr_employee.py | 4 +- hr_employee_age/readme/CONFIGURE.rst | 2 + hr_employee_age/readme/CONTRIBUTORS.rst | 2 + hr_employee_age/readme/DESCRIPTION.rst | 1 + hr_employee_age/readme/INSTALL.rst | 7 + hr_employee_age/readme/USAGE.rst | 1 + hr_employee_age/static/description/index.html | 443 ++++++++++++++++++ hr_employee_age/tests/test_hr_employee.py | 4 +- 10 files changed, 509 insertions(+), 20 deletions(-) create mode 100644 hr_employee_age/readme/CONFIGURE.rst create mode 100644 hr_employee_age/readme/CONTRIBUTORS.rst create mode 100644 hr_employee_age/readme/DESCRIPTION.rst create mode 100644 hr_employee_age/readme/INSTALL.rst create mode 100644 hr_employee_age/readme/USAGE.rst create mode 100644 hr_employee_age/static/description/index.html diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index a934b4ecff4..ba2a9d6f93d 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -1,12 +1,37 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 - ============ Employee Age ============ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github + :target: https://github.com/OCA/hr/tree/12.0/hr_employee_age + :alt: OCA/hr +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_employee_age + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/116/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + Adds and computes age field on employee +**Table of contents** + +.. contents:: + :local: + Installation ============ @@ -26,38 +51,46 @@ shown above. Usage ===== -When you add the birthday of an employee, the age of an employee will auto-populate. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/116/11.0 +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 smashing it by providing a detailed and welcomed feedback -`here `_. +If you spotted it first, help us smashing it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Salton Massally + Contributors ------------- +~~~~~~~~~~~~ * Salton Massally (iDT Labs) * Serpent Consulting Services Pvt. Ltd. -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. +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. -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. -To contribute to this module, please visit https://odoo-community.org. +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index f996d32820e..afc235aaca6 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "11.0.1.0.0", + "version": "12.0.1.0.0", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index a4290f5caf2..3a65f6a7b04 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -17,7 +17,7 @@ def _compute_age(self): age = 0 if record.birthday: age = relativedelta( - fields.Date.from_string(fields.Date.today()), - fields.Date.from_string(record.birthday), + fields.Date.to_date(fields.Date.today()), + fields.Date.to_date(record.birthday), ).years record.age = age diff --git a/hr_employee_age/readme/CONFIGURE.rst b/hr_employee_age/readme/CONFIGURE.rst new file mode 100644 index 00000000000..f920cc0c15b --- /dev/null +++ b/hr_employee_age/readme/CONFIGURE.rst @@ -0,0 +1,2 @@ +This module does not require any special configuration apart from enabling it as +shown above. \ No newline at end of file diff --git a/hr_employee_age/readme/CONTRIBUTORS.rst b/hr_employee_age/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..b3c013e67a0 --- /dev/null +++ b/hr_employee_age/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Salton Massally (iDT Labs) +* Serpent Consulting Services Pvt. Ltd. diff --git a/hr_employee_age/readme/DESCRIPTION.rst b/hr_employee_age/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..9bd2fa2b82e --- /dev/null +++ b/hr_employee_age/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Adds and computes age field on employee diff --git a/hr_employee_age/readme/INSTALL.rst b/hr_employee_age/readme/INSTALL.rst new file mode 100644 index 00000000000..a80854a3cd1 --- /dev/null +++ b/hr_employee_age/readme/INSTALL.rst @@ -0,0 +1,7 @@ +To install this module, you need to: + +* clone the branch 11.0 of the repository https://github.com/OCA/hr +* add the path to this repository in your configuration (addons-path) +* update the module list +* search for "Employee Age" in your addons +* install the module \ No newline at end of file diff --git a/hr_employee_age/readme/USAGE.rst b/hr_employee_age/readme/USAGE.rst new file mode 100644 index 00000000000..ba1bc38d482 --- /dev/null +++ b/hr_employee_age/readme/USAGE.rst @@ -0,0 +1 @@ +When you add the birthday of an employee, the age of an employee will auto-populate. \ No newline at end of file diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html new file mode 100644 index 00000000000..c08a72aded7 --- /dev/null +++ b/hr_employee_age/static/description/index.html @@ -0,0 +1,443 @@ + + + + + + +Employee Age + + + +
+

Employee Age

+ + +

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

+

Adds and computes age field on employee

+

Table of contents

+ +
+

Installation

+

To install this module, you need to:

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

Configuration

+

This module does not require any special configuration apart from enabling it as +shown above.

+
+
+

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

+

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

+
+
+

Credits

+
+

Authors

+ +
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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

+

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

+

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

+
+
+
+ + diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py index 8c7df757494..b0d8abef292 100644 --- a/hr_employee_age/tests/test_hr_employee.py +++ b/hr_employee_age/tests/test_hr_employee.py @@ -14,7 +14,7 @@ def setUp(self): def test_compute_age(self): self.emp_root._compute_age() age = relativedelta( - fields.Date.from_string(fields.Date.today()), - fields.Date.from_string(self.emp_root.birthday), + fields.Date.to_date(fields.Date.today()), + fields.Date.to_date(self.emp_root.birthday), ).years self.assertEqual(self.emp_root.age, age) From d9334e3e5715c51f57664f158acf486fac2c773a Mon Sep 17 00:00:00 2001 From: Manuel Claeys Bouuaert Date: Wed, 22 Jan 2020 21:09:32 +0100 Subject: [PATCH 10/22] [FIX] hr_employee_age: fix tests, fix readme Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-12.0/hr-12.0-hr_employee_age Translate-URL: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_employee_age/ --- hr_employee_age/README.rst | 8 +---- hr_employee_age/i18n/ar.po | 2 +- hr_employee_age/i18n/cs_CZ.po | 2 +- hr_employee_age/i18n/de.po | 2 +- hr_employee_age/i18n/es.po | 2 +- hr_employee_age/i18n/fi.po | 2 +- hr_employee_age/i18n/fr.po | 2 +- hr_employee_age/i18n/hr.po | 2 +- hr_employee_age/i18n/hr_HR.po | 2 +- hr_employee_age/i18n/hr_employee_age.pot | 4 +-- hr_employee_age/i18n/it.po | 2 +- hr_employee_age/i18n/lt.po | 2 +- hr_employee_age/i18n/nl_NL.po | 2 +- hr_employee_age/i18n/pt_BR.po | 2 +- hr_employee_age/i18n/ro.po | 2 +- hr_employee_age/i18n/sl.po | 2 +- hr_employee_age/models/hr_employee.py | 4 +-- hr_employee_age/readme/CONFIGURE.rst | 2 -- hr_employee_age/readme/INSTALL.rst | 4 +-- hr_employee_age/static/description/index.html | 32 ++++++++----------- hr_employee_age/tests/test_hr_employee.py | 12 +++---- 21 files changed, 40 insertions(+), 54 deletions(-) delete mode 100644 hr_employee_age/readme/CONFIGURE.rst diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index ba2a9d6f93d..192d6049219 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -37,18 +37,12 @@ Installation To install this module, you need to: -* clone the branch 11.0 of the repository https://github.com/OCA/hr +* clone the branch 12.0 of the repository https://github.com/OCA/hr * add the path to this repository in your configuration (addons-path) * update the module list * search for "Employee Age" in your addons * install the module -Configuration -============= - -This module does not require any special configuration apart from enabling it as -shown above. - Usage ===== diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po index 50fa47d4c92..9c8a6fbc8d9 100644 --- a/hr_employee_age/i18n/ar.po +++ b/hr_employee_age/i18n/ar.po @@ -21,7 +21,7 @@ msgstr "" "&& 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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "العمر" diff --git a/hr_employee_age/i18n/cs_CZ.po b/hr_employee_age/i18n/cs_CZ.po index 6adb5cae028..89451b3b216 100644 --- a/hr_employee_age/i18n/cs_CZ.po +++ b/hr_employee_age/i18n/cs_CZ.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Stáří" diff --git a/hr_employee_age/i18n/de.po b/hr_employee_age/i18n/de.po index e2a8ef710d8..730659cf2c9 100644 --- a/hr_employee_age/i18n/de.po +++ b/hr_employee_age/i18n/de.po @@ -20,7 +20,7 @@ msgstr "" "X-Generator: Weblate 3.8\n" #. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Alter" diff --git a/hr_employee_age/i18n/es.po b/hr_employee_age/i18n/es.po index 93a00172c6b..0bc3a533c1a 100644 --- a/hr_employee_age/i18n/es.po +++ b/hr_employee_age/i18n/es.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Edad" diff --git a/hr_employee_age/i18n/fi.po b/hr_employee_age/i18n/fi.po index 1b5175f05da..cc18cb0fb02 100644 --- a/hr_employee_age/i18n/fi.po +++ b/hr_employee_age/i18n/fi.po @@ -19,7 +19,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "" diff --git a/hr_employee_age/i18n/fr.po b/hr_employee_age/i18n/fr.po index 72484de4fe8..5f0fbee275a 100644 --- a/hr_employee_age/i18n/fr.po +++ b/hr_employee_age/i18n/fr.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Age" diff --git a/hr_employee_age/i18n/hr.po b/hr_employee_age/i18n/hr.po index bfae6743110..c350b32658c 100644 --- a/hr_employee_age/i18n/hr.po +++ b/hr_employee_age/i18n/hr.po @@ -20,7 +20,7 @@ msgstr "" "%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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Starost" diff --git a/hr_employee_age/i18n/hr_HR.po b/hr_employee_age/i18n/hr_HR.po index 0fa32a71b8c..748ee042ff3 100644 --- a/hr_employee_age/i18n/hr_HR.po +++ b/hr_employee_age/i18n/hr_HR.po @@ -21,7 +21,7 @@ msgstr "" "%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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Godine" diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index 3161cbfd809..a9ddcaf87d3 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \n" #. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "" diff --git a/hr_employee_age/i18n/it.po b/hr_employee_age/i18n/it.po index 0ca243818fb..f835bd70d04 100644 --- a/hr_employee_age/i18n/it.po +++ b/hr_employee_age/i18n/it.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Età" diff --git a/hr_employee_age/i18n/lt.po b/hr_employee_age/i18n/lt.po index 52a6e7a85d3..924678c6a9a 100644 --- a/hr_employee_age/i18n/lt.po +++ b/hr_employee_age/i18n/lt.po @@ -20,7 +20,7 @@ msgstr "" "%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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Amžius" diff --git a/hr_employee_age/i18n/nl_NL.po b/hr_employee_age/i18n/nl_NL.po index a326788d195..68adca05c79 100644 --- a/hr_employee_age/i18n/nl_NL.po +++ b/hr_employee_age/i18n/nl_NL.po @@ -21,7 +21,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Leeftijd" diff --git a/hr_employee_age/i18n/pt_BR.po b/hr_employee_age/i18n/pt_BR.po index bad666b8479..948626532ce 100644 --- a/hr_employee_age/i18n/pt_BR.po +++ b/hr_employee_age/i18n/pt_BR.po @@ -19,7 +19,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "" diff --git a/hr_employee_age/i18n/ro.po b/hr_employee_age/i18n/ro.po index 0dd3721e2cd..b642f41414d 100644 --- a/hr_employee_age/i18n/ro.po +++ b/hr_employee_age/i18n/ro.po @@ -20,7 +20,7 @@ msgstr "" "2:1));\n" #. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "" diff --git a/hr_employee_age/i18n/sl.po b/hr_employee_age/i18n/sl.po index 5eec5a502c1..2a59fa74bf2 100644 --- a/hr_employee_age/i18n/sl.po +++ b/hr_employee_age/i18n/sl.po @@ -20,7 +20,7 @@ msgstr "" "%100==4 ? 2 : 3);\n" #. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" msgstr "Starost" diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 3a65f6a7b04..82001c2f41f 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -17,7 +17,7 @@ def _compute_age(self): age = 0 if record.birthday: age = relativedelta( - fields.Date.to_date(fields.Date.today()), - fields.Date.to_date(record.birthday), + fields.Date.today(), + record.birthday, ).years record.age = age diff --git a/hr_employee_age/readme/CONFIGURE.rst b/hr_employee_age/readme/CONFIGURE.rst deleted file mode 100644 index f920cc0c15b..00000000000 --- a/hr_employee_age/readme/CONFIGURE.rst +++ /dev/null @@ -1,2 +0,0 @@ -This module does not require any special configuration apart from enabling it as -shown above. \ No newline at end of file diff --git a/hr_employee_age/readme/INSTALL.rst b/hr_employee_age/readme/INSTALL.rst index a80854a3cd1..fbcad9b2994 100644 --- a/hr_employee_age/readme/INSTALL.rst +++ b/hr_employee_age/readme/INSTALL.rst @@ -1,7 +1,7 @@ To install this module, you need to: -* clone the branch 11.0 of the repository https://github.com/OCA/hr +* clone the branch 12.0 of the repository https://github.com/OCA/hr * add the path to this repository in your configuration (addons-path) * update the module list * search for "Employee Age" in your addons -* install the module \ No newline at end of file +* install the module diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index c08a72aded7..ef5f13c429e 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -373,13 +373,12 @@

Employee Age

-
-

Configuration

-

This module does not require any special configuration apart from enabling it as -shown above.

-
-

Usage

+

Usage

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

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed @@ -413,22 +407,22 @@

Bug Tracker

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

-

Credits

+

Credits

-

Authors

+

Authors

-

Contributors

+

Contributors

-

Maintainers

+

Maintainers

This module is maintained by the OCA.

Odoo Community Association

OCA, or the Odoo Community Association, is a nonprofit organization whose diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py index b0d8abef292..f3c6dbdfa47 100644 --- a/hr_employee_age/tests/test_hr_employee.py +++ b/hr_employee_age/tests/test_hr_employee.py @@ -8,13 +8,13 @@ class TestHrEmployee(common.TransactionCase): def setUp(self): super(TestHrEmployee, self).setUp() - self.emp_root = self.env.ref("hr.employee_root") - self.emp_root.write({"birthday": "1990-05-15"}) + self.employee_admin = self.env.ref("hr.employee_admin") + self.employee_admin.write({"birthday": "1990-05-15"}) def test_compute_age(self): - self.emp_root._compute_age() + self.employee_admin._compute_age() age = relativedelta( - fields.Date.to_date(fields.Date.today()), - fields.Date.to_date(self.emp_root.birthday), + fields.Date.today(), + self.employee_admin.birthday, ).years - self.assertEqual(self.emp_root.age, age) + self.assertEqual(self.employee_admin.age, age) From 609e94b86f08607020e22cedfe1104c1ea696a15 Mon Sep 17 00:00:00 2001 From: Saran440 Date: Tue, 25 Feb 2020 10:08:17 +0700 Subject: [PATCH 11/22] [IMP] hr_employee_age: black, isort --- hr_employee_age/__manifest__.py | 2 +- hr_employee_age/models/hr_employee.py | 5 +---- hr_employee_age/readme/USAGE.rst | 2 +- hr_employee_age/tests/test_hr_employee.py | 6 ++---- 4 files changed, 5 insertions(+), 10 deletions(-) diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index afc235aaca6..9b547bf7598 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 82001c2f41f..5f5a2135d06 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -16,8 +16,5 @@ def _compute_age(self): for record in self: age = 0 if record.birthday: - age = relativedelta( - fields.Date.today(), - record.birthday, - ).years + age = relativedelta(fields.Date.today(), record.birthday).years record.age = age diff --git a/hr_employee_age/readme/USAGE.rst b/hr_employee_age/readme/USAGE.rst index ba1bc38d482..e4bd276e7a9 100644 --- a/hr_employee_age/readme/USAGE.rst +++ b/hr_employee_age/readme/USAGE.rst @@ -1 +1 @@ -When you add the birthday of an employee, the age of an employee will auto-populate. \ No newline at end of file +When you add the birthday of an employee, the age of an employee will auto-populate. diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py index f3c6dbdfa47..2d8922927a7 100644 --- a/hr_employee_age/tests/test_hr_employee.py +++ b/hr_employee_age/tests/test_hr_employee.py @@ -1,6 +1,7 @@ # 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 @@ -13,8 +14,5 @@ def setUp(self): def test_compute_age(self): self.employee_admin._compute_age() - age = relativedelta( - fields.Date.today(), - self.employee_admin.birthday, - ).years + age = relativedelta(fields.Date.today(), self.employee_admin.birthday).years self.assertEqual(self.employee_admin.age, age) From cdc6a9a4a87bff9cb0580230f10ebd66d559a66a Mon Sep 17 00:00:00 2001 From: Saran440 Date: Tue, 25 Feb 2020 10:11:40 +0700 Subject: [PATCH 12/22] [13.0][MIG] hr_employee_age --- hr_employee_age/README.rst | 22 +++------- hr_employee_age/i18n/hr_employee_age.pot | 7 ++- hr_employee_age/i18n/pt_BR.po | 9 ++-- hr_employee_age/models/hr_employee.py | 1 - hr_employee_age/readme/CONTRIBUTORS.rst | 1 + hr_employee_age/readme/INSTALL.rst | 7 --- hr_employee_age/static/description/index.html | 43 +++++++------------ hr_employee_age/views/hr_employee.xml | 7 +-- 8 files changed, 35 insertions(+), 62 deletions(-) delete mode 100644 hr_employee_age/readme/INSTALL.rst diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index 192d6049219..b911e99e3ff 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -14,13 +14,13 @@ Employee Age :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github - :target: https://github.com/OCA/hr/tree/12.0/hr_employee_age + :target: https://github.com/OCA/hr/tree/13.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-12-0/hr-12-0-hr_employee_age + :target: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_age :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/12.0 + :target: https://runbot.odoo-community.org/runbot/116/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -32,17 +32,6 @@ Adds and computes age field on employee .. contents:: :local: -Installation -============ - -To install this module, you need to: - -* clone the branch 12.0 of the repository https://github.com/OCA/hr -* add the path to this repository in your configuration (addons-path) -* update the module list -* search for "Employee Age" in your addons -* install the module - Usage ===== @@ -54,7 +43,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -71,6 +60,7 @@ Contributors * Salton Massally (iDT Labs) * Serpent Consulting Services Pvt. Ltd. +* Saran Lim. Maintainers ~~~~~~~~~~~ @@ -85,6 +75,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr `_ project on GitHub. +This module is part of the `OCA/hr `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index a9ddcaf87d3..a8a7cf1687b 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * hr_employee_age +# * hr_employee_age # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,4 +22,3 @@ msgstr "" #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" msgstr "" - diff --git a/hr_employee_age/i18n/pt_BR.po b/hr_employee_age/i18n/pt_BR.po index 948626532ce..930fa04b5cb 100644 --- a/hr_employee_age/i18n/pt_BR.po +++ b/hr_employee_age/i18n/pt_BR.po @@ -8,20 +8,21 @@ 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: 2015-10-19 08:39+0000\n" -"Last-Translator: <>\n" +"PO-Revision-Date: 2020-07-01 20:19+0000\n" +"Last-Translator: Rodrigo Macedo \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" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.10\n" #. module: hr_employee_age #: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__age msgid "Age" -msgstr "" +msgstr "Idade" #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 5f5a2135d06..870f29913b0 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -10,7 +10,6 @@ class HrEmployee(models.Model): age = fields.Integer(string="Age", readonly=True, compute="_compute_age") - @api.multi @api.depends("birthday") def _compute_age(self): for record in self: diff --git a/hr_employee_age/readme/CONTRIBUTORS.rst b/hr_employee_age/readme/CONTRIBUTORS.rst index b3c013e67a0..3813caa6fde 100644 --- a/hr_employee_age/readme/CONTRIBUTORS.rst +++ b/hr_employee_age/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Salton Massally (iDT Labs) * Serpent Consulting Services Pvt. Ltd. +* Saran Lim. diff --git a/hr_employee_age/readme/INSTALL.rst b/hr_employee_age/readme/INSTALL.rst deleted file mode 100644 index fbcad9b2994..00000000000 --- a/hr_employee_age/readme/INSTALL.rst +++ /dev/null @@ -1,7 +0,0 @@ -To install this module, you need to: - -* clone the branch 12.0 of the repository https://github.com/OCA/hr -* add the path to this repository in your configuration (addons-path) -* update the module list -* search for "Employee Age" in your addons -* install the module diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index ef5f13c429e..a1e568514d1 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -367,68 +367,57 @@

Employee Age

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

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

+

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

Adds and computes age field on employee

Table of contents

-
-

Installation

-

To install this module, you need to:

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

Usage

+

Usage

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

-

Bug Tracker

+

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

-

Credits

+

Credits

-

Authors

+

Authors

-

Contributors

+

Contributors

-

Maintainers

+

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.

+

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/views/hr_employee.xml b/hr_employee_age/views/hr_employee.xml index f0a5a4972f2..51bcf4684b6 100644 --- a/hr_employee_age/views/hr_employee.xml +++ b/hr_employee_age/views/hr_employee.xml @@ -1,11 +1,12 @@ + hr.employee.view.form hr.employee - + - - + + From fd20344dceba2f137ee886ec3f2f03ae0627fde5 Mon Sep 17 00:00:00 2001 From: komsans Date: Mon, 9 Nov 2020 17:09:43 +0700 Subject: [PATCH 13/22] [MIG] hr_employee_age : Migration to 14.0 --- hr_employee_age/README.rst | 11 ++++++----- hr_employee_age/__manifest__.py | 2 +- hr_employee_age/i18n/ar.po | 15 +++++++++++++++ hr_employee_age/i18n/hr_employee_age.pot | 17 ++++++++++++++++- hr_employee_age/i18n/pt_BR.po | 8 ++++---- hr_employee_age/models/hr_employee.py | 2 +- hr_employee_age/readme/CONTRIBUTORS.rst | 1 + hr_employee_age/static/description/index.html | 7 ++++--- hr_employee_age/tests/test_hr_employee.py | 2 +- 9 files changed, 49 insertions(+), 16 deletions(-) diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index b911e99e3ff..0360e2a2287 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -14,13 +14,13 @@ Employee Age :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github - :target: https://github.com/OCA/hr/tree/13.0/hr_employee_age + :target: https://github.com/OCA/hr/tree/14.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-13-0/hr-13-0-hr_employee_age + :target: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_age :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/13.0 + :target: https://runbot.odoo-community.org/runbot/116/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -43,7 +43,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -61,6 +61,7 @@ Contributors * Salton Massally (iDT Labs) * Serpent Consulting Services Pvt. Ltd. * Saran Lim. +* Komsan Somwong Maintainers ~~~~~~~~~~~ @@ -75,6 +76,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr `_ project on GitHub. +This module is part of the `OCA/hr `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index 9b547bf7598..89b16dae793 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po index 9c8a6fbc8d9..0eadeb1255e 100644 --- a/hr_employee_age/i18n/ar.po +++ b/hr_employee_age/i18n/ar.po @@ -25,7 +25,22 @@ msgstr "" msgid "Age" msgstr "العمر" +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__display_name +msgid "Display Name" +msgstr "" + #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" msgstr "الموظف" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__id +msgid "ID" +msgstr "" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee____last_update +msgid "Last Modified on" +msgstr "" diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index a8a7cf1687b..23219556278 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,7 +18,22 @@ msgstr "" msgid "Age" msgstr "" +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__display_name +msgid "Display Name" +msgstr "" + #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" msgstr "" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__id +msgid "ID" +msgstr "" + +#. module: hr_employee_age +#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee____last_update +msgid "Last Modified on" +msgstr "" diff --git a/hr_employee_age/i18n/pt_BR.po b/hr_employee_age/i18n/pt_BR.po index 930fa04b5cb..7d54ea94034 100644 --- a/hr_employee_age/i18n/pt_BR.po +++ b/hr_employee_age/i18n/pt_BR.po @@ -8,8 +8,8 @@ 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: 2020-07-01 20:19+0000\n" -"Last-Translator: Rodrigo Macedo \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" @@ -17,7 +17,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 3.10\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 @@ -27,4 +27,4 @@ msgstr "Idade" #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" -msgstr "Empregado" +msgstr "Funcionário" diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 870f29913b0..62898003de8 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -8,7 +8,7 @@ class HrEmployee(models.Model): _inherit = "hr.employee" - age = fields.Integer(string="Age", readonly=True, compute="_compute_age") + age = fields.Integer(compute="_compute_age") @api.depends("birthday") def _compute_age(self): diff --git a/hr_employee_age/readme/CONTRIBUTORS.rst b/hr_employee_age/readme/CONTRIBUTORS.rst index 3813caa6fde..d4bc0c7cde3 100644 --- a/hr_employee_age/readme/CONTRIBUTORS.rst +++ b/hr_employee_age/readme/CONTRIBUTORS.rst @@ -1,3 +1,4 @@ * Salton Massally (iDT Labs) * Serpent Consulting Services Pvt. Ltd. * Saran Lim. +* Komsan Somwong diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index a1e568514d1..46d49d7f3fc 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -367,7 +367,7 @@

Employee Age

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

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

+

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

Adds and computes age field on employee

Table of contents

@@ -391,7 +391,7 @@

Bug Tracker

Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -408,6 +408,7 @@

Contributors

  • Salton Massally (iDT Labs) <smassally@idtlabs.sl>
  • Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
  • Saran Lim. <saranl@ecosoft.co.th>
  • +
  • Komsan Somwong <komsans@ecosoft.co.th>
  • @@ -417,7 +418,7 @@

    Maintainers

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

    -

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

    +

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

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

    diff --git a/hr_employee_age/tests/test_hr_employee.py b/hr_employee_age/tests/test_hr_employee.py index 2d8922927a7..d908ea7367f 100644 --- a/hr_employee_age/tests/test_hr_employee.py +++ b/hr_employee_age/tests/test_hr_employee.py @@ -8,7 +8,7 @@ class TestHrEmployee(common.TransactionCase): def setUp(self): - super(TestHrEmployee, self).setUp() + super().setUp() self.employee_admin = self.env.ref("hr.employee_admin") self.employee_admin.write({"birthday": "1990-05-15"}) From 1a08fd289faf27abf1968890649ba64a8549f53b Mon Sep 17 00:00:00 2001 From: Pedro Evaristo Gonzalez Sanchez Date: Tue, 5 Jul 2022 07:15:36 -0400 Subject: [PATCH 14/22] [MIG] hr_employee_age: Migration to 15.0 --- hr_employee_age/README.rst | 14 +++++++++----- hr_employee_age/__manifest__.py | 2 +- hr_employee_age/i18n/hr_employee_age.pot | 17 +---------------- hr_employee_age/readme/CONTRIBUTORS.rst | 4 ++++ hr_employee_age/static/description/index.html | 10 +++++++--- 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index 0360e2a2287..8d2467896b2 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -14,13 +14,13 @@ Employee Age :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github - :target: https://github.com/OCA/hr/tree/14.0/hr_employee_age + :target: https://github.com/OCA/hr/tree/15.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-14-0/hr-14-0-hr_employee_age + :target: https://translation.odoo-community.org/projects/hr-15-0/hr-15-0-hr_employee_age :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/14.0 + :target: https://runbot.odoo-community.org/runbot/116/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -43,7 +43,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -63,6 +63,10 @@ Contributors * Saran Lim. * Komsan Somwong +* `Pesol `__: + + * Pedro Evaristo Gonzalez Sanchez + Maintainers ~~~~~~~~~~~ @@ -76,6 +80,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr `_ project on GitHub. +This module is part of the `OCA/hr `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index 89b16dae793..d4f354b4bc6 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index 23219556278..7067e51702f 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -18,22 +18,7 @@ msgstr "" msgid "Age" msgstr "" -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__display_name -msgid "Display Name" -msgstr "" - #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" msgstr "" - -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__id -msgid "ID" -msgstr "" - -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee____last_update -msgid "Last Modified on" -msgstr "" diff --git a/hr_employee_age/readme/CONTRIBUTORS.rst b/hr_employee_age/readme/CONTRIBUTORS.rst index d4bc0c7cde3..5233ce103f3 100644 --- a/hr_employee_age/readme/CONTRIBUTORS.rst +++ b/hr_employee_age/readme/CONTRIBUTORS.rst @@ -2,3 +2,7 @@ * Serpent Consulting Services Pvt. Ltd. * Saran Lim. * Komsan Somwong + +* `Pesol `__: + + * Pedro Evaristo Gonzalez Sanchez diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index 46d49d7f3fc..703bd2f25dc 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -367,7 +367,7 @@

    Employee Age

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

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

    +

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

    Adds and computes age field on employee

    Table of contents

    @@ -391,7 +391,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

    +feedback.

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

    @@ -409,6 +409,10 @@

    Contributors

  • Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
  • Saran Lim. <saranl@ecosoft.co.th>
  • Komsan Somwong <komsans@ecosoft.co.th>
  • +
  • Pesol: +
  • @@ -418,7 +422,7 @@

    Maintainers

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

    -

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

    +

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

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

    From a6fdb7ab6b149ef66153d1f230af2bc85476af9a Mon Sep 17 00:00:00 2001 From: destroT Date: Thu, 6 Apr 2023 06:53:21 +0000 Subject: [PATCH 15/22] [MIG] hr_employee_age: Migration to 16.0 --- hr_employee_age/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index d4f354b4bc6..f27c93fc969 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "15.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", From ef7d8942c97e2aa285f7150bd0989c3b15d884bb Mon Sep 17 00:00:00 2001 From: oca-ci Date: Tue, 18 Apr 2023 00:21:46 +0000 Subject: [PATCH 16/22] [UPD] Update hr_employee_age.pot --- hr_employee_age/i18n/hr_employee_age.pot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_employee_age/i18n/hr_employee_age.pot b/hr_employee_age/i18n/hr_employee_age.pot index 7067e51702f..324fff361ad 100644 --- a/hr_employee_age/i18n/hr_employee_age.pot +++ b/hr_employee_age/i18n/hr_employee_age.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 15.0\n" +"Project-Id-Version: Odoo Server 16.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" From 95ea919f340434f83f78d1e95fd60ee9739c63df Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 18 Apr 2023 00:25:05 +0000 Subject: [PATCH 17/22] [UPD] README.rst --- hr_employee_age/README.rst | 10 +++++----- hr_employee_age/static/description/index.html | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index 8d2467896b2..d7609e222fe 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -14,13 +14,13 @@ Employee Age :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github - :target: https://github.com/OCA/hr/tree/15.0/hr_employee_age + :target: https://github.com/OCA/hr/tree/16.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-15-0/hr-15-0-hr_employee_age + :target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_age :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/15.0 + :target: https://runbot.odoo-community.org/runbot/116/16.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -43,7 +43,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -80,6 +80,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/hr `_ project on GitHub. +This module is part of the `OCA/hr `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index 703bd2f25dc..ef93524b16e 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -367,7 +367,7 @@

    Employee Age

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

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

    +

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

    Adds and computes age field on employee

    Table of contents

    @@ -391,7 +391,7 @@

    Bug Tracker

    Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. If you spotted it first, help us smashing it by providing a detailed and welcomed -feedback.

    +feedback.

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

    @@ -422,7 +422,7 @@

    Maintainers

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

    -

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

    +

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

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

    From 9c8e5d471e7a4469e5ebe55f4ed394ab7a240243 Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 18 Apr 2023 11:31:17 +0000 Subject: [PATCH 18/22] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: hr-16.0/hr-16.0-hr_employee_age Translate-URL: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_age/ --- hr_employee_age/i18n/ar.po | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/hr_employee_age/i18n/ar.po b/hr_employee_age/i18n/ar.po index 0eadeb1255e..9c8a6fbc8d9 100644 --- a/hr_employee_age/i18n/ar.po +++ b/hr_employee_age/i18n/ar.po @@ -25,22 +25,7 @@ msgstr "" msgid "Age" msgstr "العمر" -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__display_name -msgid "Display Name" -msgstr "" - #. module: hr_employee_age #: model:ir.model,name:hr_employee_age.model_hr_employee msgid "Employee" msgstr "الموظف" - -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee__id -msgid "ID" -msgstr "" - -#. module: hr_employee_age -#: model:ir.model.fields,field_description:hr_employee_age.field_hr_employee____last_update -msgid "Last Modified on" -msgstr "" From 5b0aaac37f2d56be0ad3f133b9a677f9817d0562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Thu, 13 Jul 2023 13:52:40 +0200 Subject: [PATCH 19/22] [IMP] hr_employee_age: Add groups="hr.group_hr_user" to age field according to birthday field definition TT43046 --- hr_employee_age/models/hr_employee.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hr_employee_age/models/hr_employee.py b/hr_employee_age/models/hr_employee.py index 62898003de8..ba2ae7e2a0c 100644 --- a/hr_employee_age/models/hr_employee.py +++ b/hr_employee_age/models/hr_employee.py @@ -8,7 +8,11 @@ class HrEmployee(models.Model): _inherit = "hr.employee" - age = fields.Integer(compute="_compute_age") + # 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): From f02c7cba3f06807f5ebfef564e4ddedf9ec17d0a Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Mon, 17 Jul 2023 06:18:10 +0000 Subject: [PATCH 20/22] hr_employee_age 16.0.1.0.1 --- hr_employee_age/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hr_employee_age/__manifest__.py b/hr_employee_age/__manifest__.py index f27c93fc969..cf2c24a9dc1 100644 --- a/hr_employee_age/__manifest__.py +++ b/hr_employee_age/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Employee Age", - "version": "16.0.1.0.0", + "version": "16.0.1.0.1", "license": "AGPL-3", "author": "Salton Massally , " "Odoo Community Association (OCA)", From 40c09091d1b600782a1490332eb6ea33b5a41f89 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Sun, 3 Sep 2023 13:09:14 +0000 Subject: [PATCH 21/22] [UPD] README.rst --- hr_employee_age/README.rst | 15 +++++--- hr_employee_age/static/description/index.html | 38 ++++++++++--------- 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/hr_employee_age/README.rst b/hr_employee_age/README.rst index d7609e222fe..ec70827ad75 100644 --- a/hr_employee_age/README.rst +++ b/hr_employee_age/README.rst @@ -2,10 +2,13 @@ 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 @@ -19,11 +22,11 @@ Employee Age .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png :target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_age :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/116/16.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=16.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| Adds and computes age field on employee @@ -42,7 +45,7 @@ Bug Tracker Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. -If you spotted it first, help us smashing it by providing a detailed and welcomed +If you spotted it first, help us to smash it by providing a detailed and welcomed `feedback `_. Do not contact contributors directly about support or help with technical issues. diff --git a/hr_employee_age/static/description/index.html b/hr_employee_age/static/description/index.html index ef93524b16e..f1c9cdb5045 100644 --- a/hr_employee_age/static/description/index.html +++ b/hr_employee_age/static/description/index.html @@ -1,20 +1,20 @@ - + - + Employee Age