From 39faa49e486d4360c30ec01fecc80ad65070f4a6 Mon Sep 17 00:00:00 2001
From: Fekete Mihai
Date: Fri, 24 Apr 2015 12:47:30 +0300
Subject: [PATCH 01/42] [ADD] hr_employee_firstname
---
hr_employee_firstname/README.rst | 50 +++++++++++
hr_employee_firstname/__init__.py | 23 ++++++
hr_employee_firstname/__openerp__.py | 43 ++++++++++
hr_employee_firstname/i18n/de.po | 32 +++++++
hr_employee_firstname/i18n/fr.po | 32 +++++++
.../i18n/hr_employee_firstname.pot | 32 +++++++
hr_employee_firstname/i18n/ro.po | 32 +++++++
hr_employee_firstname/models/__init__.py | 23 ++++++
hr_employee_firstname/models/hr.py | 78 ++++++++++++++++++
.../static/description/icon.png | Bin 0 -> 5938 bytes
hr_employee_firstname/tests/__init__.py | 1 +
.../tests/test_hr_employee_firstname.py | 78 ++++++++++++++++++
hr_employee_firstname/views/hr_view.xml | 27 ++++++
13 files changed, 451 insertions(+)
create mode 100644 hr_employee_firstname/README.rst
create mode 100644 hr_employee_firstname/__init__.py
create mode 100644 hr_employee_firstname/__openerp__.py
create mode 100644 hr_employee_firstname/i18n/de.po
create mode 100644 hr_employee_firstname/i18n/fr.po
create mode 100644 hr_employee_firstname/i18n/hr_employee_firstname.pot
create mode 100644 hr_employee_firstname/i18n/ro.po
create mode 100644 hr_employee_firstname/models/__init__.py
create mode 100644 hr_employee_firstname/models/hr.py
create mode 100644 hr_employee_firstname/static/description/icon.png
create mode 100644 hr_employee_firstname/tests/__init__.py
create mode 100644 hr_employee_firstname/tests/test_hr_employee_firstname.py
create mode 100644 hr_employee_firstname/views/hr_view.xml
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
new file mode 100644
index 00000000000..ba584a39c40
--- /dev/null
+++ b/hr_employee_firstname/README.rst
@@ -0,0 +1,50 @@
+.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
+ :alt: License: AGPL-3
+
+HR Employee First Name, Last Name
+=================================
+
+This module allows you to add firstname and lastname in employee form,
+and concatenate both in name field.
+
+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 "HR Employee First Name, Last Name" in your addons
+* install the module
+
+Usage
+=====
+
+On the employee form view you will have 2 separate fields, one for Firstname,
+second for Lastname, both required.
+
+Credits
+=======
+
+Contributors
+------------
+
+* El Hadji Dem (elhadji.dem@savoirfairelinux.com)
+* Sandy Carter (sandy.carter@savoirfairelinux.com)
+* Fekete Mihai
+
+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_firstname/__init__.py b/hr_employee_firstname/__init__.py
new file mode 100644
index 00000000000..8a84e445229
--- /dev/null
+++ b/hr_employee_firstname/__init__.py
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2010 - 2014 Savoir-faire Linux
+# ().
+#
+# 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_firstname/__openerp__.py b/hr_employee_firstname/__openerp__.py
new file mode 100644
index 00000000000..09c011bd8a2
--- /dev/null
+++ b/hr_employee_firstname/__openerp__.py
@@ -0,0 +1,43 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2010 - 2014 Savoir-faire Linux
+# ().
+#
+# 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': 'HR Employee First Name, Last Name',
+ 'version': '0.1',
+ 'author': "Savoir-faire Linux, "
+ "Fekete Mihai (Forest and Biomass Services Romania), "
+ "Odoo Community Association (OCA)",
+ 'maintainer': 'Savoir-faire Linux',
+ 'website': 'http://www.savoirfairelinux.com',
+ 'license': 'AGPL-3',
+ 'category': 'Human Resources',
+ 'summary': 'Adds First Name to Employee',
+ 'depends': [
+ 'hr',
+ ],
+ 'data': [
+ 'views/hr_view.xml',
+ ],
+ 'demo': [],
+ 'test': [],
+ 'installable': True,
+}
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
new file mode 100644
index 00000000000..1f03c294dee
--- /dev/null
+++ b/hr_employee_firstname/i18n/de.po
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-24 10:20+0000\n"
+"PO-Revision-Date: 2015-04-24 10:20+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Angestellter"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Vorname"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Nachname"
+
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
new file mode 100644
index 00000000000..36d16120c3d
--- /dev/null
+++ b/hr_employee_firstname/i18n/fr.po
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-24 10:20+0000\n"
+"PO-Revision-Date: 2015-04-24 10:20+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Employé"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Prénom"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Nom"
+
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
new file mode 100644
index 00000000000..6b13f0cf122
--- /dev/null
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-24 10:20+0000\n"
+"PO-Revision-Date: 2015-04-24 10:20+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr ""
+
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
new file mode 100644
index 00000000000..e8d7be091fc
--- /dev/null
+++ b/hr_employee_firstname/i18n/ro.po
@@ -0,0 +1,32 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 8.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-04-24 10:20+0000\n"
+"PO-Revision-Date: 2015-04-24 10:20+0000\n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Angajat"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Prenume"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Nume"
+
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
new file mode 100644
index 00000000000..a5f6a47b477
--- /dev/null
+++ b/hr_employee_firstname/models/__init__.py
@@ -0,0 +1,23 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2010 - 2014 Savoir-faire Linux
+# ().
+#
+# 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
diff --git a/hr_employee_firstname/models/hr.py b/hr_employee_firstname/models/hr.py
new file mode 100644
index 00000000000..67458d6434f
--- /dev/null
+++ b/hr_employee_firstname/models/hr.py
@@ -0,0 +1,78 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2010 - 2014 Savoir-faire Linux
+# ().
+#
+# 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 openerp import models, fields, api
+
+
+class hr_employee(models.Model):
+ _inherit = 'hr.employee'
+
+ @api.cr_context
+ def _auto_init(self, cr, context=None):
+ res = super(hr_employee, self)._auto_init(cr, context=context)
+ cr.execute("""
+UPDATE hr_employee
+SET firstname = COALESCE(LEFT(trim(name_related),
+ COALESCE(POSITION(' ' IN trim(name_related))-1,
+ CHAR_LENGTH(trim(name_related)))),
+ ' '),
+ lastname = COALESCE(RIGHT(trim(name_related),
+ CHAR_LENGTH(trim(name_related))-
+ POSITION(' ' IN trim(name_related))),
+ ' ')
+WHERE name_related IS NOT NULL OR name_related != ' ' AND
+ (firstname IS NULL OR firstname = ' ') AND
+ (lastname IS NULL or lastname = ' ')""")
+ return res
+
+ @api.one
+ @api.onchange('firstname', 'lastname')
+ def get_name(self):
+ if self.firstname and self.lastname:
+ self.name_related = self.firstname + ' ' + self.lastname
+
+ @api.one
+ @api.depends('firstname', 'lastname')
+ def _get_name(self):
+ if self.firstname and self.lastname:
+ self.name_related = self.firstname + ' ' + self.lastname
+
+ firstname = fields.Char("Firstname", required=True)
+ lastname = fields.Char("Lastname", required=True)
+ name_related = fields.Char(string="Name", readonly=True,
+ compute="_get_name",
+ store=True)
+
+ @api.model
+ def create(self, vals):
+ if vals.get('firstname', ' ') != ' ' and vals.get('lastname',
+ ' ') != ' ':
+ vals['name'] = vals['firstname'] + ' ' + vals['lastname']
+ if vals['name'] and vals.get('firstname', ' ') and vals.get('lastname',
+ ' '):
+ if len(vals['name'].strip().split(' ', 1)) > 1:
+ vals['firstname'] = vals['name'].strip().split(' ', 1)[0]
+ vals['lastname'] = vals['name'].strip().split(' ', 1)[1]
+ else:
+ vals['firstname'] = vals['name']
+ vals['lastname'] = ' '
+ return super(hr_employee, self).create(vals)
diff --git a/hr_employee_firstname/static/description/icon.png b/hr_employee_firstname/static/description/icon.png
new file mode 100644
index 0000000000000000000000000000000000000000..297dc71c85c5fdd8deafabfbb46093e04adc32d1
GIT binary patch
literal 5938
zcmZ{oWmFXI^Y&S~Q@W%NlQZ+2a^I50RaI=RYgJPA7%a%I_ke%>+HSx52!Zk$_fat|3z_c
zRp!46hL?)5??0;iPfBC1QvVhGy<{E#QRaU-zJ^;NAdm>DD#+>uuAb#%d@$Y59w{n}
zV@#J(iOk|Fp-kV&k~3Y^QH$!(b+Vq~dGD0q{}wxo1QD4Ps4`oh%BjA|XuNqJw)KbU
zmpavmsg3xhhiZr2#20(@&3p63$LZ&9j3cTAh>i|#FLw%kr!zU3W-neY9@ut3l-qwa
z#k^E@g@A`1VZjown>hzQ!q3=j>*ndcspz`~cX97qSv}6)AC;AA@7E#4tV-J2{*Hha
z)r3^~l!T6WtKR|f=s>a~gDr;nr)*aNd2P!8qI(
zt@@jCF0-niv+}!9!YT1ys6a}j=R&qeYbXcKL^aareQJmn
zt*AYTL#Hk6JWoOVVwM}p9j|>vl2`*8Pqvc0ivo*!y_C3KS0su^?My)`Vg0ZY$>v
zj7Z~drXXFMN6y3u55X24pj*p`8-1JyGw}9{MVh`$Q-YlcgP-2c-JsjrQ)%X@)XvO@
z=k4sM?J(iU9B-bGdb!sT%9-m;cSwJTIJO04K4;Lnu;VPXfzl;APGBN?`uau
zFkV!VR*dwmL?ErsR?bk?9`nuF7V?~OXX*8}I~2qCMDF*XHJ2^Q0LxR#F0Rx-16x}7
zrl(JH)ci$U1p^>-{%jjblml7BX5LQ{6?Y49E(!=q_B=mN_JK!n*)60X9WiQqjW8wO
zYIr1H6nWkMEz9hl-kqY6q8tU;RfYUW#50W0)IZ*I{>lJn!-2ON4kY+S|Nh(btN8>K
zTT~lIq>lhN+io33zP>sIqeOVh%@+>PqqkJwmi9A5P8eY<6bRGN6Qj)kEUF^?2ns|A
zP3h&5e~6va3P7pxj2+Ixk$R?q&CEZPQuFM0l9bV$@N#TMk}Tbpk=mtB>xDG-O%b!e
zYzbH1bxCt%puMC2GxuqsJ%x;%dISo8Gqu1Cg`O@@{p_qTPpl{<
zeDaj45+mFt7&TLupXUybfnON!h*z0Mcm;O?`|AN2+>IiXkL`({iifllvn`{Jm*P7r
zlSW;w&As=U4xX9jcB9Yv039!}$VIoAMA+6PPEyU7w64QB?=1#ovL4cgcmv-P_{Chw
z!zaa7E@x~lp(j|A^@z&xsSqjRg=O1U6wL7zmxo1k@Vy2UW^Avzde}V8+MlGp9AF+f
z0Rqj5ax4jphrs)eso&^-DU5LFn6rA5MIyI>Drp@ADy$|&nx)_d_AR7NFL9*Aj7oG3NP0|VI56V*}{W^Wf{5J-YzPdN2q?|xmA
zsk@KSYus~jc99UiJKxP>g
z%DspUswDVwmoo+^SQrI--$oaD-vGI9x}QH?yWhMUiU`Y4*ZhlEMazQcc@9bl6^xP|
z3=XnGyuIpT{`9#OyCCkby-S)|Lq|q&2>PlOg-lM1C69Ry0RbHi5%&Wl(yN}F?H)n`2P-ku&c=zd$9!LW4NYN2Epl;`I2A7=3K
zuD^~nk5=kIysqBUC?NCicen&XU-q`CND1olLX&>IQfMxJo~bxweKz&!4<;O0IiPDC
z(c&IA+2Zhs(w|8{ocvjAMcz)DB_#f|Q~fl=t}X{o11%jjQg8yZ$Y~NJG_12+(OA+{Ch_mT3)Khztx5KNKpKMdkAsp
zLoxcfML!UHr?Cuf1s4&WxWhT4aM3fuWR6cD<%^}Yl>ih)CY9f#a#kwHQc`;Yug8?0
zhwJ^jVCmI?MwH(9^mv+jq>kB?L1f!E&DrEh5zaKGRBeEP=s0
z#)u(zx>PVq(^$7dC%jjdAQ=S(6aSZ3HTm8GOv;l(>`<$k)#r)ojj;Areb^LP=i_O66LcI5y&&S61ekY64ujGX=`PACSDE^AW-yHKS
zs<+nT7Zom)k2S@&IIHvLEbSP1wV?Dhb-99?dS6WGT
z6{_MA36iAL62-5{D@kPUanwfv8o9a`Kh41AqtZKx0k1G~P@+Qgc=Ykaz{oHQy%cW}
z2YDX=ynH?LlC;&=%ztplX&SJq_oD0!V?5j;BD7eljt&CT?}2)YIrU9n$>$xKfyf)n
zvvfv8`fg0mJx~On^eZY9Mi#%*KjNRgK
z$QPC#Y>7%cwr$%Osi`6-r^8pFiuqZ04(d0fN18f)5&CywZVSE`V9`B@arZC~eviB&
zY>dn}`>hXD+L|tGR?%@p;bNNY;c})R{}K1r#o=tw_8`(BAIS*Q2|8`GZ~mJcncNN7k9~ak6xJDMfH)>{V0ey?;cF|)J}~m8+H(h+sfs0zEd`G36aMG&&&{{
z)*0;VD2FG?D;KhDm2tE6zxg(h6QfBF-^&sxudHO?XQxzjOx89v0C@fm3|@snmgRNy8ZslFjqG)7c*Zl?^NlZl&D^)
z)&5-@Kt%_)whnMS8n_A&Z6}AtDdE&onjCGaNxMStO~8PZySlNnp!h?2G+a#v%fSI`uzq+XOS#eZUT$DbI~
zMvkSo6!bZ=D3o-In$vl`NZR?^+6=*KO_xckcKgJ}>pd|A
zcvLx}$rbAKQ9Xk{0^#+g9|Fh3dE`R6_Nd}qg!gMRbZp)`rEp-LLJm*nMGWf*&;8Nn
z1zhWoGm)~&r6`TbCE5&pVn07fQHE1wQ3yZ^D@ME>4WCYvSTKZe+f&r^Eb50=W_?H5
zSqI1Jsm9MfL~F>ZnV@276v+a^kZ#O31X5D1KK-<=yZ=cD|KU2Y#_cbmEUs`wV0h&4
z?j@%x+UQ`K4N=|*2>(sj{HD+Lfz=U7X_p@b@3N>Ut{GX-=jfem4eKz~L+pXLrf}
z`rsbj>asT3IIE*xzO^7YcYTu=9POy#R2mnrn2_0qe82ffeY$*U4(bY;d2GiR*48wS
zCRX$BD%b0jTiaAEvev@4wR1D8)_*^v4)aCq`3g4ul29bfy)73*@m<8(3I4dMk870^
zOTUBub#(4t7Bjm5KJTUuj7ctDtzo*uv~YA!5#2Ux(D52T@sR-%>26{E%5tEjjA<+p
z?pdzxL)L5yZ95Ze*fa7h!tc46<$8iDYyN2&36JWfrB$@|lXU-#B#?lOo_bNWPE%en
zL6hVUAFJCYwK7KirikQvQj}$;Amc{DxCw4()aiGh5Q{XoAhewNnjAYici|DN?PTOO
z?q+P?fB^Q%r4DU2?$be!KwWnE9flc!Iu==Xk`2;olEaDd>=^3AfVm+XboyaB6A%|-
zk~*SnhF&xD+%D22zPykk2ht3F{liy+${T2qm7t{LZdv{wy-E{1Jg?FK5FQ>Bh$ZQu
z*aK<>l#Km_B~8Uk2#^y7X|ah~T?)tFs{+=5y=g*8Cee128K$_)xP@C40#PL`TMuKxG>s=e?0cH9$1Z6|#?W!X5
zmOm;T8jQCgrZi;EY7?Rgm4l-pEY?P&c5JBMt^Ru
zM!7I|hWX#wc8Xd{hcdog$PIBUTHg**OM5h{q2zJtjwsW(((D8I&Y}HO-`tzs2veq|
zuq+Yplcr)NI8bQ93F=WuKId|OMq11ayNeMp#3XJBh-APau|yFh`%UjsuikPAiRF~31QxsuVk$aGJk=B{l#`&((dkxazq`$b)qmuO^K1jR
z*;mJ$1A%9d?>cqm=cU>Ua&vmfKwCNiQlFBV$@qg%=Db>V=TY+En^Pt@O0*+%65|ws
z`S86U;;wJQHo*}L^V3evva?E0O!fEZF?8YzCPpb?8hewqWy1NJLX1dk)mdUuKxRn?v#<-f>!8i4iCrm#
zQ?$H;N^;}*BN8rF(Bkp3^ZZe=SS;f{#x~{y$82#Rh)wR({A`6Dl;+JC+mijuYrx2^
zawsv?1Z~D-QF{hLz!r@BB2fVOXCYxN=L!C=K3Tf01?;|!J~X4922(3;?C)sJzDn}<
z2wgZxJY-PsDqK`^>aJDSV$W{$-Y$w@dt$NtIx8pyE1?CeBfGapDJk*0TuCc?sfL^j
zrx(M`*HVlp@0Q7cl)A}_*NYIu1LW}<;7z>pIyA+ HxC&%52rYWz659b%5VwO|`_
zaaQ#=6u&oY2zu6@mqcZA?3^$LLA1@GkSu(6^PPQWZZY;7F6YC8a_lpM(DkSGftGO%
z_um`BHhClkx;H`JSk~Ttd5GY({L&1e?@ro;X?i4Ydl);F;wRVRx9Bn&kc!o)Sl~z_
z5CQ#86V0KQ-(9hBGUwud@rXduz%Mk|H{?8!wKzZ-O|LnpQ?+E;o^A!~V>^k6D6xnd
zIH(qQ2<1O5{oVuI+Z|4ljOkl$8fWCQoRVkuv)in~o164Wzg-7S+U)G*09}+29bg-k
z6|fFK0<%QNWb+Fb+3iD13oqZpvlsX3_mojiiInYFH`6Hf7)O~;ahL_4ubvp9`%UGp
z$4M(6d~&)2-lA0-nLOpnwZuxjB`(iIufhdS;V%yiTBR5ca;J7Iwk%4mY5;+dFI7V;
zz7^=|Q!NMo{@GM4@(t6Bw4yNg>M1as7
z(YKyLW4AaK(X=h#HMD}7BWG+}9EgNBfcL11b-Jw{g-ZnBAypD%V{C=a_RP9+%&mXv
zYA!=`cuYK?S`G+ECwenaSJ^Yf?T3E1pL`42z?_cH$B1^Uy`R%FUR#geTc;oQU4v5O
zDWGtLejeaw9f<(a^=oi+1*;)Np4onst25!+{sHy+FbRRd
zPn{b1<`{#;i4{Pd-v>#1N^|3=j~2yNm1MJzAOMP%14VIuUuBixf~dO?jso!wj36qN#&u}7i(
z(&mmB*QfBxJUKMh_Wbz~@Oh@10!Aik%d(Qjwj{icpZ#2S^1pDcuy{pM!1qsjWuJci
zcS>gZplI~L&iaGBn5~cfKOpe&@Q8B$d%XO5yaHmp{9-&j>^yw`@*g!m+W*Jk?rG=j
z5cK~yWRfPA{WFmNH$m6a;X{D6k3B*_KmeDshpVrxwU<4Yr;lU)xdg?(CInSQ4TVNI
HtLXm&e3x``
literal 0
HcmV?d00001
diff --git a/hr_employee_firstname/tests/__init__.py b/hr_employee_firstname/tests/__init__.py
new file mode 100644
index 00000000000..a9df4e5c6e2
--- /dev/null
+++ b/hr_employee_firstname/tests/__init__.py
@@ -0,0 +1 @@
+from . import test_hr_employee_firstname
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
new file mode 100644
index 00000000000..e87e3278c53
--- /dev/null
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -0,0 +1,78 @@
+# -*- coding:utf-8 -*-
+##############################################################################
+#
+# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
+#
+# 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 openerp.tests.common import TransactionCase
+
+
+class TestEmployeeFirstname(TransactionCase):
+ def setUp(self):
+ super(TestEmployeeFirstname, self).setUp()
+ self.employee_model = self.env['hr.employee']
+
+ # Create 3 employees to concatenate the firstname and lastname
+ # in name_related
+ self.employee1_id = self.employee_model.create(
+ {'firstname': 'Jan', 'lastname': 'Van Eyck'})
+ self.employee2_id = self.employee_model.create(
+ {'firstname': 'Jean-Pierre', 'lastname': 'Carnaud'})
+ self.employee3_id = self.employee_model.create(
+ {'firstname': 'Famke', 'lastname': 'Jenssens'})
+
+ # Create 3 employees for split the name_related to
+ # firstname and lastname
+ self.employee10_id = self.employee_model.create(
+ {'name': ' Jan Van Eyck', 'firstname': ' ', 'lastname': ' '})
+ self.employee20_id = self.employee_model.create(
+ {'name': 'Jean-Pierre Carnaud', 'firstname': ' ', 'lastname': ' '})
+ self.employee30_id = self.employee_model.create(
+ {'name': 'FamkeJenssens', 'firstname': ' ', 'lastname': ' '})
+
+ def test_get_name(self):
+ """
+ Validate the _get_name method is concatenating
+ the firstname and lastname
+ """
+ # Check for employee1
+ self.assertTrue(self.employee1_id.name_related == 'Jan Van Eyck')
+
+ # Check for employee2
+ self.assertTrue(self.employee2_id.name_related == 'Jean-Pierre '
+ 'Carnaud')
+
+ # Check for employee3
+ self.assertTrue(self.employee3_id.name_related == 'Famke Jenssens')
+
+ def test_auto_init_name(self):
+ """
+ Validate the _auto_init if the name related is split
+ in firstname and lastname
+ """
+ # Check for employee10
+ self.assertTrue(self.employee10_id.firstname == "Jan")
+ self.assertTrue(self.employee10_id.lastname == 'Van Eyck')
+
+ # Check for employee20
+ self.assertTrue(self.employee20_id.firstname == 'Jean-Pierre')
+ self.assertTrue(self.employee20_id.lastname == 'Carnaud')
+
+ # Check for employee30
+ self.assertTrue(self.employee30_id.firstname == 'FamkeJenssens')
+ self.assertTrue(self.employee30_id.lastname == ' ')
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
new file mode 100644
index 00000000000..105296c6c70
--- /dev/null
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+ hr.employee
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 4e55fbd736bd516418c1466d00ece5d917488d24 Mon Sep 17 00:00:00 2001
From: dufresnedavid
Date: Sun, 3 May 2015 07:31:49 -0400
Subject: [PATCH 02/42] Remove field name related, change init script, add
unittests
---
hr_employee_firstname/README.rst | 5 +-
hr_employee_firstname/models/__init__.py | 2 +-
hr_employee_firstname/models/hr.py | 78 ----------------
hr_employee_firstname/models/hr_employee.py | 89 +++++++++++++++++++
.../tests/test_hr_employee_firstname.py | 61 ++++++++++---
5 files changed, 140 insertions(+), 95 deletions(-)
delete mode 100644 hr_employee_firstname/models/hr.py
create mode 100644 hr_employee_firstname/models/hr_employee.py
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index ba584a39c40..7ccfc5ab980 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -30,9 +30,10 @@ Credits
Contributors
------------
-* El Hadji Dem (elhadji.dem@savoirfairelinux.com)
-* Sandy Carter (sandy.carter@savoirfairelinux.com)
+* El Hadji Dem
+* Sandy Carter
* Fekete Mihai
+* David Dufresne
Maintainer
----------
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index a5f6a47b477..47d73b16366 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -20,4 +20,4 @@
#
##############################################################################
-from . import hr
+from . import hr_employee
diff --git a/hr_employee_firstname/models/hr.py b/hr_employee_firstname/models/hr.py
deleted file mode 100644
index 67458d6434f..00000000000
--- a/hr_employee_firstname/models/hr.py
+++ /dev/null
@@ -1,78 +0,0 @@
-# -*- encoding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# This module copyright (C) 2010 - 2014 Savoir-faire Linux
-# ().
-#
-# 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 openerp import models, fields, api
-
-
-class hr_employee(models.Model):
- _inherit = 'hr.employee'
-
- @api.cr_context
- def _auto_init(self, cr, context=None):
- res = super(hr_employee, self)._auto_init(cr, context=context)
- cr.execute("""
-UPDATE hr_employee
-SET firstname = COALESCE(LEFT(trim(name_related),
- COALESCE(POSITION(' ' IN trim(name_related))-1,
- CHAR_LENGTH(trim(name_related)))),
- ' '),
- lastname = COALESCE(RIGHT(trim(name_related),
- CHAR_LENGTH(trim(name_related))-
- POSITION(' ' IN trim(name_related))),
- ' ')
-WHERE name_related IS NOT NULL OR name_related != ' ' AND
- (firstname IS NULL OR firstname = ' ') AND
- (lastname IS NULL or lastname = ' ')""")
- return res
-
- @api.one
- @api.onchange('firstname', 'lastname')
- def get_name(self):
- if self.firstname and self.lastname:
- self.name_related = self.firstname + ' ' + self.lastname
-
- @api.one
- @api.depends('firstname', 'lastname')
- def _get_name(self):
- if self.firstname and self.lastname:
- self.name_related = self.firstname + ' ' + self.lastname
-
- firstname = fields.Char("Firstname", required=True)
- lastname = fields.Char("Lastname", required=True)
- name_related = fields.Char(string="Name", readonly=True,
- compute="_get_name",
- store=True)
-
- @api.model
- def create(self, vals):
- if vals.get('firstname', ' ') != ' ' and vals.get('lastname',
- ' ') != ' ':
- vals['name'] = vals['firstname'] + ' ' + vals['lastname']
- if vals['name'] and vals.get('firstname', ' ') and vals.get('lastname',
- ' '):
- if len(vals['name'].strip().split(' ', 1)) > 1:
- vals['firstname'] = vals['name'].strip().split(' ', 1)[0]
- vals['lastname'] = vals['name'].strip().split(' ', 1)[1]
- else:
- vals['firstname'] = vals['name']
- vals['lastname'] = ' '
- return super(hr_employee, self).create(vals)
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
new file mode 100644
index 00000000000..e527c1562e9
--- /dev/null
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -0,0 +1,89 @@
+# -*- encoding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# This module copyright (C) 2010 - 2014 Savoir-faire Linux
+# ().
+#
+# 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 openerp import models, fields, api, SUPERUSER_ID
+
+
+class HrEmployee(models.Model):
+ _inherit = 'hr.employee'
+
+ def split_name(self, name):
+ new_name = [w for w in name.split(' ') if w]
+ firstname = new_name[0]
+ lastname = ' '.join(new_name[1:]) or ' '
+ return firstname, lastname
+
+ @api.cr_context
+ def _auto_init(self, cr, context=None):
+ super(HrEmployee, self)._auto_init(cr, context=context)
+ self._update_employee_names(cr, SUPERUSER_ID, context=context)
+
+ @api.model
+ def _update_employee_names(self):
+ employees = self.search([
+ ('firstname', '=', ' '), ('lastname', '=', ' ')])
+
+ for ee in employees:
+ firstname, lastname = self.split_name(ee.name)
+ ee.write({
+ 'firstname': firstname,
+ 'lastname': lastname,
+ })
+
+ @api.one
+ @api.onchange('firstname', 'lastname')
+ def get_name(self):
+ if self.firstname and self.lastname:
+ self.name = ' '.join([self.firstname, self.lastname])
+
+ def _firstname_default(self):
+ return ' ' if self.env.context.get('module') else False
+
+ firstname = fields.Char(
+ "Firstname", required=True, default=_firstname_default)
+ lastname = fields.Char(
+ "Lastname", required=True, default=_firstname_default)
+
+ @api.model
+ def create(self, vals):
+ if vals.get('firstname') and vals.get('lastname'):
+ vals['name'] = ' '.join([vals['firstname'], vals['lastname']])
+
+ elif vals.get('name'):
+ vals['firstname'], vals['lastname'] = self.split_name(vals['name'])
+
+ return super(HrEmployee, self).create(vals)
+
+ @api.multi
+ def write(self, vals):
+ if vals.get('firstname') or vals.get('lastname'):
+ self.ensure_one()
+
+ vals['name'] = ' '.join([
+ vals.get('firstname') or self.firstname or ' ',
+ vals.get('lastname') or self.lastname or ' ',
+ ])
+
+ elif vals.get('name'):
+ vals['firstname'], vals['lastname'] = self.split_name(vals['name'])
+
+ return super(HrEmployee, self).write(vals)
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index e87e3278c53..e4334744fcf 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -39,11 +39,11 @@ def setUp(self):
# Create 3 employees for split the name_related to
# firstname and lastname
self.employee10_id = self.employee_model.create(
- {'name': ' Jan Van Eyck', 'firstname': ' ', 'lastname': ' '})
+ {'name': ' Jan Van Eyck'})
self.employee20_id = self.employee_model.create(
- {'name': 'Jean-Pierre Carnaud', 'firstname': ' ', 'lastname': ' '})
+ {'name': 'Jean-Pierre Carnaud'})
self.employee30_id = self.employee_model.create(
- {'name': 'FamkeJenssens', 'firstname': ' ', 'lastname': ' '})
+ {'name': 'FamkeJenssens'})
def test_get_name(self):
"""
@@ -51,28 +51,61 @@ def test_get_name(self):
the firstname and lastname
"""
# Check for employee1
- self.assertTrue(self.employee1_id.name_related == 'Jan Van Eyck')
+ self.assertEqual(self.employee1_id.name, 'Jan Van Eyck')
# Check for employee2
- self.assertTrue(self.employee2_id.name_related == 'Jean-Pierre '
- 'Carnaud')
+ self.assertEqual(self.employee2_id.name, 'Jean-Pierre Carnaud')
# Check for employee3
- self.assertTrue(self.employee3_id.name_related == 'Famke Jenssens')
+ self.assertEqual(self.employee3_id.name, 'Famke Jenssens')
def test_auto_init_name(self):
"""
- Validate the _auto_init if the name related is split
+ Validate the create method if the name is split
in firstname and lastname
"""
# Check for employee10
- self.assertTrue(self.employee10_id.firstname == "Jan")
- self.assertTrue(self.employee10_id.lastname == 'Van Eyck')
+ self.assertEqual(self.employee10_id.firstname, "Jan")
+ self.assertEqual(self.employee10_id.lastname, 'Van Eyck')
# Check for employee20
- self.assertTrue(self.employee20_id.firstname == 'Jean-Pierre')
- self.assertTrue(self.employee20_id.lastname == 'Carnaud')
+ self.assertEqual(self.employee20_id.firstname, 'Jean-Pierre')
+ self.assertEqual(self.employee20_id.lastname, 'Carnaud')
# Check for employee30
- self.assertTrue(self.employee30_id.firstname == 'FamkeJenssens')
- self.assertTrue(self.employee30_id.lastname == ' ')
+ self.assertEqual(self.employee30_id.firstname, 'FamkeJenssens')
+ self.assertEqual(self.employee30_id.lastname, ' ')
+
+ def test_change_name(self):
+ self.employee1_id.write({'name': 'Jean-Pierre Carnaud Eyck'})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud Eyck')
+
+ def test_change_name_with_space(self):
+ self.employee1_id.write({'name': ' Jean-Pierre Carnaud Eyck'})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud Eyck')
+
+ def test_change_firstname(self):
+ self.employee1_id.write({'firstname': 'Jean-Pierre'})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.name, 'Jean-Pierre Van Eyck')
+
+ def test_change_lastname(self):
+ self.employee1_id.write({'lastname': 'Carnaud'})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.name, 'Jan Carnaud')
+
+ def test_change_firstname_and_lastname(self):
+ self.employee1_id.write({
+ 'firstname': 'Jean-Pierre',
+ 'lastname': 'Carnaud'})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.name, 'Jean-Pierre Carnaud')
From 5646b75c067e5e58bdc8a4d73f7804e638305133 Mon Sep 17 00:00:00 2001
From: "Adrien Peiffer (ACSONE)"
Date: Thu, 13 Aug 2015 13:34:34 +0200
Subject: [PATCH 03/42] [FIX+IMP] hr_employee_firstname: Several things:
* remove ensure one
* Add decorator
* Update name on write and update related partner firstname lastname
* Modify README file
* Change version format
* Consistency with partner_firstname module
* Check if the partner isn't already in the list
* Remove check on partner_firstname installation
---
hr_employee_firstname/README.rst | 9 ++++
hr_employee_firstname/__openerp__.py | 3 +-
hr_employee_firstname/i18n/en.po | 33 ++++++++++++
hr_employee_firstname/i18n/es.po | 33 ++++++++++++
hr_employee_firstname/i18n/sl.po | 34 ++++++++++++
hr_employee_firstname/models/hr_employee.py | 52 +++++++++++--------
.../tests/test_hr_employee_firstname.py | 34 ++++++------
hr_employee_firstname/views/hr_view.xml | 8 +--
8 files changed, 163 insertions(+), 43 deletions(-)
create mode 100644 hr_employee_firstname/i18n/en.po
create mode 100644 hr_employee_firstname/i18n/es.po
create mode 100644 hr_employee_firstname/i18n/sl.po
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index 7ccfc5ab980..c0ff8a600cd 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -24,6 +24,14 @@ Usage
On the employee form view you will have 2 separate fields, one for Firstname,
second for Lastname, both required.
+Bug Tracker
+===========
+
+Bugs are tracked on `GitHub Issues `_.
+In case of trouble, please check there if your issue has already been reported.
+If you spotted it first, help us smashing it by providing a detailed and welcomed feedback
+`here `_.
+
Credits
=======
@@ -34,6 +42,7 @@ Contributors
* Sandy Carter
* Fekete Mihai
* David Dufresne
+* Adrien Peiffer (ACSONE)
Maintainer
----------
diff --git a/hr_employee_firstname/__openerp__.py b/hr_employee_firstname/__openerp__.py
index 09c011bd8a2..4209d6dfe12 100644
--- a/hr_employee_firstname/__openerp__.py
+++ b/hr_employee_firstname/__openerp__.py
@@ -22,7 +22,7 @@
{
'name': 'HR Employee First Name, Last Name',
- 'version': '0.1',
+ 'version': '8.0.0.0.1',
'author': "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Odoo Community Association (OCA)",
@@ -33,6 +33,7 @@
'summary': 'Adds First Name to Employee',
'depends': [
'hr',
+ 'partner_firstname',
],
'data': [
'views/hr_view.xml',
diff --git a/hr_employee_firstname/i18n/en.po b/hr_employee_firstname/i18n/en.po
new file mode 100644
index 00000000000..e049538b44d
--- /dev/null
+++ b/hr_employee_firstname/i18n/en.po
@@ -0,0 +1,33 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: hr (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-08-18 13:10+0000\n"
+"PO-Revision-Date: 2015-08-13 14:31+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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Employee"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Firstname"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Lastname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
new file mode 100644
index 00000000000..ba248107472
--- /dev/null
+++ b/hr_employee_firstname/i18n/es.po
@@ -0,0 +1,33 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+msgid ""
+msgstr ""
+"Project-Id-Version: hr (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-08-18 13:10+0000\n"
+"PO-Revision-Date: 2015-08-13 14:31+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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Empleado"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
new file mode 100644
index 00000000000..122a067c389
--- /dev/null
+++ b/hr_employee_firstname/i18n/sl.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# Matjaž Mozetič , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: hr (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-08-18 13:10+0000\n"
+"PO-Revision-Date: 2015-08-16 11:40+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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Kader"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Ime"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Priimek"
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index e527c1562e9..40fd70e9c93 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -26,11 +26,10 @@
class HrEmployee(models.Model):
_inherit = 'hr.employee'
+ @api.model
def split_name(self, name):
- new_name = [w for w in name.split(' ') if w]
- firstname = new_name[0]
- lastname = ' '.join(new_name[1:]) or ' '
- return firstname, lastname
+ clean_name = u" ".join(name.split(None)) if name else name
+ return self.env['res.partner']._get_inverse_name(clean_name)
@api.cr_context
def _auto_init(self, cr, context=None):
@@ -43,47 +42,58 @@ def _update_employee_names(self):
('firstname', '=', ' '), ('lastname', '=', ' ')])
for ee in employees:
- firstname, lastname = self.split_name(ee.name)
+ lastname, firstname = self.split_name(ee.name)
ee.write({
'firstname': firstname,
'lastname': lastname,
})
+ @api.model
+ def _update_partner_firstname(self, employee):
+ partners = employee.mapped('user_id.partner_id')
+ for partner in employee.mapped('address_home_id'):
+ if partner not in partners:
+ partners += partner
+ partners.write({'firstname': employee.firstname,
+ 'lastname': employee.lastname})
+
+ @api.model
+ def _get_name(self, lastname, firstname):
+ return self.env['res.partner']._get_computed_name(lastname, firstname)
+
@api.one
@api.onchange('firstname', 'lastname')
def get_name(self):
if self.firstname and self.lastname:
- self.name = ' '.join([self.firstname, self.lastname])
+ self.name = self._get_name(self.lastname, self.firstname)
def _firstname_default(self):
return ' ' if self.env.context.get('module') else False
firstname = fields.Char(
- "Firstname", required=True, default=_firstname_default)
+ "Firstname", default=_firstname_default)
lastname = fields.Char(
"Lastname", required=True, default=_firstname_default)
@api.model
def create(self, vals):
if vals.get('firstname') and vals.get('lastname'):
- vals['name'] = ' '.join([vals['firstname'], vals['lastname']])
+ vals['name'] = self._get_name(vals['lastname'], vals['firstname'])
elif vals.get('name'):
- vals['firstname'], vals['lastname'] = self.split_name(vals['name'])
-
- return super(HrEmployee, self).create(vals)
+ vals['lastname'], vals['firstname'] = self.split_name(vals['name'])
+ res = super(HrEmployee, self).create(vals)
+ self._update_partner_firstname(res)
+ return res
@api.multi
def write(self, vals):
if vals.get('firstname') or vals.get('lastname'):
- self.ensure_one()
-
- vals['name'] = ' '.join([
- vals.get('firstname') or self.firstname or ' ',
- vals.get('lastname') or self.lastname or ' ',
- ])
-
+ lastname = vals.get('lastname') or self.lastname or ' '
+ firstname = vals.get('firstname') or self.firstname or ' '
+ vals['name'] = self._get_name(lastname, firstname)
elif vals.get('name'):
- vals['firstname'], vals['lastname'] = self.split_name(vals['name'])
-
- return super(HrEmployee, self).write(vals)
+ vals['lastname'], vals['firstname'] = self.split_name(vals['name'])
+ res = super(HrEmployee, self).write(vals)
+ self._update_partner_firstname(self)
+ return res
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index e4334744fcf..0ce4a7f8bdf 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -30,7 +30,7 @@ def setUp(self):
# Create 3 employees to concatenate the firstname and lastname
# in name_related
self.employee1_id = self.employee_model.create(
- {'firstname': 'Jan', 'lastname': 'Van Eyck'})
+ {'firstname': 'Jan', 'lastname': 'Van-Eyck'})
self.employee2_id = self.employee_model.create(
{'firstname': 'Jean-Pierre', 'lastname': 'Carnaud'})
self.employee3_id = self.employee_model.create(
@@ -39,11 +39,11 @@ def setUp(self):
# Create 3 employees for split the name_related to
# firstname and lastname
self.employee10_id = self.employee_model.create(
- {'name': ' Jan Van Eyck'})
+ {'name': ' Van-Eyck Jan'})
self.employee20_id = self.employee_model.create(
- {'name': 'Jean-Pierre Carnaud'})
+ {'name': 'Carnaud Jean-Pierre'})
self.employee30_id = self.employee_model.create(
- {'name': 'FamkeJenssens'})
+ {'name': 'JenssensFamke'})
def test_get_name(self):
"""
@@ -51,13 +51,13 @@ def test_get_name(self):
the firstname and lastname
"""
# Check for employee1
- self.assertEqual(self.employee1_id.name, 'Jan Van Eyck')
+ self.assertEqual(self.employee1_id.name, 'Van-Eyck Jan')
# Check for employee2
- self.assertEqual(self.employee2_id.name, 'Jean-Pierre Carnaud')
+ self.assertEqual(self.employee2_id.name, 'Carnaud Jean-Pierre')
# Check for employee3
- self.assertEqual(self.employee3_id.name, 'Famke Jenssens')
+ self.assertEqual(self.employee3_id.name, 'Jenssens Famke')
def test_auto_init_name(self):
"""
@@ -66,41 +66,41 @@ def test_auto_init_name(self):
"""
# Check for employee10
self.assertEqual(self.employee10_id.firstname, "Jan")
- self.assertEqual(self.employee10_id.lastname, 'Van Eyck')
+ self.assertEqual(self.employee10_id.lastname, 'Van-Eyck')
# Check for employee20
self.assertEqual(self.employee20_id.firstname, 'Jean-Pierre')
self.assertEqual(self.employee20_id.lastname, 'Carnaud')
# Check for employee30
- self.assertEqual(self.employee30_id.firstname, 'FamkeJenssens')
- self.assertEqual(self.employee30_id.lastname, ' ')
+ self.assertEqual(self.employee30_id.firstname, False)
+ self.assertEqual(self.employee30_id.lastname, 'JenssensFamke')
def test_change_name(self):
- self.employee1_id.write({'name': 'Jean-Pierre Carnaud Eyck'})
+ self.employee1_id.write({'name': 'Carnaud-Eyck Jean-Pierre'})
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud Eyck')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
def test_change_name_with_space(self):
- self.employee1_id.write({'name': ' Jean-Pierre Carnaud Eyck'})
+ self.employee1_id.write({'name': ' Carnaud-Eyck Jean-Pierre'})
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud Eyck')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
def test_change_firstname(self):
self.employee1_id.write({'firstname': 'Jean-Pierre'})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jean-Pierre Van Eyck')
+ self.assertEqual(self.employee1_id.name, 'Van-Eyck Jean-Pierre')
def test_change_lastname(self):
self.employee1_id.write({'lastname': 'Carnaud'})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jan Carnaud')
+ self.assertEqual(self.employee1_id.name, 'Carnaud Jan')
def test_change_firstname_and_lastname(self):
self.employee1_id.write({
@@ -108,4 +108,4 @@ def test_change_firstname_and_lastname(self):
'lastname': 'Carnaud'})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jean-Pierre Carnaud')
+ self.assertEqual(self.employee1_id.name, 'Carnaud Jean-Pierre')
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 105296c6c70..16aa496fb0a 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -7,17 +7,17 @@
-
+
-
+
-
+
-
+
From a3421ed92931000e4be5ceedd614acd229ad1fda Mon Sep 17 00:00:00 2001
From: "Adrien Peiffer (ACSONE)"
Date: Fri, 4 Sep 2015 12:32:21 +0200
Subject: [PATCH 04/42] [IMP][hr_employee_firstname] Avoid to update partners
without reason
---
hr_employee_firstname/i18n/nl_NL.po | 34 +++++++++++++++++++++
hr_employee_firstname/models/hr_employee.py | 6 +++-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 hr_employee_firstname/i18n/nl_NL.po
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
new file mode 100644
index 00000000000..eb09d04a5f4
--- /dev/null
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# lfreeke , 2015
+msgid ""
+msgstr ""
+"Project-Id-Version: hr (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2015-10-03 22:37+0000\n"
+"PO-Revision-Date: 2015-09-28 20:59+0000\n"
+"Last-Translator: lfreeke \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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Werknemer"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Voornaam"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Achternaam"
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 40fd70e9c93..b345b22bb06 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -22,6 +22,9 @@
from openerp import models, fields, api, SUPERUSER_ID
+UPDATE_PARTNER_FIELDS = set(['firstname', 'lastname', 'user_id',
+ 'address_home_id'])
+
class HrEmployee(models.Model):
_inherit = 'hr.employee'
@@ -95,5 +98,6 @@ def write(self, vals):
elif vals.get('name'):
vals['lastname'], vals['firstname'] = self.split_name(vals['name'])
res = super(HrEmployee, self).write(vals)
- self._update_partner_firstname(self)
+ if set(vals).intersection(UPDATE_PARTNER_FIELDS):
+ self._update_partner_firstname(self)
return res
From bd7fbc1f4eb57fd9638977cd385781a6be0553e3 Mon Sep 17 00:00:00 2001
From: Fekete Mihai
Date: Mon, 9 Nov 2015 21:21:48 -0800
Subject: [PATCH 05/42] [FIX] Update tests in hr_employee_firstname - failing
travis
---
hr_employee_firstname/__init__.py | 2 +-
hr_employee_firstname/__openerp__.py | 4 +--
hr_employee_firstname/i18n/ar.po | 33 ++++++++++++++++++
hr_employee_firstname/i18n/es.po | 11 +++---
hr_employee_firstname/i18n/fi.po | 33 ++++++++++++++++++
hr_employee_firstname/i18n/it.po | 34 +++++++++++++++++++
hr_employee_firstname/i18n/pt_BR.po | 34 +++++++++++++++++++
hr_employee_firstname/models/__init__.py | 2 +-
hr_employee_firstname/models/hr_employee.py | 8 +++--
.../tests/test_hr_employee_firstname.py | 4 +--
10 files changed, 151 insertions(+), 14 deletions(-)
create mode 100644 hr_employee_firstname/i18n/ar.po
create mode 100644 hr_employee_firstname/i18n/fi.po
create mode 100644 hr_employee_firstname/i18n/it.po
create mode 100644 hr_employee_firstname/i18n/pt_BR.po
diff --git a/hr_employee_firstname/__init__.py b/hr_employee_firstname/__init__.py
index 8a84e445229..ba5b716b3e7 100644
--- a/hr_employee_firstname/__init__.py
+++ b/hr_employee_firstname/__init__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
diff --git a/hr_employee_firstname/__openerp__.py b/hr_employee_firstname/__openerp__.py
index 4209d6dfe12..1718b30e5f3 100644
--- a/hr_employee_firstname/__openerp__.py
+++ b/hr_employee_firstname/__openerp__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@@ -22,7 +22,7 @@
{
'name': 'HR Employee First Name, Last Name',
- 'version': '8.0.0.0.1',
+ 'version': '8.0.0.0.2',
'author': "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Odoo Community Association (OCA)",
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
new file mode 100644
index 00000000000..efcd94b3a3b
--- /dev/null
+++ b/hr_employee_firstname/i18n/ar.po
@@ -0,0 +1,33 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# 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-08-13 14:31+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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "الموظف"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index ba248107472..01f88593516 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -3,13 +3,14 @@
# * hr_employee_firstname
#
# Translators:
+# Antonio Trueba, 2016
msgid ""
msgstr ""
"Project-Id-Version: hr (8.0)\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-18 13:10+0000\n"
-"PO-Revision-Date: 2015-08-13 14:31+0000\n"
-"Last-Translator: <>\n"
+"POT-Creation-Date: 2015-11-30 05:19+0000\n"
+"PO-Revision-Date: 2016-02-05 12:48+0000\n"
+"Last-Translator: Antonio Trueba\n"
"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -25,9 +26,9 @@ msgstr "Empleado"
#. module: hr_employee_firstname
#: field:hr.employee,firstname:0
msgid "Firstname"
-msgstr ""
+msgstr "Nombre propio"
#. module: hr_employee_firstname
#: field:hr.employee,lastname:0
msgid "Lastname"
-msgstr ""
+msgstr "Apellidos"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
new file mode 100644
index 00000000000..770ccba57b3
--- /dev/null
+++ b/hr_employee_firstname/i18n/fi.po
@@ -0,0 +1,33 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# 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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Työntekijä"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
new file mode 100644
index 00000000000..a24c509f82b
--- /dev/null
+++ b/hr_employee_firstname/i18n/it.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# Paolo Valier, 2016
+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: 2016-03-19 10:38+0000\n"
+"Last-Translator: Paolo Valier\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_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Dipendente"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Nome"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Cognome"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
new file mode 100644
index 00000000000..5c433097e41
--- /dev/null
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# danimaribeiro , 2016
+msgid ""
+msgstr ""
+"Project-Id-Version: hr (8.0)\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2016-03-11 01:48+0000\n"
+"PO-Revision-Date: 2016-03-08 03:18+0000\n"
+"Last-Translator: danimaribeiro \n"
+"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: pt_BR\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Empregado"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,firstname:0
+msgid "Firstname"
+msgstr "Primeiro nome"
+
+#. module: hr_employee_firstname
+#: field:hr.employee,lastname:0
+msgid "Lastname"
+msgstr "Último nome"
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index 47d73b16366..c48e9660be4 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index b345b22bb06..cbb5b5f22c9 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -1,4 +1,4 @@
-# -*- encoding: utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
@@ -84,7 +84,8 @@ def create(self, vals):
vals['name'] = self._get_name(vals['lastname'], vals['firstname'])
elif vals.get('name'):
- vals['lastname'], vals['firstname'] = self.split_name(vals['name'])
+ vals['lastname'] = self.split_name(vals['name'])['lastname']
+ vals['firstname'] = self.split_name(vals['name'])['firstname']
res = super(HrEmployee, self).create(vals)
self._update_partner_firstname(res)
return res
@@ -96,7 +97,8 @@ def write(self, vals):
firstname = vals.get('firstname') or self.firstname or ' '
vals['name'] = self._get_name(lastname, firstname)
elif vals.get('name'):
- vals['lastname'], vals['firstname'] = self.split_name(vals['name'])
+ vals['lastname'] = self.split_name(vals['name'])['lastname']
+ vals['firstname'] = self.split_name(vals['name'])['firstname']
res = super(HrEmployee, self).write(vals)
if set(vals).intersection(UPDATE_PARTNER_FIELDS):
self._update_partner_firstname(self)
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 0ce4a7f8bdf..dfbd92edd47 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -1,4 +1,4 @@
-# -*- coding:utf-8 -*-
+# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
@@ -65,7 +65,7 @@ def test_auto_init_name(self):
in firstname and lastname
"""
# Check for employee10
- self.assertEqual(self.employee10_id.firstname, "Jan")
+ self.assertEqual(self.employee10_id.firstname, 'Jan')
self.assertEqual(self.employee10_id.lastname, 'Van-Eyck')
# Check for employee20
From f83df0d07bcdbaef3172fed36ac7c7b9dbcb28b1 Mon Sep 17 00:00:00 2001
From: Fekete Mihai
Date: Wed, 11 May 2016 09:46:59 +0300
Subject: [PATCH 06/42] [REF] hr_employee_firstname: Split names at module
install to get the value not the key of dict (#215)
* Update split names at module install to get the value not the key of the dict.
* Add test for checking right values in firstname, lastname after install
---
hr_employee_firstname/models/hr_employee.py | 6 +++---
.../tests/test_hr_employee_firstname.py | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index cbb5b5f22c9..e7022e28c29 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -45,10 +45,10 @@ def _update_employee_names(self):
('firstname', '=', ' '), ('lastname', '=', ' ')])
for ee in employees:
- lastname, firstname = self.split_name(ee.name)
+ split_name = self.split_name(ee.name)
ee.write({
- 'firstname': firstname,
- 'lastname': lastname,
+ 'firstname': split_name['firstname'],
+ 'lastname': split_name['lastname'],
})
@api.model
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index dfbd92edd47..fb49f104200 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -19,6 +19,7 @@
#
##############################################################################
+import openerp.tests
from openerp.tests.common import TransactionCase
@@ -109,3 +110,11 @@ def test_change_firstname_and_lastname(self):
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.name, 'Carnaud Jean-Pierre')
+
+ @openerp.tests.common.at_install(False)
+ @openerp.tests.common.post_install(True)
+ def test_update_name_post_install(self):
+ self.empl_demo = self.env.ref('hr.employee_fp')
+
+ self.assertEqual(self.empl_demo.firstname, 'Parker')
+ self.assertEqual(self.empl_demo.lastname, 'Pieter')
From b2e60ec48d96f290befd97bf5637df05823ea8d7 Mon Sep 17 00:00:00 2001
From: Antonio Esposito
Date: Tue, 24 Jan 2017 14:27:03 +0100
Subject: [PATCH 07/42] [MIG] hr_employee_firstname: Migrated to 10.0 (#276)
---
hr_employee_firstname/README.rst | 12 ++---
hr_employee_firstname/__init__.py | 23 ++--------
hr_employee_firstname/__manifest__.py | 27 ++++++++++++
hr_employee_firstname/__openerp__.py | 44 -------------------
hr_employee_firstname/i18n/ar.po | 20 +++++----
hr_employee_firstname/i18n/de.po | 24 +++++-----
hr_employee_firstname/i18n/es.po | 16 +++----
hr_employee_firstname/i18n/fi.po | 2 +-
hr_employee_firstname/i18n/fr.po | 24 +++++-----
hr_employee_firstname/i18n/hr.po | 34 ++++++++++++++
hr_employee_firstname/i18n/hr_HR.po | 34 ++++++++++++++
.../i18n/hr_employee_firstname.pot | 32 --------------
hr_employee_firstname/i18n/it.po | 16 +++----
hr_employee_firstname/i18n/nl_NL.po | 16 +++----
hr_employee_firstname/i18n/pt_BR.po | 16 +++----
hr_employee_firstname/i18n/ro.po | 24 +++++-----
hr_employee_firstname/i18n/sl.po | 16 +++----
hr_employee_firstname/init_hook.py | 11 +++++
hr_employee_firstname/models/__init__.py | 22 +---------
hr_employee_firstname/models/hr_employee.py | 40 ++++-------------
hr_employee_firstname/tests/__init__.py | 3 ++
.../tests/test_hr_employee_firstname.py | 44 ++++++++-----------
hr_employee_firstname/views/hr_view.xml | 35 ++++++++-------
23 files changed, 258 insertions(+), 277 deletions(-)
create mode 100644 hr_employee_firstname/__manifest__.py
delete mode 100644 hr_employee_firstname/__openerp__.py
create mode 100644 hr_employee_firstname/i18n/hr.po
create mode 100644 hr_employee_firstname/i18n/hr_HR.po
delete mode 100644 hr_employee_firstname/i18n/hr_employee_firstname.pot
create mode 100644 hr_employee_firstname/init_hook.py
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index c0ff8a600cd..d5631065f61 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -1,5 +1,6 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :alt: License: AGPL-3
+ :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
+ :alt: License: AGPL-3
HR Employee First Name, Last Name
=================================
@@ -12,7 +13,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 10.0 of the repository https://github.com/OCA/hr
* add the path to this repository in your configuration (addons-path)
* update the module list
* search for "HR Employee First Name, Last Name" in your addons
@@ -43,13 +44,14 @@ Contributors
* Fekete Mihai
* David Dufresne
* Adrien Peiffer (ACSONE)
+* Antonio Esposito (ONESTEIN BV)
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.
@@ -57,4 +59,4 @@ 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_firstname/__init__.py b/hr_employee_firstname/__init__.py
index ba5b716b3e7..98c5a36df58 100644
--- a/hr_employee_firstname/__init__.py
+++ b/hr_employee_firstname/__init__.py
@@ -1,23 +1,6 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# This module copyright (C) 2010 - 2014 Savoir-faire Linux
-# ().
-#
-# 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) 2010 - 2014 Savoir-faire Linux ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
+from .init_hook import post_init_hook
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
new file mode 100644
index 00000000000..8b38269757c
--- /dev/null
+++ b/hr_employee_firstname/__manifest__.py
@@ -0,0 +1,27 @@
+# -*- coding: utf-8 -*-
+# © 2010 - 2014 Savoir-faire Linux ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+{
+ 'name': 'HR Employee First Name, Last Name',
+ 'version': '10.0.1.0.0',
+ 'author': "Savoir-faire Linux, "
+ "Fekete Mihai (Forest and Biomass Services Romania), "
+ "Odoo Community Association (OCA)",
+ 'maintainer': 'Savoir-faire Linux',
+ 'website': 'http://www.savoirfairelinux.com',
+ 'license': 'AGPL-3',
+ 'category': 'Human Resources',
+ 'summary': 'Adds First Name to Employee',
+ 'depends': [
+ 'hr',
+ 'partner_firstname',
+ ],
+ 'data': [
+ 'views/hr_view.xml',
+ ],
+ "post_init_hook": "post_init_hook",
+ 'demo': [],
+ 'test': [],
+ 'installable': True,
+}
diff --git a/hr_employee_firstname/__openerp__.py b/hr_employee_firstname/__openerp__.py
deleted file mode 100644
index 1718b30e5f3..00000000000
--- a/hr_employee_firstname/__openerp__.py
+++ /dev/null
@@ -1,44 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# This module copyright (C) 2010 - 2014 Savoir-faire Linux
-# ().
-#
-# 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': 'HR Employee First Name, Last Name',
- 'version': '8.0.0.0.2',
- 'author': "Savoir-faire Linux, "
- "Fekete Mihai (Forest and Biomass Services Romania), "
- "Odoo Community Association (OCA)",
- 'maintainer': 'Savoir-faire Linux',
- 'website': 'http://www.savoirfairelinux.com',
- 'license': 'AGPL-3',
- 'category': 'Human Resources',
- 'summary': 'Adds First Name to Employee',
- 'depends': [
- 'hr',
- 'partner_firstname',
- ],
- 'data': [
- 'views/hr_view.xml',
- ],
- 'demo': [],
- 'test': [],
- 'installable': True,
-}
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index efcd94b3a3b..259742eeefe 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -3,14 +3,16 @@
# * hr_employee_firstname
#
# Translators:
+# OCA Transbot , 2017
+# 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-08-13 14:31+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"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -23,11 +25,11 @@ msgid "Employee"
msgstr "الموظف"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
-msgstr ""
+msgstr "الإسم الأول"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
-msgstr ""
+msgstr "إسم العائلة"
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 1f03c294dee..2ab540f3a86 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -1,19 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * hr_employee_firstname
-#
+# * hr_employee_firstname
+#
+# Translators:
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-24 10:20+0000\n"
-"PO-Revision-Date: 2015-04-24 10:20+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
+"Language: de\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -21,12 +24,11 @@ msgid "Employee"
msgstr "Angestellter"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Vorname"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Nachname"
-
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 01f88593516..a20884c0e40 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -3,15 +3,15 @@
# * hr_employee_firstname
#
# Translators:
-# Antonio Trueba, 2016
+# 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-11-30 05:19+0000\n"
-"PO-Revision-Date: 2016-02-05 12:48+0000\n"
-"Last-Translator: Antonio Trueba\n"
-"Language-Team: Spanish (http://www.transifex.com/oca/OCA-hr-8-0/language/es/)\n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -24,11 +24,11 @@ msgid "Employee"
msgstr "Empleado"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Nombre propio"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Apellidos"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index 770ccba57b3..3e6a6e6bcd6 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -5,7 +5,7 @@
# Translators:
msgid ""
msgstr ""
-"Project-Id-Version: hr (8.0)\n"
+"Project-Id-Version: hr (10.0)\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-04-14 04:15+0000\n"
"PO-Revision-Date: 2016-04-04 11:07+0000\n"
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index 36d16120c3d..d6c0216d8d4 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -1,19 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * hr_employee_firstname
-#
+# * hr_employee_firstname
+#
+# Translators:
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-24 10:20+0000\n"
-"PO-Revision-Date: 2015-04-24 10:20+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
+"Language: fr\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -21,12 +24,11 @@ msgid "Employee"
msgstr "Employé"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Prénom"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Nom"
-
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
new file mode 100644
index 00000000000..f1e1dfd3e6e
--- /dev/null
+++ b/hr_employee_firstname/i18n/hr.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# Bole , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-07-04 06:52+0000\n"
+"PO-Revision-Date: 2017-07-04 06:52+0000\n"
+"Last-Translator: Bole , 2017\n"
+"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Djelatnik"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr "Ime"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr "Prezime"
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
new file mode 100644
index 00000000000..dcd3d20d994
--- /dev/null
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -0,0 +1,34 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# Bole , 2017
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 10.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: Bole , 2017\n"
+"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Language: hr_HR\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Djelatnik"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
deleted file mode 100644
index 6b13f0cf122..00000000000
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ /dev/null
@@ -1,32 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * hr_employee_firstname
-#
-msgid ""
-msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-24 10:20+0000\n"
-"PO-Revision-Date: 2015-04-24 10:20+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: \n"
-"Plural-Forms: \n"
-
-#. module: hr_employee_firstname
-#: model:ir.model,name:hr_employee_firstname.model_hr_employee
-msgid "Employee"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
-msgid "Firstname"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
-msgid "Lastname"
-msgstr ""
-
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index a24c509f82b..ad37b473f64 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -3,15 +3,15 @@
# * hr_employee_firstname
#
# Translators:
-# Paolo Valier, 2016
+# 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: 2016-03-12 12:02+0000\n"
-"PO-Revision-Date: 2016-03-19 10:38+0000\n"
-"Last-Translator: Paolo Valier\n"
-"Language-Team: Italian (http://www.transifex.com/oca/OCA-hr-8-0/language/it/)\n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -24,11 +24,11 @@ msgid "Employee"
msgstr "Dipendente"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Nome"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Cognome"
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index eb09d04a5f4..881ea6a88e9 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -3,15 +3,15 @@
# * hr_employee_firstname
#
# Translators:
-# lfreeke , 2015
+# 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-03 22:37+0000\n"
-"PO-Revision-Date: 2015-09-28 20:59+0000\n"
-"Last-Translator: lfreeke \n"
-"Language-Team: Dutch (Netherlands) (http://www.transifex.com/oca/OCA-hr-8-0/language/nl_NL/)\n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -24,11 +24,11 @@ msgid "Employee"
msgstr "Werknemer"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Voornaam"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Achternaam"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index 5c433097e41..d59e8706caa 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -3,15 +3,15 @@
# * hr_employee_firstname
#
# Translators:
-# danimaribeiro , 2016
+# 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: 2016-03-11 01:48+0000\n"
-"PO-Revision-Date: 2016-03-08 03:18+0000\n"
-"Last-Translator: danimaribeiro \n"
-"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-hr-8-0/language/pt_BR/)\n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -24,11 +24,11 @@ msgid "Employee"
msgstr "Empregado"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Primeiro nome"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Último nome"
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index e8d7be091fc..c6de161c0c3 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -1,19 +1,22 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * hr_employee_firstname
-#
+# * hr_employee_firstname
+#
+# Translators:
+# OCA Transbot , 2017
msgid ""
msgstr ""
-"Project-Id-Version: Odoo Server 8.0\n"
+"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-04-24 10:20+0000\n"
-"PO-Revision-Date: 2015-04-24 10:20+0000\n"
-"Last-Translator: <>\n"
-"Language-Team: \n"
+"POT-Creation-Date: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: \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_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -21,12 +24,11 @@ msgid "Employee"
msgstr "Angajat"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Prenume"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Nume"
-
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index 122a067c389..dae9f553031 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -3,15 +3,15 @@
# * hr_employee_firstname
#
# Translators:
-# Matjaž Mozetič , 2015
+# 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-08-18 13:10+0000\n"
-"PO-Revision-Date: 2015-08-16 11:40+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: 2017-01-28 02:12+0000\n"
+"PO-Revision-Date: 2017-01-28 02:12+0000\n"
+"Last-Translator: OCA Transbot , 2017\n"
+"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
@@ -24,11 +24,11 @@ msgid "Employee"
msgstr "Kader"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr "Ime"
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr "Priimek"
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
new file mode 100644
index 00000000000..12ca46d33d5
--- /dev/null
+++ b/hr_employee_firstname/init_hook.py
@@ -0,0 +1,11 @@
+# -*- coding: utf-8 -*-
+# Copyright 2016 Onestein ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+from odoo import SUPERUSER_ID
+from odoo.api import Environment
+
+
+def post_init_hook(cr, pool):
+ env = Environment(cr, SUPERUSER_ID, {})
+ env['hr.employee']._update_employee_names()
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index c48e9660be4..ea58859484d 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,23 +1,5 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# This module copyright (C) 2010 - 2014 Savoir-faire Linux
-# ().
-#
-# 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 .
-#
-##############################################################################
+# © 2010 - 2014 Savoir-faire Linux ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import hr_employee
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index e7022e28c29..f7617af7926 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -1,29 +1,10 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# OpenERP, Open Source Management Solution
-# This module copyright (C) 2010 - 2014 Savoir-faire Linux
-# ().
-#
-# 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 .
-#
-##############################################################################
+# © 2010 - 2014 Savoir-faire Linux ()
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from openerp import models, fields, api, SUPERUSER_ID
+from odoo import models, fields, api
-UPDATE_PARTNER_FIELDS = set(['firstname', 'lastname', 'user_id',
- 'address_home_id'])
+UPDATE_PARTNER_FIELDS = ['firstname', 'lastname', 'user_id', 'address_home_id']
class HrEmployee(models.Model):
@@ -34,11 +15,6 @@ def split_name(self, name):
clean_name = u" ".join(name.split(None)) if name else name
return self.env['res.partner']._get_inverse_name(clean_name)
- @api.cr_context
- def _auto_init(self, cr, context=None):
- super(HrEmployee, self)._auto_init(cr, context=context)
- self._update_employee_names(cr, SUPERUSER_ID, context=context)
-
@api.model
def _update_employee_names(self):
employees = self.search([
@@ -64,11 +40,13 @@ def _update_partner_firstname(self, employee):
def _get_name(self, lastname, firstname):
return self.env['res.partner']._get_computed_name(lastname, firstname)
- @api.one
+ @api.multi
@api.onchange('firstname', 'lastname')
def get_name(self):
- if self.firstname and self.lastname:
- self.name = self._get_name(self.lastname, self.firstname)
+ for employee in self:
+ if employee.firstname and employee.lastname:
+ employee.name = self._get_name(
+ employee.lastname, employee.firstname)
def _firstname_default(self):
return ' ' if self.env.context.get('module') else False
diff --git a/hr_employee_firstname/tests/__init__.py b/hr_employee_firstname/tests/__init__.py
index a9df4e5c6e2..f24f5d832fc 100644
--- a/hr_employee_firstname/tests/__init__.py
+++ b/hr_employee_firstname/tests/__init__.py
@@ -1 +1,4 @@
+# -*- coding: utf-8 -*-
+# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_hr_employee_firstname
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index fb49f104200..2e8a27d1bc1 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -1,26 +1,9 @@
# -*- coding: utf-8 -*-
-##############################################################################
-#
-# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
-#
-# 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 .
-#
-##############################################################################
-
-import openerp.tests
-from openerp.tests.common import TransactionCase
+# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+
+import odoo
+from odoo.tests.common import TransactionCase
class TestEmployeeFirstname(TransactionCase):
@@ -60,6 +43,17 @@ def test_get_name(self):
# Check for employee3
self.assertEqual(self.employee3_id.name, 'Jenssens Famke')
+ def test_onchange(self):
+ """
+ Validate the get_name method is not failing
+ """
+ field_onchange = self.employee1_id._onchange_spec()
+ self.assertEqual(field_onchange.get('firstname'), '1')
+ self.assertEqual(field_onchange.get('lastname'), '1')
+ values = {'firstname': 'Antonio', 'lastname': 'Esposito'}
+ self.employee1_id.onchange(values, 'firstname', field_onchange)
+ self.employee1_id.onchange(values, 'lastname', field_onchange)
+
def test_auto_init_name(self):
"""
Validate the create method if the name is split
@@ -111,10 +105,10 @@ def test_change_firstname_and_lastname(self):
self.assertEqual(self.employee1_id.name, 'Carnaud Jean-Pierre')
- @openerp.tests.common.at_install(False)
- @openerp.tests.common.post_install(True)
+ @odoo.tests.common.at_install(False)
+ @odoo.tests.common.post_install(True)
def test_update_name_post_install(self):
- self.empl_demo = self.env.ref('hr.employee_fp')
+ self.empl_demo = self.env.ref('hr.employee_root')
self.assertEqual(self.empl_demo.firstname, 'Parker')
self.assertEqual(self.empl_demo.lastname, 'Pieter')
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 16aa496fb0a..4f053fbbef7 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -1,27 +1,28 @@
-
-
+
hr.employee
-
-
-
-
-
-
-
-
-
+
+
+
+ 1
+ 1
+ 0
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
From 257469ac6d0260a4ac6336f7e820d1cee3c8de61 Mon Sep 17 00:00:00 2001
From: Fekete Mihai
Date: Tue, 14 Nov 2017 00:53:11 -0800
Subject: [PATCH 08/42] [MIG] hr_employee_firstname: Migration to version 11.0
---
hr_employee_firstname/README.rst | 14 +++--
hr_employee_firstname/__init__.py | 1 -
hr_employee_firstname/__manifest__.py | 5 +-
hr_employee_firstname/init_hook.py | 1 -
hr_employee_firstname/models/__init__.py | 1 -
hr_employee_firstname/models/hr_employee.py | 55 +++++++++----------
hr_employee_firstname/tests/__init__.py | 1 -
.../tests/test_hr_employee_firstname.py | 1 -
8 files changed, 37 insertions(+), 42 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index d5631065f61..2d65e242430 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -1,5 +1,5 @@
-.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
- :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html
+.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
+ :target: https://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
HR Employee First Name, Last Name
@@ -13,7 +13,7 @@ Installation
To install this module, you need to:
-* clone the branch 10.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 "HR Employee First Name, Last Name" in your addons
@@ -30,12 +30,16 @@ 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.
Credits
=======
+Images
+------
+
+* Odoo Community Association: `Icon `_.
+
Contributors
------------
diff --git a/hr_employee_firstname/__init__.py b/hr_employee_firstname/__init__.py
index 98c5a36df58..ac215e022e2 100644
--- a/hr_employee_firstname/__init__.py
+++ b/hr_employee_firstname/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright (C) 2010 - 2014 Savoir-faire Linux ()
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 8b38269757c..f3478f57adf 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -1,10 +1,9 @@
-# -*- coding: utf-8 -*-
# © 2010 - 2014 Savoir-faire Linux ()
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
'name': 'HR Employee First Name, Last Name',
- 'version': '10.0.1.0.0',
+ 'version': '11.0.1.0.0',
'author': "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Odoo Community Association (OCA)",
@@ -21,7 +20,5 @@
'views/hr_view.xml',
],
"post_init_hook": "post_init_hook",
- 'demo': [],
- 'test': [],
'installable': True,
}
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
index 12ca46d33d5..4267c54137e 100644
--- a/hr_employee_firstname/init_hook.py
+++ b/hr_employee_firstname/init_hook.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright 2016 Onestein ()
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index ea58859484d..469ed9dad23 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# © 2010 - 2014 Savoir-faire Linux ()
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index f7617af7926..05feeb64952 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -1,8 +1,7 @@
-# -*- coding: utf-8 -*-
# © 2010 - 2014 Savoir-faire Linux ()
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
-from odoo import models, fields, api
+from odoo import api, fields, models
UPDATE_PARTNER_FIELDS = ['firstname', 'lastname', 'user_id', 'address_home_id']
@@ -10,32 +9,6 @@
class HrEmployee(models.Model):
_inherit = 'hr.employee'
- @api.model
- def split_name(self, name):
- clean_name = u" ".join(name.split(None)) if name else name
- return self.env['res.partner']._get_inverse_name(clean_name)
-
- @api.model
- def _update_employee_names(self):
- employees = self.search([
- ('firstname', '=', ' '), ('lastname', '=', ' ')])
-
- for ee in employees:
- split_name = self.split_name(ee.name)
- ee.write({
- 'firstname': split_name['firstname'],
- 'lastname': split_name['lastname'],
- })
-
- @api.model
- def _update_partner_firstname(self, employee):
- partners = employee.mapped('user_id.partner_id')
- for partner in employee.mapped('address_home_id'):
- if partner not in partners:
- partners += partner
- partners.write({'firstname': employee.firstname,
- 'lastname': employee.lastname})
-
@api.model
def _get_name(self, lastname, firstname):
return self.env['res.partner']._get_computed_name(lastname, firstname)
@@ -81,3 +54,29 @@ def write(self, vals):
if set(vals).intersection(UPDATE_PARTNER_FIELDS):
self._update_partner_firstname(self)
return res
+
+ @api.model
+ def split_name(self, name):
+ clean_name = " ".join(name.split(None)) if name else name
+ return self.env['res.partner']._get_inverse_name(clean_name)
+
+ @api.model
+ def _update_employee_names(self):
+ employees = self.search([
+ ('firstname', '=', ' '), ('lastname', '=', ' ')])
+
+ for ee in employees:
+ split_name = self.split_name(ee.name)
+ ee.write({
+ 'firstname': split_name['firstname'],
+ 'lastname': split_name['lastname'],
+ })
+
+ @api.model
+ def _update_partner_firstname(self, employee):
+ partners = employee.mapped('user_id.partner_id')
+ for partner in employee.mapped('address_home_id'):
+ if partner not in partners:
+ partners += partner
+ partners.write({'firstname': employee.firstname,
+ 'lastname': employee.lastname})
diff --git a/hr_employee_firstname/tests/__init__.py b/hr_employee_firstname/tests/__init__.py
index f24f5d832fc..d6a8de057dc 100644
--- a/hr_employee_firstname/tests/__init__.py
+++ b/hr_employee_firstname/tests/__init__.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import test_hr_employee_firstname
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 2e8a27d1bc1..847e059f632 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
From 892ec935f18fa9fefbceb01aaa26fc13fd7a2309 Mon Sep 17 00:00:00 2001
From: Fekete Mihai
Date: Wed, 7 Mar 2018 12:16:15 +0200
Subject: [PATCH 09/42] [FIX] employee_firstname: test (#427)
---
.../tests/test_hr_employee_firstname.py | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 847e059f632..c0d4996f4ba 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -46,12 +46,22 @@ def test_onchange(self):
"""
Validate the get_name method is not failing
"""
- field_onchange = self.employee1_id._onchange_spec()
+ field_onchange = self.employee_model.new({})._onchange_spec()
self.assertEqual(field_onchange.get('firstname'), '1')
self.assertEqual(field_onchange.get('lastname'), '1')
- values = {'firstname': 'Antonio', 'lastname': 'Esposito'}
- self.employee1_id.onchange(values, 'firstname', field_onchange)
- self.employee1_id.onchange(values, 'lastname', field_onchange)
+ values = {'firstname': 'Antonio',
+ 'lastname': 'Esposito',
+ 'name': 'test employee'}
+ for field in self.employee_model._fields:
+ if field not in values:
+ values[field] = False
+ # we work on a temporary record
+ new_record = self.employee_model.new(values)
+
+ updates = new_record.onchange(
+ values, ['firstname', 'lastname'], field_onchange)
+ values.update(updates.get('value', {}))
+ self.assertEqual(values['name'], 'Esposito Antonio')
def test_auto_init_name(self):
"""
From e542fe964d2c3bffee41d76cec0a881b6f359bad Mon Sep 17 00:00:00 2001
From: David Dufresne
Date: Mon, 9 Apr 2018 13:34:14 -0400
Subject: [PATCH 10/42] [11.0][FIX] Fix dangerous use of 'replace' from
hr.employee view.
This issue was flagged by travis in the following build https://travis-ci.org/OCA/hr/jobs/364219109
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/ar.po | 7 ++--
hr_employee_firstname/i18n/cs_CZ.po | 36 +++++++++++++++++++
hr_employee_firstname/i18n/de.po | 13 +++----
hr_employee_firstname/i18n/en.po | 33 -----------------
hr_employee_firstname/i18n/es.po | 4 +--
hr_employee_firstname/i18n/fa.po | 35 ++++++++++++++++++
hr_employee_firstname/i18n/fi.po | 11 +++---
hr_employee_firstname/i18n/fr.po | 4 +--
hr_employee_firstname/i18n/hr.po | 7 ++--
hr_employee_firstname/i18n/hr_HR.po | 10 +++---
.../i18n/hr_employee_firstname.pot | 30 ++++++++++++++++
hr_employee_firstname/i18n/it.po | 4 +--
hr_employee_firstname/i18n/lt.po | 36 +++++++++++++++++++
hr_employee_firstname/i18n/nl_NL.po | 7 ++--
hr_employee_firstname/i18n/pt_BR.po | 7 ++--
hr_employee_firstname/i18n/ro.po | 7 ++--
hr_employee_firstname/i18n/sl.po | 7 ++--
hr_employee_firstname/views/hr_view.xml | 11 +++---
19 files changed, 193 insertions(+), 78 deletions(-)
create mode 100644 hr_employee_firstname/i18n/cs_CZ.po
delete mode 100644 hr_employee_firstname/i18n/en.po
create mode 100644 hr_employee_firstname/i18n/fa.po
create mode 100644 hr_employee_firstname/i18n/hr_employee_firstname.pot
create mode 100644 hr_employee_firstname/i18n/lt.po
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index f3478f57adf..6675ba9e145 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'HR Employee First Name, Last Name',
- 'version': '11.0.1.0.0',
+ 'version': '11.0.1.0.1',
'author': "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Odoo Community Association (OCA)",
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index 259742eeefe..ed63fe8775a 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
# abdullah alsabi , 2017
@@ -13,11 +13,12 @@ msgstr ""
"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_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
new file mode 100644
index 00000000000..4129faf4ae1
--- /dev/null
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -0,0 +1,36 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-06-07 02:58+0000\n"
+"PO-Revision-Date: 2018-06-07 02:58+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Czech (Czech Republic) (https://www.transifex.com/oca/"
+"teams/23907/cs_CZ/)\n"
+"Language: cs_CZ\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n "
+"<= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Zaměstnanec"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 2ab540f3a86..5b8bf1e0816 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -9,19 +9,20 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2017-01-28 02:12+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
+"PO-Revision-Date: 2018-12-18 13:07+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"
-"Language: de\n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.3\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
-msgstr "Angestellter"
+msgstr "Angestellte(r)"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/en.po b/hr_employee_firstname/i18n/en.po
deleted file mode 100644
index e049538b44d..00000000000
--- a/hr_employee_firstname/i18n/en.po
+++ /dev/null
@@ -1,33 +0,0 @@
-# Translation of Odoo Server.
-# This file contains the translation of the following modules:
-# * hr_employee_firstname
-#
-# Translators:
-msgid ""
-msgstr ""
-"Project-Id-Version: hr (8.0)\n"
-"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2015-08-18 13:10+0000\n"
-"PO-Revision-Date: 2015-08-13 14:31+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_firstname
-#: model:ir.model,name:hr_employee_firstname.model_hr_employee
-msgid "Employee"
-msgstr "Employee"
-
-#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
-msgid "Firstname"
-msgstr "Firstname"
-
-#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
-msgid "Lastname"
-msgstr "Lastname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index a20884c0e40..a1e3decee19 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 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_firstname
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
new file mode 100644
index 00000000000..cddcd425f1f
--- /dev/null
+++ b/hr_employee_firstname/i18n/fa.po
@@ -0,0 +1,35 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# Mehdi Zarrinkolah , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-06-07 02:58+0000\n"
+"PO-Revision-Date: 2018-07-22 10:30+0000\n"
+"Last-Translator: derKonig \n"
+"Language-Team: Persian (https://www.transifex.com/oca/teams/23907/fa/)\n"
+"Language: fa\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 3.0.1\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "کارمند"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr "نام"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr "نام خانوادگی"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index 3e6a6e6bcd6..aac03df4f0f 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
msgid ""
msgstr ""
@@ -10,11 +10,12 @@ 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_firstname
@@ -23,11 +24,11 @@ msgid "Employee"
msgstr "Työntekijä"
#. module: hr_employee_firstname
-#: field:hr.employee,firstname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: field:hr.employee,lastname:0
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
msgid "Lastname"
msgstr ""
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index d6c0216d8d4..fc6babc1cde 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index f1e1dfd3e6e..0bd9a680fd1 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# Bole , 2017
msgid ""
@@ -12,11 +12,12 @@ msgstr ""
"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"
-"Language: hr\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index dcd3d20d994..89bccfa006d 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# Bole , 2017
msgid ""
@@ -11,12 +11,14 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: Bole , 2017\n"
-"Language-Team: Croatian (Croatia) (https://www.transifex.com/oca/teams/23907/hr_HR/)\n"
+"Language-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"
-"Language: hr_HR\n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
new file mode 100644
index 00000000000..6fae454a283
--- /dev/null
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -0,0 +1,30 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"Last-Translator: <>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: \n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr ""
+
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index ad37b473f64..aa16f1d3abd 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,10 +12,10 @@ msgstr ""
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\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_firstname
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
new file mode 100644
index 00000000000..abb74a995f7
--- /dev/null
+++ b/hr_employee_firstname/i18n/lt.po
@@ -0,0 +1,36 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+# Translators:
+# OCA Transbot , 2018
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 11.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-06-07 02:58+0000\n"
+"PO-Revision-Date: 2018-06-07 02:58+0000\n"
+"Last-Translator: OCA Transbot , 2018\n"
+"Language-Team: Lithuanian (https://www.transifex.com/oca/teams/23907/lt/)\n"
+"Language: lt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=4; plural=(n % 10 == 1 && (n % 100 > 19 || n % 100 < "
+"11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? "
+"1 : n % 1 != 0 ? 2: 3);\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Darbuotojas"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+msgid "Firstname"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+msgid "Lastname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 881ea6a88e9..52b3c439c74 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/teams/23907/nl_NL/)\n"
+"Language-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_firstname
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index d59e8706caa..9febe2b5fb9 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -11,11 +11,12 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
+"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Language: pt_BR\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index c6de161c0c3..3ed766f328d 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,11 +12,12 @@ msgstr ""
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Romanian (https://www.transifex.com/oca/teams/23907/ro/)\n"
+"Language: ro\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"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_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index dae9f553031..99728b1e2d6 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_firstname
-#
+#
# Translators:
# OCA Transbot , 2017
msgid ""
@@ -12,11 +12,12 @@ msgstr ""
"PO-Revision-Date: 2017-01-28 02:12+0000\n"
"Last-Translator: OCA Transbot , 2017\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
+"Language: sl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"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_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 4f053fbbef7..67fe130de42 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -5,8 +5,8 @@
hr.employee
-
-
+
+ 1
1
@@ -14,9 +14,10 @@
0
-
-
-
+
+
+
+
From fdcc0e9ff345d062ac0eca422d9e8a2e8226b781 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Thu, 28 Mar 2019 15:53:44 +0100
Subject: [PATCH 11/42] [12.0][MIG] hr_employee_firstname
---
hr_employee_firstname/README.rst | 67 ++++++++++++-------
hr_employee_firstname/__init__.py | 3 +-
hr_employee_firstname/__manifest__.py | 6 +-
hr_employee_firstname/init_hook.py | 2 +-
hr_employee_firstname/models/__init__.py | 3 +-
hr_employee_firstname/models/hr_employee.py | 55 +++++++--------
hr_employee_firstname/readme/CONTRIBUTORS.rst | 7 ++
hr_employee_firstname/readme/DESCRIPTION.rst | 2 +
hr_employee_firstname/readme/USAGE.rst | 2 +
hr_employee_firstname/tests/__init__.py | 4 +-
.../tests/test_hr_employee_firstname.py | 51 +++++++++-----
hr_employee_firstname/views/hr_view.xml | 8 +--
12 files changed, 127 insertions(+), 83 deletions(-)
create mode 100644 hr_employee_firstname/readme/CONTRIBUTORS.rst
create mode 100644 hr_employee_firstname/readme/DESCRIPTION.rst
create mode 100644 hr_employee_firstname/readme/USAGE.rst
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index 2d65e242430..979a60f35bf 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -1,23 +1,37 @@
-.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
- :target: https://www.gnu.org/licenses/agpl
- :alt: License: AGPL-3
-
+=================================
HR Employee First Name, Last Name
=================================
+.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! 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_firstname
+ :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_firstname
+ :alt: Translate me on Weblate
+.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
+ :target: https://runbot.odoo-community.org/runbot/116/12.0
+ :alt: Try me on Runbot
+
+|badge1| |badge2| |badge3| |badge4| |badge5|
+
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
-Installation
-============
+**Table of contents**
-To install this module, you need to:
-
-* clone the branch 11.0 of the repository https://github.com/OCA/hr
-* add the path to this repository in your configuration (addons-path)
-* update the module list
-* search for "HR Employee First Name, Last Name" in your addons
-* install the module
+.. contents::
+ :local:
Usage
=====
@@ -30,18 +44,22 @@ 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.
+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
=======
-Images
-------
+Authors
+~~~~~~~
-* Odoo Community Association: `Icon `_.
+* Savoir-faire Linux
+* Fekete Mihai (Forest and Biomass Services Romania)
Contributors
-------------
+~~~~~~~~~~~~
* El Hadji Dem
* Sandy Carter
@@ -49,18 +67,21 @@ Contributors
* David Dufresne
* Adrien Peiffer (ACSONE)
* Antonio Esposito (ONESTEIN BV)
+* Andrea Stirpe
-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.
-To contribute to this module, please visit https://odoo-community.org.
+This module is part of the `OCA/hr `_ project on GitHub.
+
+You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
diff --git a/hr_employee_firstname/__init__.py b/hr_employee_firstname/__init__.py
index ac215e022e2..118a0621721 100644
--- a/hr_employee_firstname/__init__.py
+++ b/hr_employee_firstname/__init__.py
@@ -1,5 +1,4 @@
-# Copyright (C) 2010 - 2014 Savoir-faire Linux ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
from .init_hook import post_init_hook
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 6675ba9e145..7e932477033 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -1,14 +1,14 @@
# © 2010 - 2014 Savoir-faire Linux ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'HR Employee First Name, Last Name',
- 'version': '11.0.1.0.1',
+ 'version': '12.0.1.0.0',
'author': "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Odoo Community Association (OCA)",
'maintainer': 'Savoir-faire Linux',
- 'website': 'http://www.savoirfairelinux.com',
+ 'website': 'https://github.com/OCA/hr/',
'license': 'AGPL-3',
'category': 'Human Resources',
'summary': 'Adds First Name to Employee',
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
index 4267c54137e..e0b3258456d 100644
--- a/hr_employee_firstname/init_hook.py
+++ b/hr_employee_firstname/init_hook.py
@@ -1,5 +1,5 @@
# Copyright 2016 Onestein ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID
from odoo.api import Environment
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index 469ed9dad23..b29f8d49334 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,4 +1,3 @@
-# © 2010 - 2014 Savoir-faire Linux ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import hr_employee
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 05feeb64952..2d66bc8ecc8 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -1,5 +1,6 @@
-# © 2010 - 2014 Savoir-faire Linux ()
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# Copyright 2010-2014 Savoir-faire Linux ()
+# Copyright 2016-2019 Onestein ()
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
@@ -13,21 +14,16 @@ class HrEmployee(models.Model):
def _get_name(self, lastname, firstname):
return self.env['res.partner']._get_computed_name(lastname, firstname)
- @api.multi
@api.onchange('firstname', 'lastname')
- def get_name(self):
- for employee in self:
- if employee.firstname and employee.lastname:
- employee.name = self._get_name(
- employee.lastname, employee.firstname)
+ def _onchange_firstname_lastname(self):
+ if self.firstname and self.lastname:
+ self.name = self._get_name(self.lastname, self.firstname)
def _firstname_default(self):
return ' ' if self.env.context.get('module') else False
- firstname = fields.Char(
- "Firstname", default=_firstname_default)
- lastname = fields.Char(
- "Lastname", required=True, default=_firstname_default)
+ firstname = fields.Char(default=_firstname_default)
+ lastname = fields.Char(required=True, default=_firstname_default)
@api.model
def create(self, vals):
@@ -37,8 +33,8 @@ def create(self, vals):
elif vals.get('name'):
vals['lastname'] = self.split_name(vals['name'])['lastname']
vals['firstname'] = self.split_name(vals['name'])['firstname']
- res = super(HrEmployee, self).create(vals)
- self._update_partner_firstname(res)
+ res = super().create(vals)
+ res._update_partner_firstname()
return res
@api.multi
@@ -50,9 +46,9 @@ def write(self, vals):
elif vals.get('name'):
vals['lastname'] = self.split_name(vals['name'])['lastname']
vals['firstname'] = self.split_name(vals['name'])['firstname']
- res = super(HrEmployee, self).write(vals)
+ res = super().write(vals)
if set(vals).intersection(UPDATE_PARTNER_FIELDS):
- self._update_partner_firstname(self)
+ self._update_partner_firstname()
return res
@api.model
@@ -63,20 +59,21 @@ def split_name(self, name):
@api.model
def _update_employee_names(self):
employees = self.search([
- ('firstname', '=', ' '), ('lastname', '=', ' ')])
-
- for ee in employees:
- split_name = self.split_name(ee.name)
- ee.write({
+ ('firstname', '=', ' '),
+ ('lastname', '=', ' ')
+ ])
+ for employee in employees:
+ split_name = self.split_name(employee.name)
+ employee.write({
'firstname': split_name['firstname'],
'lastname': split_name['lastname'],
})
- @api.model
- def _update_partner_firstname(self, employee):
- partners = employee.mapped('user_id.partner_id')
- for partner in employee.mapped('address_home_id'):
- if partner not in partners:
- partners += partner
- partners.write({'firstname': employee.firstname,
- 'lastname': employee.lastname})
+ def _update_partner_firstname(self):
+ for employee in self:
+ partners = employee.mapped('user_id.partner_id')
+ partners |= employee.mapped('address_home_id')
+ partners.write({
+ 'firstname': employee.firstname,
+ 'lastname': employee.lastname,
+ })
diff --git a/hr_employee_firstname/readme/CONTRIBUTORS.rst b/hr_employee_firstname/readme/CONTRIBUTORS.rst
new file mode 100644
index 00000000000..7b93354ae97
--- /dev/null
+++ b/hr_employee_firstname/readme/CONTRIBUTORS.rst
@@ -0,0 +1,7 @@
+* El Hadji Dem
+* Sandy Carter
+* Fekete Mihai
+* David Dufresne
+* Adrien Peiffer (ACSONE)
+* Antonio Esposito (ONESTEIN BV)
+* Andrea Stirpe
diff --git a/hr_employee_firstname/readme/DESCRIPTION.rst b/hr_employee_firstname/readme/DESCRIPTION.rst
new file mode 100644
index 00000000000..519644a7f4c
--- /dev/null
+++ b/hr_employee_firstname/readme/DESCRIPTION.rst
@@ -0,0 +1,2 @@
+This module allows you to add firstname and lastname in employee form,
+and concatenate both in name field.
diff --git a/hr_employee_firstname/readme/USAGE.rst b/hr_employee_firstname/readme/USAGE.rst
new file mode 100644
index 00000000000..086b5efaf55
--- /dev/null
+++ b/hr_employee_firstname/readme/USAGE.rst
@@ -0,0 +1,2 @@
+On the employee form view you will have 2 separate fields, one for Firstname,
+second for Lastname, both required.
diff --git a/hr_employee_firstname/tests/__init__.py b/hr_employee_firstname/tests/__init__.py
index d6a8de057dc..94eb89dd759 100644
--- a/hr_employee_firstname/tests/__init__.py
+++ b/hr_employee_firstname/tests/__init__.py
@@ -1,3 +1,3 @@
-# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
+
from . import test_hr_employee_firstname
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index c0d4996f4ba..74599709ab8 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -1,5 +1,6 @@
# Copyright (C) 2014 Savoir-faire Linux. All Rights Reserved.
-# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
+# Copyright 2016-2019 Onestein ()
+# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import odoo
from odoo.tests.common import TransactionCase
@@ -7,7 +8,7 @@
class TestEmployeeFirstname(TransactionCase):
def setUp(self):
- super(TestEmployeeFirstname, self).setUp()
+ super().setUp()
self.employee_model = self.env['hr.employee']
# Create 3 employees to concatenate the firstname and lastname
@@ -22,9 +23,9 @@ def setUp(self):
# Create 3 employees for split the name_related to
# firstname and lastname
self.employee10_id = self.employee_model.create(
- {'name': ' Van-Eyck Jan'})
+ {'name': ' Jan Van-Eyck'})
self.employee20_id = self.employee_model.create(
- {'name': 'Carnaud Jean-Pierre'})
+ {'name': 'Jean-Pierre Carnaud'})
self.employee30_id = self.employee_model.create(
{'name': 'JenssensFamke'})
@@ -34,13 +35,13 @@ def test_get_name(self):
the firstname and lastname
"""
# Check for employee1
- self.assertEqual(self.employee1_id.name, 'Van-Eyck Jan')
+ self.assertEqual(self.employee1_id.name, 'Jan Van-Eyck')
# Check for employee2
- self.assertEqual(self.employee2_id.name, 'Carnaud Jean-Pierre')
+ self.assertEqual(self.employee2_id.name, 'Jean-Pierre Carnaud')
# Check for employee3
- self.assertEqual(self.employee3_id.name, 'Jenssens Famke')
+ self.assertEqual(self.employee3_id.name, 'Famke Jenssens')
def test_onchange(self):
"""
@@ -61,7 +62,7 @@ def test_onchange(self):
updates = new_record.onchange(
values, ['firstname', 'lastname'], field_onchange)
values.update(updates.get('value', {}))
- self.assertEqual(values['name'], 'Esposito Antonio')
+ self.assertEqual(values['name'], 'Antonio Esposito')
def test_auto_init_name(self):
"""
@@ -81,14 +82,14 @@ def test_auto_init_name(self):
self.assertEqual(self.employee30_id.lastname, 'JenssensFamke')
def test_change_name(self):
- self.employee1_id.write({'name': 'Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.write({'name': 'Jean-Pierre Carnaud-Eyck'})
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
def test_change_name_with_space(self):
- self.employee1_id.write({'name': ' Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.write({'name': ' Jean-Pierre Carnaud-Eyck'})
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
@@ -98,13 +99,13 @@ def test_change_firstname(self):
self.employee1_id.write({'firstname': 'Jean-Pierre'})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Van-Eyck Jean-Pierre')
+ self.assertEqual(self.employee1_id.name, 'Jean-Pierre Van-Eyck')
def test_change_lastname(self):
self.employee1_id.write({'lastname': 'Carnaud'})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Carnaud Jan')
+ self.assertEqual(self.employee1_id.name, 'Jan Carnaud')
def test_change_firstname_and_lastname(self):
self.employee1_id.write({
@@ -112,12 +113,32 @@ def test_change_firstname_and_lastname(self):
'lastname': 'Carnaud'})
self.employee1_id.refresh()
+ self.assertEqual(self.employee1_id.name, 'Jean-Pierre Carnaud')
+
+ def test_lastname_firstname(self):
+ self.env['ir.config_parameter'].sudo().set_param(
+ 'partner_names_order', 'last_first')
+
+ self.employee1_id.write({'name': 'Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.refresh()
+ self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+
+ self.employee1_id.write({'name': ' Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.refresh()
+ self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
+ self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+
+ self.employee1_id.write({
+ 'firstname': 'Jean-Pierre',
+ 'lastname': 'Carnaud'})
+ self.employee1_id.refresh()
self.assertEqual(self.employee1_id.name, 'Carnaud Jean-Pierre')
@odoo.tests.common.at_install(False)
@odoo.tests.common.post_install(True)
def test_update_name_post_install(self):
- self.empl_demo = self.env.ref('hr.employee_root')
+ empl_demo = self.env.ref('hr.employee_admin')
- self.assertEqual(self.empl_demo.firstname, 'Parker')
- self.assertEqual(self.empl_demo.lastname, 'Pieter')
+ self.assertEqual(empl_demo.firstname, 'Mitchell')
+ self.assertEqual(empl_demo.lastname, 'Admin')
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 67fe130de42..7127d04c4f7 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -15,13 +15,9 @@
-
-
-
+
-
-
-
+
From b08e054777f2af7d6f9192aae0833b26f59cbd3d Mon Sep 17 00:00:00 2001
From: Andrea
Date: Mon, 8 Apr 2019 08:36:05 +0200
Subject: [PATCH 12/42] [FIX/IMP] Make required attributes dynamic
---
hr_employee_firstname/README.rst | 3 +-
hr_employee_firstname/__manifest__.py | 11 +-
hr_employee_firstname/i18n/ar.po | 11 +-
hr_employee_firstname/i18n/cs_CZ.po | 11 +-
hr_employee_firstname/i18n/de.po | 17 +-
hr_employee_firstname/i18n/es.po | 18 +-
hr_employee_firstname/i18n/fa.po | 11 +-
hr_employee_firstname/i18n/fi.po | 11 +-
hr_employee_firstname/i18n/fr.po | 11 +-
hr_employee_firstname/i18n/hr.po | 20 +-
hr_employee_firstname/i18n/hr_HR.po | 11 +-
.../i18n/hr_employee_firstname.pot | 13 +-
hr_employee_firstname/i18n/it.po | 11 +-
hr_employee_firstname/i18n/lt.po | 11 +-
hr_employee_firstname/i18n/nl_NL.po | 11 +-
hr_employee_firstname/i18n/pt_BR.po | 22 +-
hr_employee_firstname/i18n/ro.po | 11 +-
hr_employee_firstname/i18n/sl.po | 11 +-
hr_employee_firstname/init_hook.py | 9 +-
hr_employee_firstname/models/hr_employee.py | 76 ++-
hr_employee_firstname/readme/USAGE.rst | 2 +-
.../static/description/index.html | 434 ++++++++++++++++++
.../tests/test_hr_employee_firstname.py | 8 +
hr_employee_firstname/views/hr_view.xml | 12 +-
24 files changed, 677 insertions(+), 89 deletions(-)
create mode 100644 hr_employee_firstname/static/description/index.html
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index 979a60f35bf..da47e955dda 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -37,7 +37,7 @@ Usage
=====
On the employee form view you will have 2 separate fields, one for Firstname,
-second for Lastname, both required.
+second for Lastname. At least one of them is required.
Bug Tracker
===========
@@ -57,6 +57,7 @@ Authors
* Savoir-faire Linux
* Fekete Mihai (Forest and Biomass Services Romania)
+* Onestein
Contributors
~~~~~~~~~~~~
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 7e932477033..11365bb936d 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -1,12 +1,13 @@
-# © 2010 - 2014 Savoir-faire Linux ()
+# Copyright 2010-2014 Savoir-faire Linux ()
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
'name': 'HR Employee First Name, Last Name',
'version': '12.0.1.0.0',
- 'author': "Savoir-faire Linux, "
- "Fekete Mihai (Forest and Biomass Services Romania), "
- "Odoo Community Association (OCA)",
+ 'author': 'Savoir-faire Linux, '
+ 'Fekete Mihai (Forest and Biomass Services Romania), '
+ 'Onestein, '
+ 'Odoo Community Association (OCA)',
'maintainer': 'Savoir-faire Linux',
'website': 'https://github.com/OCA/hr/',
'license': 'AGPL-3',
@@ -19,6 +20,6 @@
'data': [
'views/hr_view.xml',
],
- "post_init_hook": "post_init_hook",
+ 'post_init_hook': 'post_init_hook',
'installable': True,
}
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index ed63fe8775a..0f37b82c8f4 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -26,11 +26,18 @@ msgid "Employee"
msgstr "الموظف"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "الإسم الأول"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "إسم العائلة"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index 4129faf4ae1..83953f6a20c 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -26,11 +26,18 @@ msgid "Employee"
msgstr "Zaměstnanec"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr ""
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 5b8bf1e0816..e3ef06fa63a 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2018-12-18 13:07+0000\n"
+"PO-Revision-Date: 2019-11-13 12:34+0000\n"
"Last-Translator: Maria Sparenberg \n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
@@ -17,19 +17,26 @@ 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.3\n"
+"X-Generator: Weblate 3.8\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
-msgstr "Angestellte(r)"
+msgstr "Mitarbeiter"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Vorname"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Nachname"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr "Es wurde kein Name eingetragen."
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index a1e3decee19..dc8a206d234 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -9,14 +9,15 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2017-01-28 02:12+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
+"PO-Revision-Date: 2019-07-23 11:43+0000\n"
+"Last-Translator: Jaime Arroyo \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 3.7.1\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -24,11 +25,18 @@ msgid "Employee"
msgstr "Empleado"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Nombre propio"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Apellidos"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr "Sin nombre establecido."
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index cddcd425f1f..e0307a61306 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -25,11 +25,18 @@ msgid "Employee"
msgstr "کارمند"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "نام"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "نام خانوادگی"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index aac03df4f0f..1c3d4fdc7c3 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -24,11 +24,18 @@ msgid "Employee"
msgstr "Työntekijä"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr ""
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index fc6babc1cde..824224d8994 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -24,11 +24,18 @@ msgid "Employee"
msgstr "Employé"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Prénom"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Nom"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 0bd9a680fd1..4e8b67901ca 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -9,15 +9,16 @@ 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"
+"PO-Revision-Date: 2019-11-13 16:34+0000\n"
+"Last-Translator: Bole \n"
"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
-"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
+"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"X-Generator: Weblate 3.8\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -25,11 +26,18 @@ msgid "Employee"
msgstr "Djelatnik"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Ime"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Prezime"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr "Ime nije postavljeno."
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index 89bccfa006d..671ec19e5cf 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -26,11 +26,18 @@ msgid "Employee"
msgstr "Djelatnik"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr ""
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index 6fae454a283..c04e9416b56 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.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"
@@ -19,12 +19,19 @@ msgid "Employee"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr ""
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
+
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index aa16f1d3abd..f8fa6419c5a 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -24,11 +24,18 @@ msgid "Employee"
msgstr "Dipendente"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Nome"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Cognome"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index abb74a995f7..c9764267ffb 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -26,11 +26,18 @@ msgid "Employee"
msgstr "Darbuotojas"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr ""
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 52b3c439c74..23802eb275d 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -25,11 +25,18 @@ msgid "Employee"
msgstr "Werknemer"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Voornaam"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Achternaam"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index 9febe2b5fb9..1864cebab62 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -9,15 +9,16 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2017-01-28 02:12+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
-"teams/23907/pt_BR/)\n"
+"PO-Revision-Date: 2019-08-30 13:23+0000\n"
+"Last-Translator: Rodrigo Macedo \n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
+"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"Plural-Forms: nplurals=2; plural=n > 1;\n"
+"X-Generator: Weblate 3.8\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -25,11 +26,18 @@ msgid "Employee"
msgstr "Empregado"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Primeiro nome"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Último nome"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr "Sem nome estabelecido."
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index 3ed766f328d..66858e8e175 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -25,11 +25,18 @@ msgid "Employee"
msgstr "Angajat"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Prenume"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Nume"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index 99728b1e2d6..546f2949eaf 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -25,11 +25,18 @@ msgid "Employee"
msgstr "Kader"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "Firstname"
msgstr "Ime"
#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Lastname"
msgstr "Priimek"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:39
+#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#, python-format
+msgid "No name set."
+msgstr ""
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
index e0b3258456d..083bf7c87a4 100644
--- a/hr_employee_firstname/init_hook.py
+++ b/hr_employee_firstname/init_hook.py
@@ -1,10 +1,11 @@
-# Copyright 2016 Onestein ()
+# Copyright 2016-2019 Onestein ()
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID
from odoo.api import Environment
-def post_init_hook(cr, pool):
- env = Environment(cr, SUPERUSER_ID, {})
- env['hr.employee']._update_employee_names()
+def post_init_hook(cr, _):
+ with Environment.manage():
+ env = Environment(cr, SUPERUSER_ID, {})
+ env['hr.employee']._install_employee_firstname()
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 2d66bc8ecc8..47225099896 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -2,7 +2,12 @@
# Copyright 2016-2019 Onestein ()
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-from odoo import api, fields, models
+import logging
+
+from odoo import api, fields, models, _
+from odoo.exceptions import ValidationError
+
+_logger = logging.getLogger(__name__)
UPDATE_PARTNER_FIELDS = ['firstname', 'lastname', 'user_id', 'address_home_id']
@@ -16,32 +21,37 @@ def _get_name(self, lastname, firstname):
@api.onchange('firstname', 'lastname')
def _onchange_firstname_lastname(self):
- if self.firstname and self.lastname:
+ if self.firstname or self.lastname:
self.name = self._get_name(self.lastname, self.firstname)
- def _firstname_default(self):
- return ' ' if self.env.context.get('module') else False
-
- firstname = fields.Char(default=_firstname_default)
- lastname = fields.Char(required=True, default=_firstname_default)
+ firstname = fields.Char()
+ lastname = fields.Char()
@api.model
def create(self, vals):
- if vals.get('firstname') and vals.get('lastname'):
- vals['name'] = self._get_name(vals['lastname'], vals['firstname'])
-
+ if vals.get('firstname') or vals.get('lastname'):
+ vals['name'] = self._get_name(
+ vals.get('lastname'), vals.get('firstname'))
elif vals.get('name'):
vals['lastname'] = self.split_name(vals['name'])['lastname']
vals['firstname'] = self.split_name(vals['name'])['firstname']
+ else:
+ raise ValidationError(_('No name set.'))
res = super().create(vals)
res._update_partner_firstname()
return res
@api.multi
def write(self, vals):
- if vals.get('firstname') or vals.get('lastname'):
- lastname = vals.get('lastname') or self.lastname or ' '
- firstname = vals.get('firstname') or self.firstname or ' '
+ if 'firstname' in vals or 'lastname' in vals:
+ if 'lastname' in vals:
+ lastname = vals.get('lastname')
+ else:
+ lastname = self.lastname
+ if 'firstname' in vals:
+ firstname = vals.get('firstname')
+ else:
+ firstname = self.firstname
vals['name'] = self._get_name(lastname, firstname)
elif vals.get('name'):
vals['lastname'] = self.split_name(vals['name'])['lastname']
@@ -56,18 +66,29 @@ def split_name(self, name):
clean_name = " ".join(name.split(None)) if name else name
return self.env['res.partner']._get_inverse_name(clean_name)
+ @api.multi
+ def _inverse_name(self):
+ """Try to revert the effect of :meth:`._compute_name`."""
+ for record in self:
+ parts = self.env['res.partner']._get_inverse_name(record.name)
+ record.lastname = parts['lastname']
+ record.firstname = parts['firstname']
+
@api.model
- def _update_employee_names(self):
- employees = self.search([
- ('firstname', '=', ' '),
- ('lastname', '=', ' ')
- ])
- for employee in employees:
- split_name = self.split_name(employee.name)
- employee.write({
- 'firstname': split_name['firstname'],
- 'lastname': split_name['lastname'],
- })
+ def _install_employee_firstname(self):
+ """Save names correctly in the database.
+
+ Before installing the module, field ``name`` contains all full names.
+ When installing it, this method parses those names and saves them
+ correctly into the database. This can be called later too if needed.
+ """
+ # Find records with empty firstname and lastname
+ records = self.search([("firstname", "=", False),
+ ("lastname", "=", False)])
+
+ # Force calculations there
+ records._inverse_name()
+ _logger.info("%d employees updated installing module.", len(records))
def _update_partner_firstname(self):
for employee in self:
@@ -77,3 +98,10 @@ def _update_partner_firstname(self):
'firstname': employee.firstname,
'lastname': employee.lastname,
})
+
+ @api.constrains("firstname", "lastname")
+ def _check_name(self):
+ """Ensure at least one name is set."""
+ for record in self:
+ if not (record.firstname or record.lastname):
+ raise ValidationError(_('No name set.'))
diff --git a/hr_employee_firstname/readme/USAGE.rst b/hr_employee_firstname/readme/USAGE.rst
index 086b5efaf55..1b05d8d1678 100644
--- a/hr_employee_firstname/readme/USAGE.rst
+++ b/hr_employee_firstname/readme/USAGE.rst
@@ -1,2 +1,2 @@
On the employee form view you will have 2 separate fields, one for Firstname,
-second for Lastname, both required.
+second for Lastname. At least one of them is required.
diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
new file mode 100644
index 00000000000..049004724d1
--- /dev/null
+++ b/hr_employee_firstname/static/description/index.html
@@ -0,0 +1,434 @@
+
+
+
+
+
+
+HR Employee First Name, Last Name
+
+
+
+
+
HR Employee First Name, Last Name
+
+
+
+
This module allows you to add firstname and lastname in employee form,
+and concatenate both in name field.
+
Table of contents
+
+
+
+
On the employee form view you will have 2 separate fields, one for Firstname,
+second for Lastname. At least one of them is required.
+
+
+
+
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.
+
+
+
+
+
+
+Savoir-faire Linux
+Fekete Mihai (Forest and Biomass Services Romania)
+Onestein
+
+
+
+
+
+
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.
+
This module is part of the OCA/hr project on GitHub.
+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute .
+
+
+
+
+
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 74599709ab8..d86f2beb55b 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -3,6 +3,7 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import odoo
+from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
@@ -142,3 +143,10 @@ def test_update_name_post_install(self):
self.assertEqual(empl_demo.firstname, 'Mitchell')
self.assertEqual(empl_demo.lastname, 'Admin')
+
+ def test_no_name(self):
+ self.employee_model.create({'firstname': 'test'})
+ self.employee_model.create({'lastname': 'test'})
+ self.employee_model.create({'name': 'test'})
+ with self.assertRaises(ValidationError):
+ self.employee_model.create({})
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 7127d04c4f7..277cf9c3993 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -9,15 +9,15 @@
1
- 1
+ 1
1
0
-
-
-
-
-
+
+
+
+
+
From a37d32b871422eb10cdc8b487605e005a03aae0a Mon Sep 17 00:00:00 2001
From: Andrea
Date: Fri, 6 Dec 2019 11:47:26 +0100
Subject: [PATCH 13/42] [13.0][MIG] hr_employee_firstname
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/models/hr_employee.py | 2 --
.../tests/test_hr_employee_firstname.py | 27 +++++++++----------
hr_employee_firstname/views/hr_view.xml | 3 ---
4 files changed, 14 insertions(+), 20 deletions(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 11365bb936d..f706bdef773 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
'name': 'HR Employee First Name, Last Name',
- 'version': '12.0.1.0.0',
+ 'version': '13.0.1.0.0',
'author': 'Savoir-faire Linux, '
'Fekete Mihai (Forest and Biomass Services Romania), '
'Onestein, '
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 47225099896..05069af1f64 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -41,7 +41,6 @@ def create(self, vals):
res._update_partner_firstname()
return res
- @api.multi
def write(self, vals):
if 'firstname' in vals or 'lastname' in vals:
if 'lastname' in vals:
@@ -66,7 +65,6 @@ def split_name(self, name):
clean_name = " ".join(name.split(None)) if name else name
return self.env['res.partner']._get_inverse_name(clean_name)
- @api.multi
def _inverse_name(self):
"""Try to revert the effect of :meth:`._compute_name`."""
for record in self:
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index d86f2beb55b..2c11d5815ed 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -10,24 +10,23 @@
class TestEmployeeFirstname(TransactionCase):
def setUp(self):
super().setUp()
- self.employee_model = self.env['hr.employee']
# Create 3 employees to concatenate the firstname and lastname
# in name_related
- self.employee1_id = self.employee_model.create(
+ self.employee1_id = self.env['hr.employee'].create(
{'firstname': 'Jan', 'lastname': 'Van-Eyck'})
- self.employee2_id = self.employee_model.create(
+ self.employee2_id = self.env['hr.employee'].create(
{'firstname': 'Jean-Pierre', 'lastname': 'Carnaud'})
- self.employee3_id = self.employee_model.create(
+ self.employee3_id = self.env['hr.employee'].create(
{'firstname': 'Famke', 'lastname': 'Jenssens'})
# Create 3 employees for split the name_related to
# firstname and lastname
- self.employee10_id = self.employee_model.create(
+ self.employee10_id = self.env['hr.employee'].create(
{'name': ' Jan Van-Eyck'})
- self.employee20_id = self.employee_model.create(
+ self.employee20_id = self.env['hr.employee'].create(
{'name': 'Jean-Pierre Carnaud'})
- self.employee30_id = self.employee_model.create(
+ self.employee30_id = self.env['hr.employee'].create(
{'name': 'JenssensFamke'})
def test_get_name(self):
@@ -48,17 +47,17 @@ def test_onchange(self):
"""
Validate the get_name method is not failing
"""
- field_onchange = self.employee_model.new({})._onchange_spec()
+ field_onchange = self.env['hr.employee'].new({})._onchange_spec()
self.assertEqual(field_onchange.get('firstname'), '1')
self.assertEqual(field_onchange.get('lastname'), '1')
values = {'firstname': 'Antonio',
'lastname': 'Esposito',
'name': 'test employee'}
- for field in self.employee_model._fields:
+ for field in self.env['hr.employee']._fields:
if field not in values:
values[field] = False
# we work on a temporary record
- new_record = self.employee_model.new(values)
+ new_record = self.env['hr.employee'].new(values)
updates = new_record.onchange(
values, ['firstname', 'lastname'], field_onchange)
@@ -145,8 +144,8 @@ def test_update_name_post_install(self):
self.assertEqual(empl_demo.lastname, 'Admin')
def test_no_name(self):
- self.employee_model.create({'firstname': 'test'})
- self.employee_model.create({'lastname': 'test'})
- self.employee_model.create({'name': 'test'})
+ self.env['hr.employee'].create({'firstname': 'test'})
+ self.env['hr.employee'].create({'lastname': 'test'})
+ self.env['hr.employee'].create({'name': 'test'})
with self.assertRaises(ValidationError):
- self.employee_model.create({})
+ self.env['hr.employee'].create({})
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index 277cf9c3993..b23d44bf9b5 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -5,9 +5,6 @@
hr.employee
-
- 1
-
1
1
From 6080f1b2fbcd7804b74a8115ee9e462836a21120 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Fri, 6 Dec 2019 11:48:22 +0100
Subject: [PATCH 14/42] pre-commit
---
hr_employee_firstname/README.rst | 10 +-
hr_employee_firstname/__manifest__.py | 35 ++---
hr_employee_firstname/i18n/ar.po | 3 +-
hr_employee_firstname/i18n/cs_CZ.po | 3 +-
hr_employee_firstname/i18n/de.po | 3 +-
hr_employee_firstname/i18n/es.po | 3 +-
hr_employee_firstname/i18n/fa.po | 3 +-
hr_employee_firstname/i18n/fi.po | 3 +-
hr_employee_firstname/i18n/fr.po | 3 +-
hr_employee_firstname/i18n/hr.po | 7 +-
hr_employee_firstname/i18n/hr_HR.po | 3 +-
.../i18n/hr_employee_firstname.pot | 11 +-
hr_employee_firstname/i18n/it.po | 3 +-
hr_employee_firstname/i18n/lt.po | 3 +-
hr_employee_firstname/i18n/nl_NL.po | 3 +-
hr_employee_firstname/i18n/pt_BR.po | 7 +-
hr_employee_firstname/i18n/ro.po | 3 +-
hr_employee_firstname/i18n/sl.po | 3 +-
hr_employee_firstname/init_hook.py | 2 +-
hr_employee_firstname/models/hr_employee.py | 65 +++++----
.../static/description/index.html | 6 +-
.../tests/test_hr_employee_firstname.py | 130 +++++++++---------
22 files changed, 144 insertions(+), 168 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index da47e955dda..2e1823fe949 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -14,13 +14,13 @@ HR Employee First Name, Last Name
: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_firstname
+ :target: https://github.com/OCA/hr/tree/13.0/hr_employee_firstname
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/hr-12-0/hr-12-0-hr_employee_firstname
+ :target: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_firstname
: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|
@@ -45,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
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -83,6 +83,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_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index f706bdef773..f8c1d5c3914 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -2,24 +2,19 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
- 'name': 'HR Employee First Name, Last Name',
- 'version': '13.0.1.0.0',
- 'author': 'Savoir-faire Linux, '
- 'Fekete Mihai (Forest and Biomass Services Romania), '
- 'Onestein, '
- 'Odoo Community Association (OCA)',
- 'maintainer': 'Savoir-faire Linux',
- 'website': 'https://github.com/OCA/hr/',
- 'license': 'AGPL-3',
- 'category': 'Human Resources',
- 'summary': 'Adds First Name to Employee',
- 'depends': [
- 'hr',
- 'partner_firstname',
- ],
- 'data': [
- 'views/hr_view.xml',
- ],
- 'post_init_hook': 'post_init_hook',
- 'installable': True,
+ "name": "HR Employee First Name, Last Name",
+ "version": "13.0.1.0.0",
+ "author": "Savoir-faire Linux, "
+ "Fekete Mihai (Forest and Biomass Services Romania), "
+ "Onestein, "
+ "Odoo Community Association (OCA)",
+ "maintainer": "Savoir-faire Linux",
+ "website": "https://github.com/OCA/hr/",
+ "license": "AGPL-3",
+ "category": "Human Resources",
+ "summary": "Adds First Name to Employee",
+ "depends": ["hr", "partner_firstname"],
+ "data": ["views/hr_view.xml"],
+ "post_init_hook": "post_init_hook",
+ "installable": True,
}
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index 0f37b82c8f4..dd62ab1544b 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr "إسم العائلة"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index 83953f6a20c..0821386a2b3 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index e3ef06fa63a..555d1aba5e8 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "Nachname"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Es wurde kein Name eingetragen."
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index dc8a206d234..446782a31dd 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "Apellidos"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Sin nombre establecido."
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index e0307a61306..75103b6fa81 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "نام خانوادگی"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index 1c3d4fdc7c3..26776a7b350 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -34,8 +34,7 @@ msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index 824224d8994..c71042c1795 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -34,8 +34,7 @@ msgid "Lastname"
msgstr "Nom"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 4e8b67901ca..21735cd48ed 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -16,8 +16,8 @@ msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<="
-"4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
+"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
#. module: hr_employee_firstname
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr "Prezime"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Ime nije postavljeno."
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index 671ec19e5cf..ee9db8de9a8 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index c04e9416b56..5d4bd4dd418 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -1,12 +1,12 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
-# * hr_employee_firstname
+# * hr_employee_firstname
#
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"
@@ -29,9 +29,8 @@ msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
-
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index f8fa6419c5a..515c2d99b56 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -34,8 +34,7 @@ msgid "Lastname"
msgstr "Cognome"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index c9764267ffb..e8d0009a8a6 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 23802eb275d..a50b77e31dd 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "Achternaam"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index 1864cebab62..dd7f85c8f6f 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2019-08-30 13:23+0000\n"
"Last-Translator: Rodrigo Macedo \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
-"23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -36,8 +36,7 @@ msgid "Lastname"
msgstr "Último nome"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Sem nome estabelecido."
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index 66858e8e175..400143bf80c 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "Nume"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index 546f2949eaf..fb8a8c64bfc 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -35,8 +35,7 @@ msgid "Lastname"
msgstr "Priimek"
#. module: hr_employee_firstname
-#: code:addons/hr_employee_firstname/models/hr_employee.py:39
-#: code:addons/hr_employee_firstname/models/hr_employee.py:107
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
index 083bf7c87a4..29835ddbb4d 100644
--- a/hr_employee_firstname/init_hook.py
+++ b/hr_employee_firstname/init_hook.py
@@ -8,4 +8,4 @@
def post_init_hook(cr, _):
with Environment.manage():
env = Environment(cr, SUPERUSER_ID, {})
- env['hr.employee']._install_employee_firstname()
+ env["hr.employee"]._install_employee_firstname()
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 05069af1f64..ce13ff4089e 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -4,22 +4,22 @@
import logging
-from odoo import api, fields, models, _
+from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
-UPDATE_PARTNER_FIELDS = ['firstname', 'lastname', 'user_id', 'address_home_id']
+UPDATE_PARTNER_FIELDS = ["firstname", "lastname", "user_id", "address_home_id"]
class HrEmployee(models.Model):
- _inherit = 'hr.employee'
+ _inherit = "hr.employee"
@api.model
def _get_name(self, lastname, firstname):
- return self.env['res.partner']._get_computed_name(lastname, firstname)
+ return self.env["res.partner"]._get_computed_name(lastname, firstname)
- @api.onchange('firstname', 'lastname')
+ @api.onchange("firstname", "lastname")
def _onchange_firstname_lastname(self):
if self.firstname or self.lastname:
self.name = self._get_name(self.lastname, self.firstname)
@@ -29,32 +29,31 @@ def _onchange_firstname_lastname(self):
@api.model
def create(self, vals):
- if vals.get('firstname') or vals.get('lastname'):
- vals['name'] = self._get_name(
- vals.get('lastname'), vals.get('firstname'))
- elif vals.get('name'):
- vals['lastname'] = self.split_name(vals['name'])['lastname']
- vals['firstname'] = self.split_name(vals['name'])['firstname']
+ if vals.get("firstname") or vals.get("lastname"):
+ vals["name"] = self._get_name(vals.get("lastname"), vals.get("firstname"))
+ elif vals.get("name"):
+ vals["lastname"] = self.split_name(vals["name"])["lastname"]
+ vals["firstname"] = self.split_name(vals["name"])["firstname"]
else:
- raise ValidationError(_('No name set.'))
+ raise ValidationError(_("No name set."))
res = super().create(vals)
res._update_partner_firstname()
return res
def write(self, vals):
- if 'firstname' in vals or 'lastname' in vals:
- if 'lastname' in vals:
- lastname = vals.get('lastname')
+ if "firstname" in vals or "lastname" in vals:
+ if "lastname" in vals:
+ lastname = vals.get("lastname")
else:
lastname = self.lastname
- if 'firstname' in vals:
- firstname = vals.get('firstname')
+ if "firstname" in vals:
+ firstname = vals.get("firstname")
else:
firstname = self.firstname
- vals['name'] = self._get_name(lastname, firstname)
- elif vals.get('name'):
- vals['lastname'] = self.split_name(vals['name'])['lastname']
- vals['firstname'] = self.split_name(vals['name'])['firstname']
+ vals["name"] = self._get_name(lastname, firstname)
+ elif vals.get("name"):
+ vals["lastname"] = self.split_name(vals["name"])["lastname"]
+ vals["firstname"] = self.split_name(vals["name"])["firstname"]
res = super().write(vals)
if set(vals).intersection(UPDATE_PARTNER_FIELDS):
self._update_partner_firstname()
@@ -63,14 +62,14 @@ def write(self, vals):
@api.model
def split_name(self, name):
clean_name = " ".join(name.split(None)) if name else name
- return self.env['res.partner']._get_inverse_name(clean_name)
+ return self.env["res.partner"]._get_inverse_name(clean_name)
def _inverse_name(self):
"""Try to revert the effect of :meth:`._compute_name`."""
for record in self:
- parts = self.env['res.partner']._get_inverse_name(record.name)
- record.lastname = parts['lastname']
- record.firstname = parts['firstname']
+ parts = self.env["res.partner"]._get_inverse_name(record.name)
+ record.lastname = parts["lastname"]
+ record.firstname = parts["firstname"]
@api.model
def _install_employee_firstname(self):
@@ -81,8 +80,7 @@ def _install_employee_firstname(self):
correctly into the database. This can be called later too if needed.
"""
# Find records with empty firstname and lastname
- records = self.search([("firstname", "=", False),
- ("lastname", "=", False)])
+ records = self.search([("firstname", "=", False), ("lastname", "=", False)])
# Force calculations there
records._inverse_name()
@@ -90,16 +88,15 @@ def _install_employee_firstname(self):
def _update_partner_firstname(self):
for employee in self:
- partners = employee.mapped('user_id.partner_id')
- partners |= employee.mapped('address_home_id')
- partners.write({
- 'firstname': employee.firstname,
- 'lastname': employee.lastname,
- })
+ partners = employee.mapped("user_id.partner_id")
+ partners |= employee.mapped("address_home_id")
+ partners.write(
+ {"firstname": employee.firstname, "lastname": employee.lastname}
+ )
@api.constrains("firstname", "lastname")
def _check_name(self):
"""Ensure at least one name is set."""
for record in self:
if not (record.firstname or record.lastname):
- raise ValidationError(_('No name set.'))
+ raise ValidationError(_("No name set."))
diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
index 049004724d1..d2e40beb27f 100644
--- a/hr_employee_firstname/static/description/index.html
+++ b/hr_employee_firstname/static/description/index.html
@@ -367,7 +367,7 @@ HR Employee First Name, Last Name
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
Table of contents
@@ -393,7 +393,7 @@
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.
@@ -425,7 +425,7 @@
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_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 2c11d5815ed..af4aabcbbcd 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -13,21 +13,23 @@ def setUp(self):
# Create 3 employees to concatenate the firstname and lastname
# in name_related
- self.employee1_id = self.env['hr.employee'].create(
- {'firstname': 'Jan', 'lastname': 'Van-Eyck'})
- self.employee2_id = self.env['hr.employee'].create(
- {'firstname': 'Jean-Pierre', 'lastname': 'Carnaud'})
- self.employee3_id = self.env['hr.employee'].create(
- {'firstname': 'Famke', 'lastname': 'Jenssens'})
+ self.employee1_id = self.env["hr.employee"].create(
+ {"firstname": "Jan", "lastname": "Van-Eyck"}
+ )
+ self.employee2_id = self.env["hr.employee"].create(
+ {"firstname": "Jean-Pierre", "lastname": "Carnaud"}
+ )
+ self.employee3_id = self.env["hr.employee"].create(
+ {"firstname": "Famke", "lastname": "Jenssens"}
+ )
# Create 3 employees for split the name_related to
# firstname and lastname
- self.employee10_id = self.env['hr.employee'].create(
- {'name': ' Jan Van-Eyck'})
- self.employee20_id = self.env['hr.employee'].create(
- {'name': 'Jean-Pierre Carnaud'})
- self.employee30_id = self.env['hr.employee'].create(
- {'name': 'JenssensFamke'})
+ self.employee10_id = self.env["hr.employee"].create({"name": " Jan Van-Eyck"})
+ self.employee20_id = self.env["hr.employee"].create(
+ {"name": "Jean-Pierre Carnaud"}
+ )
+ self.employee30_id = self.env["hr.employee"].create({"name": "JenssensFamke"})
def test_get_name(self):
"""
@@ -35,34 +37,35 @@ def test_get_name(self):
the firstname and lastname
"""
# Check for employee1
- self.assertEqual(self.employee1_id.name, 'Jan Van-Eyck')
+ self.assertEqual(self.employee1_id.name, "Jan Van-Eyck")
# Check for employee2
- self.assertEqual(self.employee2_id.name, 'Jean-Pierre Carnaud')
+ self.assertEqual(self.employee2_id.name, "Jean-Pierre Carnaud")
# Check for employee3
- self.assertEqual(self.employee3_id.name, 'Famke Jenssens')
+ self.assertEqual(self.employee3_id.name, "Famke Jenssens")
def test_onchange(self):
"""
Validate the get_name method is not failing
"""
- field_onchange = self.env['hr.employee'].new({})._onchange_spec()
- self.assertEqual(field_onchange.get('firstname'), '1')
- self.assertEqual(field_onchange.get('lastname'), '1')
- values = {'firstname': 'Antonio',
- 'lastname': 'Esposito',
- 'name': 'test employee'}
- for field in self.env['hr.employee']._fields:
+ field_onchange = self.env["hr.employee"].new({})._onchange_spec()
+ self.assertEqual(field_onchange.get("firstname"), "1")
+ self.assertEqual(field_onchange.get("lastname"), "1")
+ values = {
+ "firstname": "Antonio",
+ "lastname": "Esposito",
+ "name": "test employee",
+ }
+ for field in self.env["hr.employee"]._fields:
if field not in values:
values[field] = False
# we work on a temporary record
- new_record = self.env['hr.employee'].new(values)
+ new_record = self.env["hr.employee"].new(values)
- updates = new_record.onchange(
- values, ['firstname', 'lastname'], field_onchange)
- values.update(updates.get('value', {}))
- self.assertEqual(values['name'], 'Antonio Esposito')
+ updates = new_record.onchange(values, ["firstname", "lastname"], field_onchange)
+ values.update(updates.get("value", {}))
+ self.assertEqual(values["name"], "Antonio Esposito")
def test_auto_init_name(self):
"""
@@ -70,82 +73,79 @@ def test_auto_init_name(self):
in firstname and lastname
"""
# Check for employee10
- self.assertEqual(self.employee10_id.firstname, 'Jan')
- self.assertEqual(self.employee10_id.lastname, 'Van-Eyck')
+ self.assertEqual(self.employee10_id.firstname, "Jan")
+ self.assertEqual(self.employee10_id.lastname, "Van-Eyck")
# Check for employee20
- self.assertEqual(self.employee20_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee20_id.lastname, 'Carnaud')
+ self.assertEqual(self.employee20_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee20_id.lastname, "Carnaud")
# Check for employee30
self.assertEqual(self.employee30_id.firstname, False)
- self.assertEqual(self.employee30_id.lastname, 'JenssensFamke')
+ self.assertEqual(self.employee30_id.lastname, "JenssensFamke")
def test_change_name(self):
- self.employee1_id.write({'name': 'Jean-Pierre Carnaud-Eyck'})
+ self.employee1_id.write({"name": "Jean-Pierre Carnaud-Eyck"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+ self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
def test_change_name_with_space(self):
- self.employee1_id.write({'name': ' Jean-Pierre Carnaud-Eyck'})
+ self.employee1_id.write({"name": " Jean-Pierre Carnaud-Eyck"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+ self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
def test_change_firstname(self):
- self.employee1_id.write({'firstname': 'Jean-Pierre'})
+ self.employee1_id.write({"firstname": "Jean-Pierre"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jean-Pierre Van-Eyck')
+ self.assertEqual(self.employee1_id.name, "Jean-Pierre Van-Eyck")
def test_change_lastname(self):
- self.employee1_id.write({'lastname': 'Carnaud'})
+ self.employee1_id.write({"lastname": "Carnaud"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jan Carnaud')
+ self.assertEqual(self.employee1_id.name, "Jan Carnaud")
def test_change_firstname_and_lastname(self):
- self.employee1_id.write({
- 'firstname': 'Jean-Pierre',
- 'lastname': 'Carnaud'})
+ self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Jean-Pierre Carnaud')
+ self.assertEqual(self.employee1_id.name, "Jean-Pierre Carnaud")
def test_lastname_firstname(self):
- self.env['ir.config_parameter'].sudo().set_param(
- 'partner_names_order', 'last_first')
+ self.env["ir.config_parameter"].sudo().set_param(
+ "partner_names_order", "last_first"
+ )
- self.employee1_id.write({'name': 'Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.write({"name": "Carnaud-Eyck Jean-Pierre"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+ self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
- self.employee1_id.write({'name': ' Carnaud-Eyck Jean-Pierre'})
+ self.employee1_id.write({"name": " Carnaud-Eyck Jean-Pierre"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.firstname, 'Jean-Pierre')
- self.assertEqual(self.employee1_id.lastname, 'Carnaud-Eyck')
+ self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
- self.employee1_id.write({
- 'firstname': 'Jean-Pierre',
- 'lastname': 'Carnaud'})
+ self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
self.employee1_id.refresh()
- self.assertEqual(self.employee1_id.name, 'Carnaud Jean-Pierre')
+ self.assertEqual(self.employee1_id.name, "Carnaud Jean-Pierre")
@odoo.tests.common.at_install(False)
@odoo.tests.common.post_install(True)
def test_update_name_post_install(self):
- empl_demo = self.env.ref('hr.employee_admin')
+ empl_demo = self.env.ref("hr.employee_admin")
- self.assertEqual(empl_demo.firstname, 'Mitchell')
- self.assertEqual(empl_demo.lastname, 'Admin')
+ self.assertEqual(empl_demo.firstname, "Mitchell")
+ self.assertEqual(empl_demo.lastname, "Admin")
def test_no_name(self):
- self.env['hr.employee'].create({'firstname': 'test'})
- self.env['hr.employee'].create({'lastname': 'test'})
- self.env['hr.employee'].create({'name': 'test'})
+ self.env["hr.employee"].create({"firstname": "test"})
+ self.env["hr.employee"].create({"lastname": "test"})
+ self.env["hr.employee"].create({"name": "test"})
with self.assertRaises(ValidationError):
- self.env['hr.employee'].create({})
+ self.env["hr.employee"].create({})
From e5b43baf5874d738ffc800138ff411f33fe753ce Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sat, 14 Mar 2020 12:00:04 +0100
Subject: [PATCH 15/42] pre-commit update
---
hr_employee_firstname/views/hr_view.xml | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/hr_employee_firstname/views/hr_view.xml b/hr_employee_firstname/views/hr_view.xml
index b23d44bf9b5..1eded2cd101 100644
--- a/hr_employee_firstname/views/hr_view.xml
+++ b/hr_employee_firstname/views/hr_view.xml
@@ -1,9 +1,8 @@
-
+
-
hr.employee
-
+
1
@@ -12,11 +11,16 @@
-
-
+
+
-
From a70ba24dce74dfbef5ff9f5f75b808fa0c8b0e89 Mon Sep 17 00:00:00 2001
From: Saran440
Date: Thu, 26 Mar 2020 10:30:43 +0700
Subject: [PATCH 16/42] [13.0][FIX] hr_employee_firstname : testscript
---
hr_employee_firstname/tests/test_hr_employee_firstname.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index af4aabcbbcd..3a9dc71a38c 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -149,3 +149,7 @@ def test_no_name(self):
self.env["hr.employee"].create({"name": "test"})
with self.assertRaises(ValidationError):
self.env["hr.employee"].create({})
+
+ def test_no_firstname_and_lastname(self):
+ with self.assertRaises(ValidationError):
+ self.employee1_id.write({"firstname": "", "lastname": ""})
From f070a6f9e7286732c5879911c4d9d42c5f4f5609 Mon Sep 17 00:00:00 2001
From: Andrea
Date: Thu, 27 Aug 2020 09:23:17 +0200
Subject: [PATCH 17/42] [IMP] hr_employee_firstname: ease extension
---
hr_employee_firstname/models/hr_employee.py | 22 +++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index ce13ff4089e..cfd7cfa0465 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -29,6 +29,19 @@ def _onchange_firstname_lastname(self):
@api.model
def create(self, vals):
+ self._prepare_vals_on_create_firstname_lastname(vals)
+ res = super().create(vals)
+ res._update_partner_firstname()
+ return res
+
+ def write(self, vals):
+ self._prepare_vals_on_write_firstname_lastname(vals)
+ res = super().write(vals)
+ if set(vals).intersection(UPDATE_PARTNER_FIELDS):
+ self._update_partner_firstname()
+ return res
+
+ def _prepare_vals_on_create_firstname_lastname(self, vals):
if vals.get("firstname") or vals.get("lastname"):
vals["name"] = self._get_name(vals.get("lastname"), vals.get("firstname"))
elif vals.get("name"):
@@ -36,11 +49,8 @@ def create(self, vals):
vals["firstname"] = self.split_name(vals["name"])["firstname"]
else:
raise ValidationError(_("No name set."))
- res = super().create(vals)
- res._update_partner_firstname()
- return res
- def write(self, vals):
+ def _prepare_vals_on_write_firstname_lastname(self, vals):
if "firstname" in vals or "lastname" in vals:
if "lastname" in vals:
lastname = vals.get("lastname")
@@ -54,10 +64,6 @@ def write(self, vals):
elif vals.get("name"):
vals["lastname"] = self.split_name(vals["name"])["lastname"]
vals["firstname"] = self.split_name(vals["name"])["firstname"]
- res = super().write(vals)
- if set(vals).intersection(UPDATE_PARTNER_FIELDS):
- self._update_partner_firstname()
- return res
@api.model
def split_name(self, name):
From 20f63850942f2065892f94a6467cf019c9bf5263 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Tue, 1 Sep 2020 21:26:01 +0000
Subject: [PATCH 18/42] hr_employee_firstname 13.0.1.0.1
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/ar.po | 14 ++++++++++----
hr_employee_firstname/i18n/cs_CZ.po | 4 ++--
hr_employee_firstname/i18n/de.po | 14 ++++++++++----
hr_employee_firstname/i18n/es.po | 14 ++++++++++----
hr_employee_firstname/i18n/fa.po | 14 ++++++++++----
hr_employee_firstname/i18n/fi.po | 4 ++--
hr_employee_firstname/i18n/fr.po | 14 ++++++++++----
hr_employee_firstname/i18n/hr.po | 14 ++++++++++----
hr_employee_firstname/i18n/hr_HR.po | 4 ++--
.../i18n/hr_employee_firstname.pot | 4 ++--
hr_employee_firstname/i18n/it.po | 14 ++++++++++----
hr_employee_firstname/i18n/lt.po | 4 ++--
hr_employee_firstname/i18n/nl_NL.po | 14 ++++++++++----
hr_employee_firstname/i18n/pt_BR.po | 14 ++++++++++----
hr_employee_firstname/i18n/ro.po | 14 ++++++++++----
hr_employee_firstname/i18n/sl.po | 14 ++++++++++----
17 files changed, 121 insertions(+), 55 deletions(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index f8c1d5c3914..45017bc8e4a 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "13.0.1.0.0",
+ "version": "13.0.1.0.1",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index dd62ab1544b..4e5aeab0dda 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -27,16 +27,22 @@ msgstr "الموظف"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "الإسم الأول"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "إسم العائلة"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "الإسم الأول"
+
+#~ msgid "Lastname"
+#~ msgstr "إسم العائلة"
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index 0821386a2b3..a226dcb4505 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -27,12 +27,12 @@ msgstr "Zaměstnanec"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 555d1aba5e8..058096989a9 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -26,16 +26,22 @@ msgstr "Mitarbeiter"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Vorname"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Nachname"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Es wurde kein Name eingetragen."
+
+#~ msgid "Firstname"
+#~ msgstr "Vorname"
+
+#~ msgid "Lastname"
+#~ msgstr "Nachname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 446782a31dd..229bb6fd81c 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -26,16 +26,22 @@ msgstr "Empleado"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Nombre propio"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Apellidos"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Sin nombre establecido."
+
+#~ msgid "Firstname"
+#~ msgstr "Nombre propio"
+
+#~ msgid "Lastname"
+#~ msgstr "Apellidos"
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index 75103b6fa81..605e277dae1 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -26,16 +26,22 @@ msgstr "کارمند"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "نام"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "نام خانوادگی"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "نام"
+
+#~ msgid "Lastname"
+#~ msgstr "نام خانوادگی"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index 26776a7b350..b7b09fc3741 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -25,12 +25,12 @@ msgstr "Työntekijä"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index c71042c1795..02f488ebbb1 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -25,16 +25,22 @@ msgstr "Employé"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Prénom"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Nom"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Prénom"
+
+#~ msgid "Lastname"
+#~ msgstr "Nom"
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 21735cd48ed..2b94780248d 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -27,16 +27,22 @@ msgstr "Djelatnik"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Ime"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Prezime"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Ime nije postavljeno."
+
+#~ msgid "Firstname"
+#~ msgstr "Ime"
+
+#~ msgid "Lastname"
+#~ msgstr "Prezime"
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index ee9db8de9a8..aa98ee8f3e7 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -27,12 +27,12 @@ msgstr "Djelatnik"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index 5d4bd4dd418..a4bb42af2b3 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -20,12 +20,12 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index 515c2d99b56..fc5b3de7d69 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -25,16 +25,22 @@ msgstr "Dipendente"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Nome"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Cognome"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Nome"
+
+#~ msgid "Lastname"
+#~ msgstr "Cognome"
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index e8d0009a8a6..b7d1e997292 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -27,12 +27,12 @@ msgstr "Darbuotojas"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index a50b77e31dd..2daacd7ea29 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -26,16 +26,22 @@ msgstr "Werknemer"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Voornaam"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Achternaam"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Voornaam"
+
+#~ msgid "Lastname"
+#~ msgstr "Achternaam"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index dd7f85c8f6f..b34fe1413b8 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -27,16 +27,22 @@ msgstr "Empregado"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Primeiro nome"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Último nome"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "Sem nome estabelecido."
+
+#~ msgid "Firstname"
+#~ msgstr "Primeiro nome"
+
+#~ msgid "Lastname"
+#~ msgstr "Último nome"
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index 400143bf80c..796a99a4512 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -26,16 +26,22 @@ msgstr "Angajat"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Prenume"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Nume"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Prenume"
+
+#~ msgid "Lastname"
+#~ msgstr "Nume"
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index fb8a8c64bfc..3a236d9fb01 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -26,16 +26,22 @@ msgstr "Kader"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
-msgid "Firstname"
-msgstr "Ime"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
-msgid "Lastname"
-msgstr "Priimek"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Ime"
+
+#~ msgid "Lastname"
+#~ msgstr "Priimek"
From 4bcfc4f3cc2e844a56d1eb2eb4e066978b932faf Mon Sep 17 00:00:00 2001
From: Luis Torres
Date: Mon, 12 Oct 2020 23:52:48 +0000
Subject: [PATCH 19/42] [MIG] hr_employee_firstname: Migration to 14.0
---
hr_employee_firstname/README.rst | 10 +++++-----
hr_employee_firstname/__manifest__.py | 2 +-
.../i18n/hr_employee_firstname.pot | 17 ++++++++++++++++-
.../static/description/index.html | 6 +++---
.../tests/test_hr_employee_firstname.py | 3 +--
5 files changed, 26 insertions(+), 12 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index 2e1823fe949..d1ee27e7458 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -14,13 +14,13 @@ HR Employee First Name, Last Name
: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_firstname
+ :target: https://github.com/OCA/hr/tree/14.0/hr_employee_firstname
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/hr-13-0/hr-13-0-hr_employee_firstname
+ :target: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_firstname
: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|
@@ -45,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
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -83,6 +83,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_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 45017bc8e4a..53829e62e99 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "13.0.1.0.1",
+ "version": "14.0.1.0.0",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index a4bb42af2b3..fe01a397f6a 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.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"
@@ -13,6 +13,11 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -23,6 +28,16 @@ msgstr ""
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Last name"
diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
index d2e40beb27f..e4fed311595 100644
--- a/hr_employee_firstname/static/description/index.html
+++ b/hr_employee_firstname/static/description/index.html
@@ -367,7 +367,7 @@ HR Employee First Name, Last Name
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
Table of contents
@@ -393,7 +393,7 @@
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.
@@ -425,7 +425,7 @@
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_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index 3a9dc71a38c..d14e3f64785 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -135,8 +135,7 @@ def test_lastname_firstname(self):
self.employee1_id.refresh()
self.assertEqual(self.employee1_id.name, "Carnaud Jean-Pierre")
- @odoo.tests.common.at_install(False)
- @odoo.tests.common.post_install(True)
+ @odoo.tests.tagged("-at_install", "post_install")
def test_update_name_post_install(self):
empl_demo = self.env.ref("hr.employee_admin")
From aba958f851bc999a33c18888ac899ec20d91397d Mon Sep 17 00:00:00 2001
From: Luis Escobar
Date: Wed, 28 Oct 2020 14:14:29 +0000
Subject: [PATCH 20/42] [REF] hr_employee_firstname: Removed partner_firstname
dependency
---
hr_employee_firstname/__manifest__.py | 4 +-
hr_employee_firstname/i18n/es.po | 6 ++
hr_employee_firstname/models/__init__.py | 2 +-
.../models/base_config_settings.py | 31 +++++++
hr_employee_firstname/models/hr_employee.py | 84 +++++++++++++++++--
.../tests/test_hr_employee_firstname.py | 21 ++++-
.../views/base_config_view.xml | 20 +++++
7 files changed, 159 insertions(+), 9 deletions(-)
create mode 100644 hr_employee_firstname/models/base_config_settings.py
create mode 100644 hr_employee_firstname/views/base_config_view.xml
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 53829e62e99..82118364d31 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -13,8 +13,8 @@
"license": "AGPL-3",
"category": "Human Resources",
"summary": "Adds First Name to Employee",
- "depends": ["hr", "partner_firstname"],
- "data": ["views/hr_view.xml"],
+ "depends": ["hr"],
+ "data": ["views/hr_view.xml", "views/base_config_view.xml"],
"post_init_hook": "post_init_hook",
"installable": True,
}
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 229bb6fd81c..0007bb3d400 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -24,6 +24,12 @@ msgstr ""
msgid "Employee"
msgstr "Empleado"
+#. module: hr_employee_firstname
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Employee Names Order"
+msgstr "Orden de los Nombres de Empleados"
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "First name"
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index b29f8d49334..a28442fbae1 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,3 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
-
+from . import base_config_settings
from . import hr_employee
diff --git a/hr_employee_firstname/models/base_config_settings.py b/hr_employee_firstname/models/base_config_settings.py
new file mode 100644
index 00000000000..ad8e6515a57
--- /dev/null
+++ b/hr_employee_firstname/models/base_config_settings.py
@@ -0,0 +1,31 @@
+# Copyright 2015 Antiun Ingenieria S.L. - Antonio Espinosa
+# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
+
+import logging
+
+from odoo import fields, models
+
+_logger = logging.getLogger(__name__)
+
+
+class ResConfigSettings(models.TransientModel):
+ _inherit = "res.config.settings"
+
+ employee_names_order = fields.Selection(
+ string="Employee Names Order",
+ selection="_employee_names_order_selection",
+ help="Order to compose employee fullname",
+ config_parameter="employee_names_order",
+ default=lambda a: a._employee_names_order_default(),
+ required=True,
+ )
+
+ def _employee_names_order_selection(self):
+ return [
+ ("last_first", "Lastname Firstname"),
+ ("last_first_comma", "Lastname, Firstname"),
+ ("first_last", "Firstname Lastname"),
+ ]
+
+ def _employee_names_order_default(self):
+ return self.env["hr.employee"]._names_order_default()
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index cfd7cfa0465..1f4580026e3 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -15,9 +15,30 @@
class HrEmployee(models.Model):
_inherit = "hr.employee"
+ @api.model
+ def _names_order_default(self):
+ return "first_last"
+
+ @api.model
+ def _get_names_order(self):
+ """Get names order configuration from system parameters.
+ You can override this method to read configuration from language,
+ country, company or other"""
+ return (
+ self.env["ir.config_parameter"]
+ .sudo()
+ .get_param("employee_names_order", self._names_order_default())
+ )
+
@api.model
def _get_name(self, lastname, firstname):
- return self.env["res.partner"]._get_computed_name(lastname, firstname)
+ order = self._get_names_order()
+ if order == "last_first_comma":
+ return ", ".join(p for p in (lastname, firstname) if p)
+ elif order == "first_last":
+ return " ".join(p for p in (firstname, lastname) if p)
+ else:
+ return " ".join(p for p in (lastname, firstname) if p)
@api.onchange("firstname", "lastname")
def _onchange_firstname_lastname(self):
@@ -27,17 +48,28 @@ def _onchange_firstname_lastname(self):
firstname = fields.Char()
lastname = fields.Char()
+ @api.model
+ def _is_partner_firstname_installed(self):
+ return bool(
+ self.env["ir.module.module"].search(
+ [("name", "=", "partner_firstname"), ("state", "=", "installed")]
+ )
+ )
+
@api.model
def create(self, vals):
self._prepare_vals_on_create_firstname_lastname(vals)
res = super().create(vals)
- res._update_partner_firstname()
+ if self._is_partner_firstname_installed():
+ res._update_partner_firstname()
return res
def write(self, vals):
self._prepare_vals_on_write_firstname_lastname(vals)
res = super().write(vals)
- if set(vals).intersection(UPDATE_PARTNER_FIELDS):
+ if self._is_partner_firstname_installed() and set(vals).intersection(
+ UPDATE_PARTNER_FIELDS
+ ):
self._update_partner_firstname()
return res
@@ -65,15 +97,57 @@ def _prepare_vals_on_write_firstname_lastname(self, vals):
vals["lastname"] = self.split_name(vals["name"])["lastname"]
vals["firstname"] = self.split_name(vals["name"])["firstname"]
+ @api.model
+ def _get_whitespace_cleaned_name(self, name, comma=False):
+ """Remove redundant whitespace from :param:`name`.
+
+ Removes leading, trailing and duplicated whitespace.
+ """
+ try:
+ name = " ".join(name.split()) if name else name
+ except UnicodeDecodeError:
+ name = " ".join(name.decode("utf-8").split()) if name else name
+
+ if comma:
+ name = name.replace(" ,", ",").replace(", ", ",")
+ return name
+
+ @api.model
+ def _get_inverse_name(self, name):
+ """Compute the inverted name.
+
+ This method can be easily overriden by other submodules.
+ You can also override this method to change the order of name's
+ attributes
+
+ When this method is called, :attr:`~.name` already has unified and
+ trimmed whitespace.
+ """
+ order = self._get_names_order()
+ # Remove redundant spaces
+ name = self._get_whitespace_cleaned_name(
+ name, comma=(order == "last_first_comma")
+ )
+ parts = name.split("," if order == "last_first_comma" else " ", 1)
+ if len(parts) > 1:
+ if order == "first_last":
+ parts = [" ".join(parts[1:]), parts[0]]
+ else:
+ parts = [parts[0], " ".join(parts[1:])]
+ else:
+ while len(parts) < 2:
+ parts.append(False)
+ return {"lastname": parts[0], "firstname": parts[1]}
+
@api.model
def split_name(self, name):
clean_name = " ".join(name.split(None)) if name else name
- return self.env["res.partner"]._get_inverse_name(clean_name)
+ return self._get_inverse_name(clean_name)
def _inverse_name(self):
"""Try to revert the effect of :meth:`._compute_name`."""
for record in self:
- parts = self.env["res.partner"]._get_inverse_name(record.name)
+ parts = self._get_inverse_name(record.name)
record.lastname = parts["lastname"]
record.firstname = parts["firstname"]
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index d14e3f64785..dc872e8ddc4 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -118,7 +118,7 @@ def test_change_firstname_and_lastname(self):
def test_lastname_firstname(self):
self.env["ir.config_parameter"].sudo().set_param(
- "partner_names_order", "last_first"
+ "employee_names_order", "last_first"
)
self.employee1_id.write({"name": "Carnaud-Eyck Jean-Pierre"})
@@ -152,3 +152,22 @@ def test_no_name(self):
def test_no_firstname_and_lastname(self):
with self.assertRaises(ValidationError):
self.employee1_id.write({"firstname": "", "lastname": ""})
+
+ def test_change_firstname_and_lastname_with_set_last_first_comma(self):
+ self.env["ir.config_parameter"].sudo().set_param(
+ "employee_names_order", "last_first_comma"
+ )
+ self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.name, "Carnaud, Jean-Pierre")
+
+ def test_change_name_with_space_with_set_last_first_comma(self):
+ self.env["ir.config_parameter"].sudo().set_param(
+ "employee_names_order", "last_first_comma"
+ )
+ self.employee1_id.write({"name": " Carnaud-Eyck, Jean-Pierre"})
+ self.employee1_id.refresh()
+
+ self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
+ self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
diff --git a/hr_employee_firstname/views/base_config_view.xml b/hr_employee_firstname/views/base_config_view.xml
new file mode 100644
index 00000000000..02b92938d4d
--- /dev/null
+++ b/hr_employee_firstname/views/base_config_view.xml
@@ -0,0 +1,20 @@
+
+
+
+ Add employee_names_order config parameter
+ res.config.settings
+
+
+
+ Employee Names Order
+
+
+
+
+
From eaca36188991cc84fc80c3e5feb5c43b3a473b23 Mon Sep 17 00:00:00 2001
From: oca-git-bot
Date: Sun, 1 Nov 2020 21:52:06 +0100
Subject: [PATCH 21/42] [IMP] update dotfiles [ci skip]
---
hr_employee_firstname/__manifest__.py | 2 +-
.../i18n/hr_employee_firstname.pot | 19 +++++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 82118364d31..4165bdddc2b 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -9,7 +9,7 @@
"Onestein, "
"Odoo Community Association (OCA)",
"maintainer": "Savoir-faire Linux",
- "website": "https://github.com/OCA/hr/",
+ "website": "https://github.com/OCA/hr",
"license": "AGPL-3",
"category": "Human Resources",
"summary": "Adds First Name to Employee",
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index fe01a397f6a..b3bed042e55 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -13,8 +13,14 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
msgid "Display Name"
msgstr ""
@@ -23,6 +29,12 @@ msgstr ""
msgid "Employee"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "First name"
@@ -30,11 +42,13 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
msgid "ID"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr ""
@@ -49,3 +63,8 @@ msgstr ""
#, python-format
msgid "No name set."
msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
From b2f54d2e219ac06e41115fc9221c2cb29030a27d Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Mon, 2 Nov 2020 16:45:32 +0000
Subject: [PATCH 22/42] hr_employee_firstname 14.0.2.0.0
---
hr_employee_firstname/__manifest__.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 4165bdddc2b..e304331e62a 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "14.0.1.0.0",
+ "version": "14.0.2.0.0",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
From 28f555e9c1a592fd0f69f69037fcb1162a35e28c Mon Sep 17 00:00:00 2001
From: Luis Torres
Date: Tue, 16 Feb 2021 20:39:35 +0000
Subject: [PATCH 23/42] [FIX] hr_employee_firstname: Avoid access error on
employee update
``sudo`` is used to avoid access error when verify that module is installed.
Avoid error in the next case:
1. Create a new user without settings access (HR User)
2. Login with the user in 1, and try to edit an employee
---
hr_employee_firstname/models/hr_employee.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index 1f4580026e3..e330fabd5ba 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -51,9 +51,9 @@ def _onchange_firstname_lastname(self):
@api.model
def _is_partner_firstname_installed(self):
return bool(
- self.env["ir.module.module"].search(
- [("name", "=", "partner_firstname"), ("state", "=", "installed")]
- )
+ self.env["ir.module.module"]
+ .sudo()
+ .search([("name", "=", "partner_firstname"), ("state", "=", "installed")])
)
@api.model
From 67b941134e9c51fab039d8d9668501a662e91bba Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 17 Feb 2021 17:29:56 +0000
Subject: [PATCH 24/42] hr_employee_firstname 14.0.2.0.1
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/ca.po | 73 +++++++++++++++++++++++++++
hr_employee_firstname/i18n/pt_BR.po | 18 +++----
3 files changed, 83 insertions(+), 10 deletions(-)
create mode 100644 hr_employee_firstname/i18n/ca.po
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index e304331e62a..5d284466e73 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "14.0.2.0.0",
+ "version": "14.0.2.0.1",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/ca.po b/hr_employee_firstname/i18n/ca.po
new file mode 100644
index 00000000000..b4dd886a86a
--- /dev/null
+++ b/hr_employee_firstname/i18n/ca.po
@@ -0,0 +1,73 @@
+# Translation of Odoo Server.
+# This file contains the translation of the following modules:
+# * hr_employee_firstname
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Odoo Server 14.0\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: 2021-05-11 13:47+0000\n"
+"Last-Translator: Haftec \n"
+"Language-Team: none\n"
+"Language: ca\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: \n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.3.2\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee
+msgid "Employee"
+msgstr "Empleat"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr "Ordre dels noms d'empleats"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+msgid "First name"
+msgstr "Nom"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr "Darrera modificació el"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+msgid "Last name"
+msgstr "Cognoms"
+
+#. module: hr_employee_firstname
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
+#: code:addons/hr_employee_firstname/models/hr_employee.py:0
+#, python-format
+msgid "No name set."
+msgstr "No s'ha definit cap nom."
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index b34fe1413b8..ff99619f98e 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -9,37 +9,37 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2019-08-30 13:23+0000\n"
-"Last-Translator: Rodrigo Macedo \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
-"teams/23907/pt_BR/)\n"
+"PO-Revision-Date: 2021-03-13 03:46+0000\n"
+"Last-Translator: Eder Brito \n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
+"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 3.8\n"
+"X-Generator: Weblate 4.3.2\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
-msgstr "Empregado"
+msgstr "Funcionário"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
msgid "First name"
-msgstr ""
+msgstr "Nome"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
msgid "Last name"
-msgstr ""
+msgstr "Sobrenome"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
-msgstr "Sem nome estabelecido."
+msgstr "Nenhum nome definido."
#~ msgid "Firstname"
#~ msgstr "Primeiro nome"
From 7f099e8eb92477faf97ede19af204dc1bf715aa5 Mon Sep 17 00:00:00 2001
From: Hugo Adan
Date: Sat, 12 Jun 2021 21:18:30 +0000
Subject: [PATCH 25/42] [FIX] hr_employee_firstname: Move fields to common
employee
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Starting from 14.0, employee model was split into three models:
- `hr.employee.public`
- `hr.employee.private`
- `hr.employee` (a common model)
When this module was migrated, such split was not taken into account.
This commit moves fields to the common model, so they don't fail when
read from the public employee model.
Closes #990
Co-Authored-By: Luis González
---
hr_employee_firstname/i18n/hr_employee_firstname.pot | 12 ++++++++++++
hr_employee_firstname/models/__init__.py | 1 +
hr_employee_firstname/models/hr_employee.py | 5 +----
hr_employee_firstname/models/hr_employee_base.py | 8 ++++++++
4 files changed, 22 insertions(+), 4 deletions(-)
create mode 100644 hr_employee_firstname/models/hr_employee_base.py
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index b3bed042e55..7527440b81f 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -13,6 +13,11 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
msgid "Config Settings"
@@ -20,6 +25,7 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
msgid "Display Name"
msgstr ""
@@ -37,23 +43,29 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
msgid "ID"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
diff --git a/hr_employee_firstname/models/__init__.py b/hr_employee_firstname/models/__init__.py
index a28442fbae1..bdffa1bfc17 100644
--- a/hr_employee_firstname/models/__init__.py
+++ b/hr_employee_firstname/models/__init__.py
@@ -1,3 +1,4 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import base_config_settings
+from . import hr_employee_base
from . import hr_employee
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index e330fabd5ba..c16baff7112 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -4,7 +4,7 @@
import logging
-from odoo import _, api, fields, models
+from odoo import _, api, models
from odoo.exceptions import ValidationError
_logger = logging.getLogger(__name__)
@@ -45,9 +45,6 @@ def _onchange_firstname_lastname(self):
if self.firstname or self.lastname:
self.name = self._get_name(self.lastname, self.firstname)
- firstname = fields.Char()
- lastname = fields.Char()
-
@api.model
def _is_partner_firstname_installed(self):
return bool(
diff --git a/hr_employee_firstname/models/hr_employee_base.py b/hr_employee_firstname/models/hr_employee_base.py
new file mode 100644
index 00000000000..c6c4a519f86
--- /dev/null
+++ b/hr_employee_firstname/models/hr_employee_base.py
@@ -0,0 +1,8 @@
+from odoo import fields, models
+
+
+class HrEmployeeBase(models.AbstractModel):
+ _inherit = "hr.employee.base"
+
+ firstname = fields.Char()
+ lastname = fields.Char()
From c5cceec18f7f25433b81e163bbdc4165471914d3 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sat, 12 Jun 2021 23:57:59 +0000
Subject: [PATCH 26/42] hr_employee_firstname 14.0.3.0.0
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/ar.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/ca.po | 13 ++++++-
hr_employee_firstname/i18n/cs_CZ.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/de.po | 54 +++++++++++++++++++++++++--
hr_employee_firstname/i18n/es.po | 42 ++++++++++++++++++++-
hr_employee_firstname/i18n/fa.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/fi.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/fr.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/hr.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/hr_HR.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/it.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/lt.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/nl_NL.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/pt_BR.po | 50 ++++++++++++++++++++++++-
hr_employee_firstname/i18n/ro.po | 46 +++++++++++++++++++++++
hr_employee_firstname/i18n/sl.po | 46 +++++++++++++++++++++++
17 files changed, 704 insertions(+), 9 deletions(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 5d284466e73..8594ea259cd 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "14.0.2.0.1",
+ "version": "14.0.3.0.0",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index 4e5aeab0dda..b2220c7268a 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -20,18 +20,59 @@ msgstr ""
"Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 "
"&& n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5;\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "الموظف"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -41,6 +82,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "الإسم الأول"
diff --git a/hr_employee_firstname/i18n/ca.po b/hr_employee_firstname/i18n/ca.po
index b4dd886a86a..2053fb20b67 100644
--- a/hr_employee_firstname/i18n/ca.po
+++ b/hr_employee_firstname/i18n/ca.po
@@ -16,6 +16,11 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
msgid "Config Settings"
@@ -23,6 +28,7 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
msgid "Display Name"
msgstr ""
@@ -40,29 +46,34 @@ msgstr "Ordre dels noms d'empleats"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr "Nom"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
msgid "ID"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
msgid "Last Modified on"
msgstr "Darrera modificació el"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr "Cognoms"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
-#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
msgstr "No s'ha definit cap nom."
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index a226dcb4505..469e46c281d 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -20,18 +20,59 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n == 1 && n % 1 == 0) ? 0 : (n >= 2 && n "
"<= 4 && n % 1 == 0) ? 1: (n % 1 != 0 ) ? 2 : 3;\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Zaměstnanec"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,3 +81,8 @@ msgstr ""
#, python-format
msgid "No name set."
msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 058096989a9..9fdfa3eb970 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -9,7 +9,7 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2019-11-13 12:34+0000\n"
+"PO-Revision-Date: 2021-07-09 14:48+0000\n"
"Last-Translator: Maria Sparenberg \n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
@@ -17,22 +17,63 @@ 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.8\n"
+"X-Generator: Weblate 4.3.2\n"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr "Normaler Mitarbeiter"
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr "Konfigurationseinstellungen"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr "Anzeigename"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Mitarbeiter"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr "Reihenfolge der Namen"
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
-msgstr ""
+msgstr "Vorname"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr "ID"
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr "Zuletzt geändert am"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
-msgstr ""
+msgstr "Nachname"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -40,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr "Es wurde kein Name eingetragen."
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr "Reihenfolge für die Zusammensetzung des vollen Namens"
+
#~ msgid "Firstname"
#~ msgstr "Vorname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 0007bb3d400..40368604af4 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -19,24 +19,59 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Empleado"
#. module: hr_employee_firstname
-#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
msgid "Employee Names Order"
msgstr "Orden de los Nombres de Empleados"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -46,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr "Sin nombre establecido."
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Nombre propio"
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index 605e277dae1..3e2de780bae 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -19,18 +19,59 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 3.0.1\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "کارمند"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "نام"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index b7b09fc3741..526a181aebb 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -18,18 +18,59 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Työntekijä"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -38,3 +79,8 @@ msgstr ""
#, python-format
msgid "No name set."
msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index 02f488ebbb1..06b7cb5bc6f 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -18,18 +18,59 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Employé"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -39,6 +80,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Prénom"
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 2b94780248d..4cdf79dcd19 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -20,18 +20,59 @@ msgstr ""
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 3.8\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Djelatnik"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -41,6 +82,11 @@ msgstr ""
msgid "No name set."
msgstr "Ime nije postavljeno."
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Ime"
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index aa98ee8f3e7..30d71c7c651 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -20,18 +20,59 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Djelatnik"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,3 +81,8 @@ msgstr ""
#, python-format
msgid "No name set."
msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index fc5b3de7d69..9fb721eebc2 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -18,18 +18,59 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Dipendente"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -39,6 +80,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Nome"
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index b7d1e997292..80a4f748aa8 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -20,18 +20,59 @@ msgstr ""
"11) ? 0 : (n % 10 >= 2 && n % 10 <=9) && (n % 100 > 19 || n % 100 < 11) ? "
"1 : n % 1 != 0 ? 2: 3);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Darbuotojas"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,3 +81,8 @@ msgstr ""
#, python-format
msgid "No name set."
msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 2daacd7ea29..3d153e9f531 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -19,18 +19,59 @@ msgstr ""
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Werknemer"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Voornaam"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index ff99619f98e..af3190aa6cb 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2021-03-13 03:46+0000\n"
"Last-Translator: Eder Brito \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
-"23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -20,18 +20,59 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.3.2\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Funcionário"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr "Nome"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr "Sobrenome"
@@ -41,6 +82,11 @@ msgstr "Sobrenome"
msgid "No name set."
msgstr "Nenhum nome definido."
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Primeiro nome"
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index 796a99a4512..ca4fa957da2 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -19,18 +19,59 @@ msgstr ""
"Plural-Forms: nplurals=3; plural=(n==1?0:(((n%100>19)||((n%100==0)&&(n!=0)))?"
"2:1));\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Angajat"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Prenume"
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index 3a236d9fb01..f50a14a31e5 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -19,18 +19,59 @@ msgstr ""
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
"%100==4 ? 2 : 3);\n"
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
+msgid "Basic Employee"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
+msgid "Config Settings"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
+msgid "Display Name"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
msgstr "Kader"
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
+#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
+msgid "Employee Names Order"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
+msgid "ID"
+msgstr ""
+
+#. module: hr_employee_firstname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
+msgid "Last Modified on"
+msgstr ""
+
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
+#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""
@@ -40,6 +81,11 @@ msgstr ""
msgid "No name set."
msgstr ""
+#. module: hr_employee_firstname
+#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
+msgid "Order to compose employee fullname"
+msgstr ""
+
#~ msgid "Firstname"
#~ msgstr "Ime"
From dd32419d87528f7692b7eb64917bc519f3150a6b Mon Sep 17 00:00:00 2001
From: Luis Torres
Date: Mon, 18 Oct 2021 16:50:38 +0000
Subject: [PATCH 27/42] [MIG] hr_employee_firstname: Migration to 15.0
---
hr_employee_firstname/README.rst | 10 ++++----
hr_employee_firstname/__manifest__.py | 2 +-
.../i18n/hr_employee_firstname.pot | 23 +------------------
hr_employee_firstname/i18n/pt_BR.po | 14 +++++------
hr_employee_firstname/init_hook.py | 5 ++--
.../models/base_config_settings.py | 1 -
.../static/description/index.html | 6 ++---
7 files changed, 19 insertions(+), 42 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index d1ee27e7458..cb09dd5640b 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -14,13 +14,13 @@ HR Employee First Name, Last Name
: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_firstname
+ :target: https://github.com/OCA/hr/tree/15.0/hr_employee_firstname
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/hr-14-0/hr-14-0-hr_employee_firstname
+ :target: https://translation.odoo-community.org/projects/hr-15-0/hr-15-0-hr_employee_firstname
: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|
@@ -45,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
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -83,6 +83,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_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index 8594ea259cd..cdbab39869c 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "14.0.3.0.0",
+ "version": "15.0.1.0.0",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index 7527440b81f..cc4e1d84cd2 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.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"
@@ -23,13 +23,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -48,20 +41,6 @@ msgstr ""
msgid "First name"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index af3190aa6cb..6b93d4c4226 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -9,10 +9,10 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2021-03-13 03:46+0000\n"
-"Last-Translator: Eder Brito \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
-"teams/23907/pt_BR/)\n"
+"PO-Revision-Date: 2022-10-12 02:35+0000\n"
+"Last-Translator: Douglas Custódio \n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
+"23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -23,7 +23,7 @@ msgstr ""
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
msgid "Basic Employee"
-msgstr ""
+msgstr "Funcionário Básico"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
@@ -35,7 +35,7 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
msgid "Display Name"
-msgstr ""
+msgstr "Nome de Exibição"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -46,7 +46,7 @@ msgstr "Funcionário"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
msgid "Employee Names Order"
-msgstr ""
+msgstr "Ordem de Nome dos Funcionários"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
diff --git a/hr_employee_firstname/init_hook.py b/hr_employee_firstname/init_hook.py
index 29835ddbb4d..b9a9689621e 100644
--- a/hr_employee_firstname/init_hook.py
+++ b/hr_employee_firstname/init_hook.py
@@ -6,6 +6,5 @@
def post_init_hook(cr, _):
- with Environment.manage():
- env = Environment(cr, SUPERUSER_ID, {})
- env["hr.employee"]._install_employee_firstname()
+ env = Environment(cr, SUPERUSER_ID, {})
+ env["hr.employee"]._install_employee_firstname()
diff --git a/hr_employee_firstname/models/base_config_settings.py b/hr_employee_firstname/models/base_config_settings.py
index ad8e6515a57..3dee6c99a99 100644
--- a/hr_employee_firstname/models/base_config_settings.py
+++ b/hr_employee_firstname/models/base_config_settings.py
@@ -12,7 +12,6 @@ class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
employee_names_order = fields.Selection(
- string="Employee Names Order",
selection="_employee_names_order_selection",
help="Order to compose employee fullname",
config_parameter="employee_names_order",
diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
index e4fed311595..0c54a4eb72a 100644
--- a/hr_employee_firstname/static/description/index.html
+++ b/hr_employee_firstname/static/description/index.html
@@ -367,7 +367,7 @@ HR Employee First Name, Last Name
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
Table of contents
@@ -393,7 +393,7 @@
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.
@@ -425,7 +425,7 @@
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 139ea4abd17d7fa14e722d3564ceaca77cc0aa85 Mon Sep 17 00:00:00 2001
From: Luis Torres
Date: Sat, 5 Nov 2022 00:22:29 +0000
Subject: [PATCH 28/42] [MIG] hr_employee_firstname: Migration to 16.0
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/hr_employee_firstname.pot | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index cdbab39869c..a736e553447 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "15.0.1.0.0",
+ "version": "16.0.1.0.0",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index cc4e1d84cd2..d6fad81f341 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.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"
@@ -38,14 +38,14 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
+msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
From 6186d5615422ab29e835ea0fa969d0b71930f9c2 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sat, 5 Nov 2022 08:39:13 +0000
Subject: [PATCH 29/42] [UPD] README.rst
---
hr_employee_firstname/README.rst | 10 ++---
hr_employee_firstname/i18n/ar.po | 35 ++-------------
hr_employee_firstname/i18n/ca.po | 36 +++++----------
hr_employee_firstname/i18n/cs_CZ.po | 25 +----------
hr_employee_firstname/i18n/de.po | 38 ++++++----------
hr_employee_firstname/i18n/es.po | 35 ++-------------
hr_employee_firstname/i18n/fa.po | 35 ++-------------
hr_employee_firstname/i18n/fi.po | 25 +----------
hr_employee_firstname/i18n/fr.po | 35 ++-------------
hr_employee_firstname/i18n/hr.po | 35 ++-------------
hr_employee_firstname/i18n/hr_HR.po | 25 +----------
hr_employee_firstname/i18n/it.po | 35 ++-------------
hr_employee_firstname/i18n/lt.po | 25 +----------
hr_employee_firstname/i18n/nl_NL.po | 35 ++-------------
hr_employee_firstname/i18n/pt_BR.po | 44 ++++++-------------
hr_employee_firstname/i18n/ro.po | 35 ++-------------
hr_employee_firstname/i18n/sl.po | 35 ++-------------
.../static/description/index.html | 6 +--
18 files changed, 90 insertions(+), 459 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index cb09dd5640b..ec65b904ced 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -14,13 +14,13 @@ HR Employee First Name, Last Name
: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_firstname
+ :target: https://github.com/OCA/hr/tree/16.0/hr_employee_firstname
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
- :target: https://translation.odoo-community.org/projects/hr-15-0/hr-15-0-hr_employee_firstname
+ :target: https://translation.odoo-community.org/projects/hr-16-0/hr-16-0-hr_employee_firstname
: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|
@@ -45,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
-`feedback `_.
+`feedback `_.
Do not contact contributors directly about support or help with technical issues.
@@ -83,6 +83,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_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index b2220c7268a..265e916137d 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -30,13 +30,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,29 +45,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "الإسم الأول"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "إسم العائلة"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -86,9 +65,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "الإسم الأول"
-
-#~ msgid "Lastname"
-#~ msgstr "إسم العائلة"
diff --git a/hr_employee_firstname/i18n/ca.po b/hr_employee_firstname/i18n/ca.po
index 2053fb20b67..359fa0b8b12 100644
--- a/hr_employee_firstname/i18n/ca.po
+++ b/hr_employee_firstname/i18n/ca.po
@@ -26,13 +26,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -48,29 +41,15 @@ msgstr "Ordre dels noms d'empleats"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr "Nom"
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
+msgid "Firstname"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr "Darrera modificació el"
-
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr "Cognoms"
+msgid "Lastname"
+msgstr ""
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -82,3 +61,12 @@ msgstr "No s'ha definit cap nom."
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "First name"
+#~ msgstr "Nom"
+
+#~ msgid "Last Modified on"
+#~ msgstr "Darrera modificació el"
+
+#~ msgid "Last name"
+#~ msgstr "Cognoms"
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index 469e46c281d..08165a520c5 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -30,13 +30,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,28 +45,14 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
+msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index 9fdfa3eb970..ab7599b9fee 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -29,13 +29,6 @@ msgstr "Normaler Mitarbeiter"
msgid "Config Settings"
msgstr "Konfigurationseinstellungen"
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr "Anzeigename"
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,28 +44,14 @@ msgstr "Reihenfolge der Namen"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
+msgid "Firstname"
msgstr "Vorname"
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr "ID"
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr "Zuletzt geändert am"
-
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr "Nachname"
#. module: hr_employee_firstname
@@ -86,8 +65,17 @@ msgstr "Es wurde kein Name eingetragen."
msgid "Order to compose employee fullname"
msgstr "Reihenfolge für die Zusammensetzung des vollen Namens"
-#~ msgid "Firstname"
+#~ msgid "Display Name"
+#~ msgstr "Anzeigename"
+
+#~ msgid "First name"
#~ msgstr "Vorname"
-#~ msgid "Lastname"
+#~ msgid "ID"
+#~ msgstr "ID"
+
+#~ msgid "Last Modified on"
+#~ msgstr "Zuletzt geändert am"
+
+#~ msgid "Last name"
#~ msgstr "Nachname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 40368604af4..0ddc8e273a7 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -29,13 +29,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,29 +44,15 @@ msgstr "Orden de los Nombres de Empleados"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Nombre propio"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Apellidos"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -85,9 +64,3 @@ msgstr "Sin nombre establecido."
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Nombre propio"
-
-#~ msgid "Lastname"
-#~ msgstr "Apellidos"
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index 3e2de780bae..692d343d0d0 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -29,13 +29,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,29 +44,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "نام"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "نام خانوادگی"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -85,9 +64,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "نام"
-
-#~ msgid "Lastname"
-#~ msgstr "نام خانوادگی"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index 526a181aebb..b741b90f086 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -28,13 +28,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -50,28 +43,14 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
+msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index 06b7cb5bc6f..808ef1a7e1b 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -28,13 +28,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -50,29 +43,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Prénom"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Nom"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -84,9 +63,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Prénom"
-
-#~ msgid "Lastname"
-#~ msgstr "Nom"
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 4cdf79dcd19..4f12a3d7db8 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -30,13 +30,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,29 +45,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Ime"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Prezime"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -86,9 +65,3 @@ msgstr "Ime nije postavljeno."
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Ime"
-
-#~ msgid "Lastname"
-#~ msgstr "Prezime"
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index 30d71c7c651..f068669ddab 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -30,13 +30,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,28 +45,14 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
+msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index 9fb721eebc2..1af83ddb866 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -28,13 +28,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -50,29 +43,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Nome"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Cognome"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -84,9 +63,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Nome"
-
-#~ msgid "Lastname"
-#~ msgstr "Cognome"
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index 80a4f748aa8..785c216e339 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -30,13 +30,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,28 +45,14 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
+msgid "Firstname"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
+msgid "Lastname"
msgstr ""
#. module: hr_employee_firstname
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 3d153e9f531..3b8ab0c9fdf 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -29,13 +29,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,29 +44,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Voornaam"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Achternaam"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -85,9 +64,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Voornaam"
-
-#~ msgid "Lastname"
-#~ msgstr "Achternaam"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index 6b93d4c4226..fb03b17e2de 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -11,8 +11,8 @@ msgstr ""
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
"PO-Revision-Date: 2022-10-12 02:35+0000\n"
"Last-Translator: Douglas Custódio \n"
-"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/teams/"
-"23907/pt_BR/)\n"
+"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/"
+"teams/23907/pt_BR/)\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
@@ -30,13 +30,6 @@ msgstr "Funcionário Básico"
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr "Nome de Exibição"
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -52,29 +45,15 @@ msgstr "Ordem de Nome dos Funcionários"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr "Nome"
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Primeiro nome"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr "Sobrenome"
+msgid "Lastname"
+msgstr "Último nome"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -87,8 +66,11 @@ msgstr "Nenhum nome definido."
msgid "Order to compose employee fullname"
msgstr ""
-#~ msgid "Firstname"
-#~ msgstr "Primeiro nome"
+#~ msgid "Display Name"
+#~ msgstr "Nome de Exibição"
+
+#~ msgid "First name"
+#~ msgstr "Nome"
-#~ msgid "Lastname"
-#~ msgstr "Último nome"
+#~ msgid "Last name"
+#~ msgstr "Sobrenome"
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index ca4fa957da2..9c577afc835 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -29,13 +29,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,29 +44,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Prenume"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Nume"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -85,9 +64,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Prenume"
-
-#~ msgid "Lastname"
-#~ msgstr "Nume"
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index f50a14a31e5..4a44c4ff70d 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -29,13 +29,6 @@ msgstr ""
msgid "Config Settings"
msgstr ""
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__display_name
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__display_name
-msgid "Display Name"
-msgstr ""
-
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
msgid "Employee"
@@ -51,29 +44,15 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "First name"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__id
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__id
-msgid "ID"
-msgstr ""
-
-#. module: hr_employee_firstname
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base____last_update
-#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings____last_update
-msgid "Last Modified on"
-msgstr ""
+msgid "Firstname"
+msgstr "Ime"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Last name"
-msgstr ""
+msgid "Lastname"
+msgstr "Priimek"
#. module: hr_employee_firstname
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
@@ -85,9 +64,3 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
-
-#~ msgid "Firstname"
-#~ msgstr "Ime"
-
-#~ msgid "Lastname"
-#~ msgstr "Priimek"
diff --git a/hr_employee_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
index 0c54a4eb72a..36faed1ef01 100644
--- a/hr_employee_firstname/static/description/index.html
+++ b/hr_employee_firstname/static/description/index.html
@@ -367,7 +367,7 @@ HR Employee First Name, Last Name
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
-
+
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
Table of contents
@@ -393,7 +393,7 @@
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.
@@ -425,7 +425,7 @@
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 a453dd1f08d90dcbebefa6dd10bc77a9b7343cb0 Mon Sep 17 00:00:00 2001
From: Luis Torres
Date: Mon, 7 Nov 2022 18:56:34 +0000
Subject: [PATCH 30/42] [FIX] hr_employee_firstname: Improved create on
employee
Avoid WARNING on inherit to create method:
```
The model odoo.addons.hr_employee_firstname.models.hr_employee is not
overriding the create method in batch
```
---
hr_employee_firstname/i18n/ar.po | 15 +++++++++----
hr_employee_firstname/i18n/ca.po | 15 +++++--------
hr_employee_firstname/i18n/cs_CZ.po | 5 +++--
hr_employee_firstname/i18n/de.po | 17 ++++++++-------
hr_employee_firstname/i18n/es.po | 15 +++++++++----
hr_employee_firstname/i18n/fa.po | 15 +++++++++----
hr_employee_firstname/i18n/fi.po | 5 +++--
hr_employee_firstname/i18n/fr.po | 15 +++++++++----
hr_employee_firstname/i18n/hr.po | 15 +++++++++----
hr_employee_firstname/i18n/hr_HR.po | 5 +++--
.../i18n/hr_employee_firstname.pot | 5 +++--
hr_employee_firstname/i18n/it.po | 15 +++++++++----
hr_employee_firstname/i18n/lt.po | 5 +++--
hr_employee_firstname/i18n/nl_NL.po | 15 +++++++++----
hr_employee_firstname/i18n/pt_BR.po | 21 ++++++++++---------
hr_employee_firstname/i18n/ro.po | 15 +++++++++----
hr_employee_firstname/i18n/sl.po | 15 +++++++++----
hr_employee_firstname/models/hr_employee.py | 12 ++++++-----
18 files changed, 146 insertions(+), 79 deletions(-)
diff --git a/hr_employee_firstname/i18n/ar.po b/hr_employee_firstname/i18n/ar.po
index 265e916137d..fd99cca939f 100644
--- a/hr_employee_firstname/i18n/ar.po
+++ b/hr_employee_firstname/i18n/ar.po
@@ -45,17 +45,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "الإسم الأول"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "إسم العائلة"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -65,3 +66,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "الإسم الأول"
+
+#~ msgid "Lastname"
+#~ msgstr "إسم العائلة"
diff --git a/hr_employee_firstname/i18n/ca.po b/hr_employee_firstname/i18n/ca.po
index 359fa0b8b12..6860c6d9bd0 100644
--- a/hr_employee_firstname/i18n/ca.po
+++ b/hr_employee_firstname/i18n/ca.po
@@ -41,17 +41,18 @@ msgstr "Ordre dels noms d'empleats"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr ""
+msgid "First name"
+msgstr "Nom"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr ""
+msgid "Last name"
+msgstr "Cognoms"
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -62,11 +63,5 @@ msgstr "No s'ha definit cap nom."
msgid "Order to compose employee fullname"
msgstr ""
-#~ msgid "First name"
-#~ msgstr "Nom"
-
#~ msgid "Last Modified on"
#~ msgstr "Darrera modificació el"
-
-#~ msgid "Last name"
-#~ msgstr "Cognoms"
diff --git a/hr_employee_firstname/i18n/cs_CZ.po b/hr_employee_firstname/i18n/cs_CZ.po
index 08165a520c5..d20a4cb1d85 100644
--- a/hr_employee_firstname/i18n/cs_CZ.po
+++ b/hr_employee_firstname/i18n/cs_CZ.po
@@ -45,17 +45,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
diff --git a/hr_employee_firstname/i18n/de.po b/hr_employee_firstname/i18n/de.po
index ab7599b9fee..e838f29f536 100644
--- a/hr_employee_firstname/i18n/de.po
+++ b/hr_employee_firstname/i18n/de.po
@@ -44,17 +44,18 @@ msgstr "Reihenfolge der Namen"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr "Vorname"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr "Nachname"
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -65,17 +66,17 @@ msgstr "Es wurde kein Name eingetragen."
msgid "Order to compose employee fullname"
msgstr "Reihenfolge für die Zusammensetzung des vollen Namens"
+#~ msgid "Firstname"
+#~ msgstr "Vorname"
+
+#~ msgid "Lastname"
+#~ msgstr "Nachname"
+
#~ msgid "Display Name"
#~ msgstr "Anzeigename"
-#~ msgid "First name"
-#~ msgstr "Vorname"
-
#~ msgid "ID"
#~ msgstr "ID"
#~ msgid "Last Modified on"
#~ msgstr "Zuletzt geändert am"
-
-#~ msgid "Last name"
-#~ msgstr "Nachname"
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index 0ddc8e273a7..e8a500710c7 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -44,17 +44,18 @@ msgstr "Orden de los Nombres de Empleados"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Nombre propio"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Apellidos"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -64,3 +65,9 @@ msgstr "Sin nombre establecido."
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Nombre propio"
+
+#~ msgid "Lastname"
+#~ msgstr "Apellidos"
diff --git a/hr_employee_firstname/i18n/fa.po b/hr_employee_firstname/i18n/fa.po
index 692d343d0d0..6748f883c78 100644
--- a/hr_employee_firstname/i18n/fa.po
+++ b/hr_employee_firstname/i18n/fa.po
@@ -44,17 +44,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "نام"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "نام خانوادگی"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -64,3 +65,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "نام"
+
+#~ msgid "Lastname"
+#~ msgstr "نام خانوادگی"
diff --git a/hr_employee_firstname/i18n/fi.po b/hr_employee_firstname/i18n/fi.po
index b741b90f086..53626dffae1 100644
--- a/hr_employee_firstname/i18n/fi.po
+++ b/hr_employee_firstname/i18n/fi.po
@@ -43,17 +43,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
diff --git a/hr_employee_firstname/i18n/fr.po b/hr_employee_firstname/i18n/fr.po
index 808ef1a7e1b..171de3a5cb3 100644
--- a/hr_employee_firstname/i18n/fr.po
+++ b/hr_employee_firstname/i18n/fr.po
@@ -43,17 +43,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Prénom"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Nom"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -63,3 +64,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Prénom"
+
+#~ msgid "Lastname"
+#~ msgstr "Nom"
diff --git a/hr_employee_firstname/i18n/hr.po b/hr_employee_firstname/i18n/hr.po
index 4f12a3d7db8..59e945d0a0b 100644
--- a/hr_employee_firstname/i18n/hr.po
+++ b/hr_employee_firstname/i18n/hr.po
@@ -45,17 +45,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Ime"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Prezime"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -65,3 +66,9 @@ msgstr "Ime nije postavljeno."
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Ime"
+
+#~ msgid "Lastname"
+#~ msgstr "Prezime"
diff --git a/hr_employee_firstname/i18n/hr_HR.po b/hr_employee_firstname/i18n/hr_HR.po
index f068669ddab..d8d926ddfd1 100644
--- a/hr_employee_firstname/i18n/hr_HR.po
+++ b/hr_employee_firstname/i18n/hr_HR.po
@@ -45,17 +45,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
diff --git a/hr_employee_firstname/i18n/hr_employee_firstname.pot b/hr_employee_firstname/i18n/hr_employee_firstname.pot
index d6fad81f341..bc4b9544b84 100644
--- a/hr_employee_firstname/i18n/hr_employee_firstname.pot
+++ b/hr_employee_firstname/i18n/hr_employee_firstname.pot
@@ -38,17 +38,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index 1af83ddb866..562620ccd0b 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -43,17 +43,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Nome"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Cognome"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -63,3 +64,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Nome"
+
+#~ msgid "Lastname"
+#~ msgstr "Cognome"
diff --git a/hr_employee_firstname/i18n/lt.po b/hr_employee_firstname/i18n/lt.po
index 785c216e339..07aade5f590 100644
--- a/hr_employee_firstname/i18n/lt.po
+++ b/hr_employee_firstname/i18n/lt.po
@@ -45,17 +45,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
+msgid "First name"
msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
+msgid "Last name"
msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
diff --git a/hr_employee_firstname/i18n/nl_NL.po b/hr_employee_firstname/i18n/nl_NL.po
index 3b8ab0c9fdf..22d38e247ad 100644
--- a/hr_employee_firstname/i18n/nl_NL.po
+++ b/hr_employee_firstname/i18n/nl_NL.po
@@ -44,17 +44,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Voornaam"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Achternaam"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -64,3 +65,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Voornaam"
+
+#~ msgid "Lastname"
+#~ msgstr "Achternaam"
diff --git a/hr_employee_firstname/i18n/pt_BR.po b/hr_employee_firstname/i18n/pt_BR.po
index fb03b17e2de..a88c0a2d526 100644
--- a/hr_employee_firstname/i18n/pt_BR.po
+++ b/hr_employee_firstname/i18n/pt_BR.po
@@ -45,17 +45,18 @@ msgstr "Ordem de Nome dos Funcionários"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Primeiro nome"
+msgid "First name"
+msgstr "Nome"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Último nome"
+msgid "Last name"
+msgstr "Sobrenome"
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -66,11 +67,11 @@ msgstr "Nenhum nome definido."
msgid "Order to compose employee fullname"
msgstr ""
-#~ msgid "Display Name"
-#~ msgstr "Nome de Exibição"
+#~ msgid "Firstname"
+#~ msgstr "Primeiro nome"
-#~ msgid "First name"
-#~ msgstr "Nome"
+#~ msgid "Lastname"
+#~ msgstr "Último nome"
-#~ msgid "Last name"
-#~ msgstr "Sobrenome"
+#~ msgid "Display Name"
+#~ msgstr "Nome de Exibição"
diff --git a/hr_employee_firstname/i18n/ro.po b/hr_employee_firstname/i18n/ro.po
index 9c577afc835..fd3ddc6ac96 100644
--- a/hr_employee_firstname/i18n/ro.po
+++ b/hr_employee_firstname/i18n/ro.po
@@ -44,17 +44,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Prenume"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Nume"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -64,3 +65,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Prenume"
+
+#~ msgid "Lastname"
+#~ msgstr "Nume"
diff --git a/hr_employee_firstname/i18n/sl.po b/hr_employee_firstname/i18n/sl.po
index 4a44c4ff70d..a9d2ab9ef8c 100644
--- a/hr_employee_firstname/i18n/sl.po
+++ b/hr_employee_firstname/i18n/sl.po
@@ -44,17 +44,18 @@ msgstr ""
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
-msgid "Firstname"
-msgstr "Ime"
+msgid "First name"
+msgstr ""
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
-msgid "Lastname"
-msgstr "Priimek"
+msgid "Last name"
+msgstr ""
#. module: hr_employee_firstname
+#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
@@ -64,3 +65,9 @@ msgstr ""
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
msgstr ""
+
+#~ msgid "Firstname"
+#~ msgstr "Ime"
+
+#~ msgid "Lastname"
+#~ msgstr "Priimek"
diff --git a/hr_employee_firstname/models/hr_employee.py b/hr_employee_firstname/models/hr_employee.py
index c16baff7112..05d859eb7c8 100644
--- a/hr_employee_firstname/models/hr_employee.py
+++ b/hr_employee_firstname/models/hr_employee.py
@@ -53,12 +53,14 @@ def _is_partner_firstname_installed(self):
.search([("name", "=", "partner_firstname"), ("state", "=", "installed")])
)
- @api.model
- def create(self, vals):
- self._prepare_vals_on_create_firstname_lastname(vals)
- res = super().create(vals)
+ @api.model_create_multi
+ def create(self, vals_list):
+ for vals in vals_list:
+ self._prepare_vals_on_create_firstname_lastname(vals)
+ res = super().create(vals_list)
if self._is_partner_firstname_installed():
- res._update_partner_firstname()
+ for employee in res:
+ employee._update_partner_firstname()
return res
def write(self, vals):
From 7e70006e14f0dfcbc8de5993d82d04506e09b3be Mon Sep 17 00:00:00 2001
From: FernandoRomera
Date: Wed, 21 Dec 2022 08:04:11 +0100
Subject: [PATCH 31/42] [16.0][FIX] test refresh->invalidate_recordset
---
.../tests/test_hr_employee_firstname.py | 20 +++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/hr_employee_firstname/tests/test_hr_employee_firstname.py b/hr_employee_firstname/tests/test_hr_employee_firstname.py
index dc872e8ddc4..056f24f73df 100644
--- a/hr_employee_firstname/tests/test_hr_employee_firstname.py
+++ b/hr_employee_firstname/tests/test_hr_employee_firstname.py
@@ -86,33 +86,33 @@ def test_auto_init_name(self):
def test_change_name(self):
self.employee1_id.write({"name": "Jean-Pierre Carnaud-Eyck"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
def test_change_name_with_space(self):
self.employee1_id.write({"name": " Jean-Pierre Carnaud-Eyck"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
def test_change_firstname(self):
self.employee1_id.write({"firstname": "Jean-Pierre"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.name, "Jean-Pierre Van-Eyck")
def test_change_lastname(self):
self.employee1_id.write({"lastname": "Carnaud"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.name, "Jan Carnaud")
def test_change_firstname_and_lastname(self):
self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.name, "Jean-Pierre Carnaud")
@@ -122,17 +122,17 @@ def test_lastname_firstname(self):
)
self.employee1_id.write({"name": "Carnaud-Eyck Jean-Pierre"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
self.employee1_id.write({"name": " Carnaud-Eyck Jean-Pierre"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.name, "Carnaud Jean-Pierre")
@odoo.tests.tagged("-at_install", "post_install")
@@ -158,7 +158,7 @@ def test_change_firstname_and_lastname_with_set_last_first_comma(self):
"employee_names_order", "last_first_comma"
)
self.employee1_id.write({"firstname": "Jean-Pierre", "lastname": "Carnaud"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.name, "Carnaud, Jean-Pierre")
@@ -167,7 +167,7 @@ def test_change_name_with_space_with_set_last_first_comma(self):
"employee_names_order", "last_first_comma"
)
self.employee1_id.write({"name": " Carnaud-Eyck, Jean-Pierre"})
- self.employee1_id.refresh()
+ self.employee1_id.invalidate_recordset()
self.assertEqual(self.employee1_id.firstname, "Jean-Pierre")
self.assertEqual(self.employee1_id.lastname, "Carnaud-Eyck")
From 426ef6050e4f704d0730d708994e9f1b8a47d237 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Wed, 21 Dec 2022 14:32:44 +0000
Subject: [PATCH 32/42] hr_employee_firstname 16.0.1.0.1
---
hr_employee_firstname/__manifest__.py | 2 +-
hr_employee_firstname/i18n/es.po | 16 ++++++++--------
hr_employee_firstname/i18n/it.po | 21 +++++++++++----------
3 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/hr_employee_firstname/__manifest__.py b/hr_employee_firstname/__manifest__.py
index a736e553447..68585036ce4 100644
--- a/hr_employee_firstname/__manifest__.py
+++ b/hr_employee_firstname/__manifest__.py
@@ -3,7 +3,7 @@
{
"name": "HR Employee First Name, Last Name",
- "version": "16.0.1.0.0",
+ "version": "16.0.1.0.1",
"author": "Savoir-faire Linux, "
"Fekete Mihai (Forest and Biomass Services Romania), "
"Onestein, "
diff --git a/hr_employee_firstname/i18n/es.po b/hr_employee_firstname/i18n/es.po
index e8a500710c7..2cf79609734 100644
--- a/hr_employee_firstname/i18n/es.po
+++ b/hr_employee_firstname/i18n/es.po
@@ -9,25 +9,25 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2019-07-23 11:43+0000\n"
-"Last-Translator: Jaime Arroyo \n"
+"PO-Revision-Date: 2023-08-03 21:10+0000\n"
+"Last-Translator: Ivorra78 \n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 3.7.1\n"
+"X-Generator: Weblate 4.17\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
msgid "Basic Employee"
-msgstr ""
+msgstr "Empleado básico"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
msgid "Config Settings"
-msgstr ""
+msgstr "Ajustes de Configuración"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -45,14 +45,14 @@ msgstr "Orden de los Nombres de Empleados"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
-msgstr ""
+msgstr "Nombre de pila"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
-msgstr ""
+msgstr "Apellido"
#. module: hr_employee_firstname
#. odoo-python
@@ -64,7 +64,7 @@ msgstr "Sin nombre establecido."
#. module: hr_employee_firstname
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
-msgstr ""
+msgstr "Orden para componer el nombre completo del empleado"
#~ msgid "Firstname"
#~ msgstr "Nombre propio"
diff --git a/hr_employee_firstname/i18n/it.po b/hr_employee_firstname/i18n/it.po
index 562620ccd0b..06e4e4b2721 100644
--- a/hr_employee_firstname/i18n/it.po
+++ b/hr_employee_firstname/i18n/it.po
@@ -9,24 +9,25 @@ msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-01-28 02:12+0000\n"
-"PO-Revision-Date: 2017-01-28 02:12+0000\n"
-"Last-Translator: OCA Transbot , 2017\n"
+"PO-Revision-Date: 2023-06-26 08:09+0000\n"
+"Last-Translator: mymage \n"
"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/it/)\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
-"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Weblate 4.17\n"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee_base
msgid "Basic Employee"
-msgstr ""
+msgstr "Dipendente base"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_res_config_settings
msgid "Config Settings"
-msgstr ""
+msgstr "Impostazioni configurazione"
#. module: hr_employee_firstname
#: model:ir.model,name:hr_employee_firstname.model_hr_employee
@@ -37,33 +38,33 @@ msgstr "Dipendente"
#: model:ir.model.fields,field_description:hr_employee_firstname.field_res_config_settings__employee_names_order
#: model_terms:ir.ui.view,arch_db:hr_employee_firstname.res_config_settings_view_form
msgid "Employee Names Order"
-msgstr ""
+msgstr "Ordine nomi dipendente"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__firstname
msgid "First name"
-msgstr ""
+msgstr "Nome"
#. module: hr_employee_firstname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_firstname.field_hr_employee_public__lastname
msgid "Last name"
-msgstr ""
+msgstr "Cognome"
#. module: hr_employee_firstname
#. odoo-python
#: code:addons/hr_employee_firstname/models/hr_employee.py:0
#, python-format
msgid "No name set."
-msgstr ""
+msgstr "Nome non impostato."
#. module: hr_employee_firstname
#: model:ir.model.fields,help:hr_employee_firstname.field_res_config_settings__employee_names_order
msgid "Order to compose employee fullname"
-msgstr ""
+msgstr "Ordinamento per comporre il nome completo del dipendente"
#~ msgid "Firstname"
#~ msgstr "Nome"
From 5ca3a017cdf0a745adf7197fdc81a7ea72473f31 Mon Sep 17 00:00:00 2001
From: OCA-git-bot
Date: Sun, 3 Sep 2023 13:09:14 +0000
Subject: [PATCH 33/42] [UPD] README.rst
---
hr_employee_firstname/README.rst | 15 +++++---
.../static/description/index.html | 38 ++++++++++---------
2 files changed, 29 insertions(+), 24 deletions(-)
diff --git a/hr_employee_firstname/README.rst b/hr_employee_firstname/README.rst
index ec65b904ced..07999ab97aa 100644
--- a/hr_employee_firstname/README.rst
+++ b/hr_employee_firstname/README.rst
@@ -2,10 +2,13 @@
HR Employee First Name, Last Name
=================================
-.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+..
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ !! source digest: sha256:482b99d666b8bafef983166ebc8c36bfa563076f54886db9eb8a66b6befc8881
+ !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
@@ -19,11 +22,11 @@ HR Employee First Name, Last Name
.. |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_firstname
:alt: Translate me on Weblate
-.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
- :target: https://runbot.odoo-community.org/runbot/116/16.0
- :alt: Try me on Runbot
+.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
+ :target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=16.0
+ :alt: Try me on Runboat
-|badge1| |badge2| |badge3| |badge4| |badge5|
+|badge1| |badge2| |badge3| |badge4| |badge5|
This module allows you to add firstname and lastname in employee form,
and concatenate both in name field.
@@ -44,7 +47,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_firstname/static/description/index.html b/hr_employee_firstname/static/description/index.html
index 36faed1ef01..5c5d38e250f 100644
--- a/hr_employee_firstname/static/description/index.html
+++ b/hr_employee_firstname/static/description/index.html
@@ -1,20 +1,20 @@
-
+
-
+
HR Employee First Name, Last Name