Skip to content

Commit

Permalink
Merge pull request #1069 from OCA/18.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/hr (18.0)
  • Loading branch information
bt-admin authored Feb 21, 2025
2 parents 6e91a9d + be995c2 commit da49c6e
Show file tree
Hide file tree
Showing 19 changed files with 753 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Available addons
----------------
addon | version | maintainers | summary
--- | --- | --- | ---
[hr_department_code](hr_department_code/) | 18.0.1.0.0 | | HR department code
[hr_employee_calendar_planning](hr_employee_calendar_planning/) | 18.0.1.0.0 | [![victoralmau](https://github.com/victoralmau.png?size=30px)](https://github.com/victoralmau) [![pedrobaeza](https://github.com/pedrobaeza.png?size=30px)](https://github.com/pedrobaeza) | Employee Calendar Planning
[hr_employee_firstname](hr_employee_firstname/) | 18.0.1.0.0 | [![Savoir-faire Linux](https://github.com/Savoir-faire Linux.png?size=30px)](https://github.com/Savoir-faire Linux) [![luisg123v](https://github.com/luisg123v.png?size=30px)](https://github.com/luisg123v) | Adds First Name to Employee
[hr_employee_relative](hr_employee_relative/) | 18.0.1.0.0 | | Allows storing information about employee's family
Expand Down
77 changes: 77 additions & 0 deletions hr_department_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
==================
HR department code
==================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:8819b63cdff39923d46da717ac356272ef989172df3005d61a2bca73b7832859
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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_department_code
: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_department_code
: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 add code in department.

**Table of contents**

.. contents::
:local:

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_department_code%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
-------

* Ecosoft

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

- Saran Lim. <[email protected]>
- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

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

This module is maintained by the OCA.

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

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

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions hr_department_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
15 changes: 15 additions & 0 deletions hr_department_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "HR department code",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "Human Resources",
"author": "Ecosoft, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
"depends": ["hr"],
"data": ["views/hr_department_views.xml"],
"installable": True,
"maintainer": ["Saran440"],
}
36 changes: 36 additions & 0 deletions hr_department_code/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_department_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-05-11 13:05+0000\n"
"Last-Translator: Maria Sparenberg <[email protected]>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: hr_department_code
#: model:ir.model.fields,field_description:hr_department_code.field_hr_department__code
msgid "Code"
msgstr "Code"

#. module: hr_department_code
#: model:ir.model,name:hr_department_code.model_hr_department
msgid "Department"
msgstr "Abteilung"

#~ msgid "Display Name"
#~ msgstr "Anzeigename"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Zuletzt geändert am"
37 changes: 37 additions & 0 deletions hr_department_code/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_department_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-08-22 12:07+0000\n"
"Last-Translator: Bole <[email protected]>\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"
"X-Generator: Weblate 4.3.2\n"

#. module: hr_department_code
#: model:ir.model.fields,field_description:hr_department_code.field_hr_department__code
msgid "Code"
msgstr "Šifra"

#. module: hr_department_code
#: model:ir.model,name:hr_department_code.model_hr_department
msgid "Department"
msgstr "Odjel"

#~ msgid "Display Name"
#~ msgstr "Naziv"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Zadnje modificirano"
24 changes: 24 additions & 0 deletions hr_department_code/i18n/hr_department_code.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_department_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.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_department_code
#: model:ir.model.fields,field_description:hr_department_code.field_hr_department__code
msgid "Code"
msgstr ""

#. module: hr_department_code
#: model:ir.model,name:hr_department_code.model_hr_department
msgid "Department"
msgstr ""
27 changes: 27 additions & 0 deletions hr_department_code/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_department_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-05-30 09:11+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_department_code
#: model:ir.model.fields,field_description:hr_department_code.field_hr_department__code
msgid "Code"
msgstr "Codice"

#. module: hr_department_code
#: model:ir.model,name:hr_department_code.model_hr_department
msgid "Department"
msgstr "Reparto"
3 changes: 3 additions & 0 deletions hr_department_code/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import hr_department
20 changes: 20 additions & 0 deletions hr_department_code/models/hr_department.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2021 Ecosoft Co., Ltd. (http://ecosoft.co.th)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import api, fields, models


class Department(models.Model):
_inherit = "hr.department"
_order = "code, name"

code = fields.Char()

@api.depends_context("hierarchical_naming")
@api.depends("code", "name")
def _compute_display_name(self):
res = super()._compute_display_name()
for record in self:
if record.code:
record.display_name = f"[{record.code}] {record.display_name}"
return res
3 changes: 3 additions & 0 deletions hr_department_code/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions hr_department_code/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Saran Lim. \<<[email protected]>\>
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
1 change: 1 addition & 0 deletions hr_department_code/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module add code in department.
Binary file added hr_department_code/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit da49c6e

Please sign in to comment.