Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] hr_employee_second_lastname: Migration to 18.0 #1398

Merged
merged 8 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions hr_employee_second_lastname/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
=========================================
HR Employee First Name and Two Last Names
=========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:92ab29e1e7ea1d47f493a5619cb6d50b6c2e6df9dfab19ba35547d491dcc7892
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fhr-lightgray.png?logo=github
:target: https://github.com/OCA/hr/tree/18.0/hr_employee_second_lastname
:alt: OCA/hr
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/hr-18-0/hr-18-0-hr_employee_second_lastname
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/hr&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows you to add firstname and lastnames (Father an Mother
Last Name) in employee form, and concatenate both in name field.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Go to *Employees*
2. On the employee form view you will have 3 separate fields, one for
Firstname, second for Lastname, both required and Mother's Last Name
(optional).

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_employee_second_lastname%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Vauxoo

Contributors
------------

- Luis Escobar <[email protected]>
- Hugo Adan <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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

.. |maintainer-luisg123v| image:: https://github.com/luisg123v.png?size=40px
:target: https://github.com/luisg123v
:alt: luisg123v

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-luisg123v|

This module is part of the `OCA/hr <https://github.com/OCA/hr/tree/18.0/hr_employee_second_lastname>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 2 additions & 0 deletions hr_employee_second_lastname/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import models
from .hooks import post_init_hook
17 changes: 17 additions & 0 deletions hr_employee_second_lastname/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "HR Employee First Name and Two Last Names",
"version": "18.0.1.0.0",
"author": "Vauxoo, Odoo Community Association (OCA)",
"maintainers": ["luisg123v"],
"website": "https://github.com/OCA/hr",
"license": "AGPL-3",
"category": "Human Resources",
"summary": "Split Name in First Name, Father's Last Name and Mother's Last Name",
"depends": ["hr_employee_firstname"],
"data": ["views/hr_views.xml"],
"post_init_hook": "post_init_hook",
"demo": [],
"test": [],
"installable": True,
}
25 changes: 25 additions & 0 deletions hr_employee_second_lastname/hooks.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
def post_init_hook(env):
# This SQL statement is necessary to call _install_employee_lastnames() and
# set name fields correctly.
#
# After the installation, previously the dependency hr_employee_firstname
# splitting the name into two parts: firstname and lastname, so for this
# module to be able to process the new field lastmane2 it is necessary to
# reset the values to empty to be able to correctly set the three fields
# (firstname, lastname and lastname2).
#
# For example:
# After install hr_employee_fisrtname and before install
# hr_employee_second_lastname:
# name = 'John Peterson Clinton'
# firstname = 'John'
# lastname = 'Peterson Clinton'
#
# After install hr_employee_second_lastname:
# name = 'John Peterson Clinton'
# firstname = 'John'
# lastname = 'Peterson'
# lastname2 = 'Clinton'
env.cr.execute("UPDATE hr_employee SET firstname = NULL, lastname = NULL")
env["hr.employee"]._install_employee_lastnames()
env["ir.config_parameter"].sudo().set_param("employee_names_order", "first_last")
51 changes: 51 additions & 0 deletions hr_employee_second_lastname/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_lastnames
#
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 <[email protected]>\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_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee_base
msgid "Basic Employee"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee
msgid "Employee"
msgstr "Empleat"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__firstname
msgid "First name"
msgstr "Nom"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname
msgid "Last name"
msgstr "Primer cognom"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname2
msgid "Second last name"
msgstr "Segon cognom"

#~ msgid "Last Modified on"
#~ msgstr "Darrera modificació el"
61 changes: 61 additions & 0 deletions hr_employee_second_lastname/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_lastnames
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-08-31 12:31+0000\n"
"PO-Revision-Date: 2023-08-03 21:10+0000\n"
"Last-Translator: Ivorra78 <[email protected]>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee_base
msgid "Basic Employee"
msgstr "Empleado Básico"

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee
msgid "Employee"
msgstr "Empleado"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__firstname
msgid "First name"
msgstr "Nombre Propio"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname
msgid "Last name"
msgstr "Primer Apellido"

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname2
msgid "Second last name"
msgstr "Segundo Apellido"

#~ msgid "Display Name"
#~ msgstr "Mostrar nombre"

#~ msgid "ID"
#~ msgstr "ID (identificación)"

#~ msgid "Last Modified on"
#~ msgstr "Modificado por última vez el"

#~ msgid "No name set."
#~ msgstr "Sin nombre establecido."
47 changes: 47 additions & 0 deletions hr_employee_second_lastname/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_lastnames
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
"Language: hr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee_base
msgid "Basic Employee"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee
msgid "Employee"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname2
msgid "Second last name"
msgstr ""
45 changes: 45 additions & 0 deletions hr_employee_second_lastname/i18n/hr_employee_lastnames.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_lastnames
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_employee_lastnames
#: model:ir.model,name:hr_employee_lastnames.model_hr_employee_base
msgid "Basic Employee"
msgstr ""

#. module: hr_employee_lastnames
#: model:ir.model,name:hr_employee_lastnames.model_hr_employee
msgid "Employee"
msgstr ""

#. module: hr_employee_lastnames
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_public__firstname
msgid "First name"
msgstr ""

#. module: hr_employee_lastnames
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""

#. module: hr_employee_lastnames
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee__lastname2
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_base__lastname2
#: model:ir.model.fields,field_description:hr_employee_lastnames.field_hr_employee_public__lastname2
msgid "Second last name"
msgstr ""
45 changes: 45 additions & 0 deletions hr_employee_second_lastname/i18n/hr_employee_second_lastname.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_second_lastname
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee_base
msgid "Basic Employee"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model,name:hr_employee_second_lastname.model_hr_employee
msgid "Employee"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__firstname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__firstname
msgid "First name"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname
msgid "Last name"
msgstr ""

#. module: hr_employee_second_lastname
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_base__lastname2
#: model:ir.model.fields,field_description:hr_employee_second_lastname.field_hr_employee_public__lastname2
msgid "Second last name"
msgstr ""
Loading
Loading