Skip to content

Commit

Permalink
TA#72110 [16.0][MIG] hr_contract_wage_type (#80)
Browse files Browse the repository at this point in the history
TA#72110 [16.0][MIG] hr_contract_wage_type
---------

Co-authored-by: Lanto R. <124650562+lanto-razafindrabe@users.noreply.github.com>
Co-authored-by: Majda EL MARIOULI <majdaelmariouli@gmail.com>
  • Loading branch information
3 people authored Jan 29, 2025
1 parent 51e9875 commit dbbdb8a
Show file tree
Hide file tree
Showing 11 changed files with 124 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"license": "LGPL-3",
"category": "Other",
"summary": "Install all addons required for testing.",
"depends": ["hr_working_space"],
"depends": [
"hr_contract_wage_type",
"hr_working_space",
],
"installable": True,
}
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ COPY ./gitoo.yml /gitoo.yml
RUN gitoo install-all --conf_file /gitoo.yml --destination "${THIRD_PARTY_ADDONS}"

USER odoo

COPY hr_contract_wage_type /mnt/extra-addons/hr_contract_wage_type
COPY hr_working_space /mnt/extra-addons/hr_working_space

COPY .docker_files/main /mnt/extra-addons/main
Expand Down
11 changes: 11 additions & 0 deletions hr_contract_wage_type/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
HR Contract Wage Type
=====================
This module adds the `Wage Type` field on contracts.

This field is used to distinguish between hourly, monthly and yearly wages.

.. image:: static/description/contract_form.png

Contributors
------------
* Numigi (tm) and all its contributors (https://bit.ly/numigiens)
4 changes: 4 additions & 0 deletions hr_contract_wage_type/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import models
19 changes: 19 additions & 0 deletions hr_contract_wage_type/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

{
"name": "HR Contract Wage Type",
"version": "16.0.1.0.0",
"author": "Numigi",
"maintainer": "Numigi",
"license": "LGPL-3",
"category": "Human Resources",
"summary": "Distinguish between hourly / monthly / yearly wages",
"depends": [
"hr_contract",
],
"data": [
"views/hr_contract_view.xml",
],
"installable": True,
}
46 changes: 46 additions & 0 deletions hr_contract_wage_type/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_contract_wage_type
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-01-21 14:19+0000\n"
"PO-Revision-Date: 2025-01-21 14:19+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_contract_wage_type
#: model_terms:ir.ui.view,arch_db:hr_contract_wage_type.hr_contract_view_form
msgid "<span>/</span>"
msgstr "<span>/</span>"

#. module: hr_contract_wage_type
#: model:ir.model,name:hr_contract_wage_type.model_hr_contract
msgid "Contract"
msgstr "Contrat de l'employé"

#. module: hr_contract_wage_type
#: model:ir.model.fields.selection,name:hr_contract_wage_type.selection__hr_contract__wage_type__hour
msgid "Hour"
msgstr "Heure"

#. module: hr_contract_wage_type
#: model:ir.model.fields.selection,name:hr_contract_wage_type.selection__hr_contract__wage_type__month
msgid "Month"
msgstr "Mois"

#. module: hr_contract_wage_type
#: model:ir.model.fields,field_description:hr_contract_wage_type.field_hr_contract__wage_type
msgid "Wage Type"
msgstr "Type de salaire"

#. module: hr_contract_wage_type
#: model:ir.model.fields.selection,name:hr_contract_wage_type.selection__hr_contract__wage_type__year
msgid "Year"
msgstr "Année"
4 changes: 4 additions & 0 deletions hr_contract_wage_type/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from . import hr_contract
16 changes: 16 additions & 0 deletions hr_contract_wage_type/models/hr_contract.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022 Numigi (tm) and all its contributors (https://bit.ly/numigiens)
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).

from odoo import fields, models


class HrContract(models.Model):
_inherit = "hr.contract"

wage_type = fields.Selection(
[
("hour", "Hour"),
("month", "Month"),
("year", "Year"),
]
)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hr_contract_wage_type/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.
19 changes: 19 additions & 0 deletions hr_contract_wage_type/views/hr_contract_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<record id="hr_contract_view_form" model="ir.ui.view">
<field name="name">HR Contract: add wage type</field>
<field name="model">hr.contract</field>
<field name="inherit_id" ref="hr_contract.hr_contract_view_form" />
<field name="arch" type="xml">
<div name="wage" position="replace">
<div class="o_row" name="wage">
<field name="wage" nolabel="1" />
<span>/</span>
<field name="wage_type" nolabel="1" required="1" />
</div>
</div>
</field>
</record>

</odoo>

0 comments on commit dbbdb8a

Please sign in to comment.