-
-
Notifications
You must be signed in to change notification settings - Fork 334
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by alexey-pelykh
- Loading branch information
Showing
23 changed files
with
1,177 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
======================== | ||
HR Employee Cost History | ||
======================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:1b55368f9fc5a1e7131c787de6dbeb9ffe72aef85ca88de00e1d814b84c57785 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png | ||
:target: https://odoo-community.org/page/development-status | ||
:alt: Alpha | ||
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png | ||
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html | ||
:alt: License: LGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github | ||
:target: https://github.com/OCA/timesheet/tree/15.0/hr_employee_cost_history | ||
:alt: OCA/timesheet | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-hr_employee_cost_history | ||
: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/timesheet&target_branch=15.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to update employee's costs from a given date onwards, | ||
and logs cost changes in a separate table. | ||
|
||
.. IMPORTANT:: | ||
This is an alpha version, the data model and design can change at any time without warning. | ||
Only for development or testing purpose, do not use in production. | ||
`More details on development status <https://odoo-community.org/page/development-status>`_ | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
1. Go to Employees > and select an employee. | ||
2. In HR Settings > Application Settings click on 'Update Cost'. | ||
3. Set a new Cost and the From Date. Click on 'UPDATE'. | ||
4. Now a new button 'Cost History' has appeared. Click on it to see | ||
employee's cost changes. | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/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/timesheet/issues/new?body=module:%20hr_employee_cost_history%0Aversion:%2015.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 | ||
------- | ||
|
||
* Moduon | ||
|
||
Contributors | ||
------------ | ||
|
||
- Eduardo López (`Moduon <https://www.moduon.team/>`__) | ||
- Jairo Llopis (`Moduon <https://www.moduon.team/>`__) | ||
- Rafael Blasco (`Moduon <https://www.moduon.team/>`__) | ||
|
||
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-edlopen| image:: https://github.com/edlopen.png?size=40px | ||
:target: https://github.com/edlopen | ||
:alt: edlopen | ||
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px | ||
:target: https://github.com/rafaelbn | ||
:alt: rafaelbn | ||
|
||
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__: | ||
|
||
|maintainer-edlopen| |maintainer-rafaelbn| | ||
|
||
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/15.0/hr_employee_cost_history>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from . import models | ||
from . import wizards |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Copyright 2024 Moduon Team S.L. <info@moduon.team> | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
{ | ||
"name": "HR Employee Cost History", | ||
"summary": """Adds an history to employee's costs.""", | ||
"version": "15.0.1.0.0", | ||
"development_status": "Alpha", | ||
"category": "Human Resources", | ||
"website": "https://github.com/OCA/timesheet", | ||
"author": "Moduon, Odoo Community Association (OCA)", | ||
"maintainers": ["edlopen", "rafaelbn"], | ||
"license": "LGPL-3", | ||
"external_dependencies": {"python": ["freezegun"]}, | ||
"installable": True, | ||
"auto_install": False, | ||
"depends": [ | ||
"hr_timesheet", | ||
], | ||
"data": [ | ||
"security/ir.model.access.csv", | ||
"wizards/hr_employee_timesheet_cost_wizard_views.xml", | ||
"views/hr_employee_timesheet_cost_history_views.xml", | ||
"views/hr_employee_views.xml", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,146 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * hr_employee_cost_history | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 15.0+e\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-03-27 10:08+0000\n" | ||
"PO-Revision-Date: 2024-03-27 11:10+0100\n" | ||
"Last-Translator: Eduardo López <elp@moduon.team>\n" | ||
"Language-Team: \n" | ||
"Language: es\n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
"X-Generator: Poedit 3.4.2\n" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_timesheet_retroactive_cost_view_employee_form_inherit | ||
msgid "<i class=\"fa fa-fw o_button_icon fa-arrow-right\"/> Update Cost" | ||
msgstr "<i class=\"fa fa-fw o_button_icon fa-arrow-right\"/> Actualizar coste" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_timesheet_retroactive_cost_view_employee_form_inherit | ||
msgid "<i class=\"fa fa-fw o_button_icon fa-history\"/> Cost History" | ||
msgstr "<i class=\"fa fa-fw o_button_icon fa-history\"/> Histórico de coste" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_employee_timesheet_cost_wizard_view_form | ||
msgid "Cancel" | ||
msgstr "Cancelar" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,help:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__starting_date | ||
msgid "Change timesheet cost from this date onwards." | ||
msgstr "Cambiar el coste del parte de horas a partir de esta fecha." | ||
|
||
#. module: hr_employee_cost_history | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_employee_timesheet_cost_wizard_view_form | ||
msgid "Cost" | ||
msgstr "Coste" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__create_uid | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__create_uid | ||
msgid "Created by" | ||
msgstr "Creado por" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__create_date | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__create_date | ||
msgid "Created on" | ||
msgstr "Creado el" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__currency_id | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__currency_id | ||
msgid "Currency" | ||
msgstr "Moneda" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__display_name | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__display_name | ||
msgid "Display Name" | ||
msgstr "Nombre mostrado" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model,name:hr_employee_cost_history.model_hr_employee | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__employee_id | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__employee_id | ||
msgid "Employee" | ||
msgstr "Empleado" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.actions.act_window,name:hr_employee_cost_history.hr_employee_timesheet_cost_action | ||
#: model:ir.model,name:hr_employee_cost_history.model_hr_employee_timesheet_cost_history | ||
msgid "Employee Timesheet Cost History" | ||
msgstr "Histórico coste en parte de horas" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model,name:hr_employee_cost_history.model_hr_employee_timesheet_cost_wizard | ||
msgid "Employee timesheet cost wizard" | ||
msgstr "" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__starting_date | ||
msgid "From Date" | ||
msgstr "Desde" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__id | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__id | ||
msgid "ID" | ||
msgstr "" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history____last_update | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard____last_update | ||
msgid "Last Modified on" | ||
msgstr "Últimas páginas modificadas" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__write_uid | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__write_uid | ||
msgid "Last Updated by" | ||
msgstr "Última actualización por" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__write_date | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__write_date | ||
msgid "Last Updated on" | ||
msgstr "Última actualización el" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__starting_date | ||
msgid "Starting Date" | ||
msgstr "Fecha de inicio" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,help:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__starting_date | ||
msgid "The cost change has effect since this date." | ||
msgstr "El cambio de coste se aplica desde esta fecha." | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__timesheet_cost | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__timesheet_cost | ||
msgid "Timesheet Cost" | ||
msgstr "Coste del parte de horas" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee__timesheet_cost_history_ids | ||
msgid "Timesheet Cost History" | ||
msgstr "Histórico coste en parte de horas" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_employee_timesheet_cost_wizard_view_form | ||
msgid "Update" | ||
msgstr "Actualizar" | ||
|
||
#. module: hr_employee_cost_history | ||
#: model:ir.actions.act_window,name:hr_employee_cost_history.action_hr_employee_timesheet_cost_wizard | ||
#: model_terms:ir.ui.view,arch_db:hr_employee_cost_history.hr_employee_timesheet_cost_wizard_view_form | ||
msgid "Update Timesheet Cost" | ||
msgstr "Actualizar coste en partes de horas" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
from . import hr_employee | ||
from . import hr_employee_timesheet_cost_history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2024 Moduon Team S.L. <info@moduon.team> | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class HrEmployee(models.Model): | ||
_inherit = "hr.employee" | ||
|
||
timesheet_cost_history_ids = fields.One2many( | ||
comodel_name="hr.employee.timesheet.cost.history", | ||
inverse_name="employee_id", | ||
copy=False, | ||
) |
24 changes: 24 additions & 0 deletions
24
hr_employee_cost_history/models/hr_employee_timesheet_cost_history.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2024 Moduon Team S.L. <info@moduon.team> | ||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). | ||
|
||
from odoo import fields, models | ||
|
||
|
||
class HrEmployeeTimesheetCostHistory(models.Model): | ||
_name = "hr.employee.timesheet.cost.history" | ||
_description = "Employee Timesheet Cost History" | ||
_order = "create_date DESC" | ||
|
||
employee_id = fields.Many2one( | ||
comodel_name="hr.employee", | ||
string="Employee", | ||
) | ||
currency_id = fields.Many2one( | ||
comodel_name="res.currency", | ||
string="Currency", | ||
) | ||
hourly_cost = fields.Monetary(currency_field="currency_id") | ||
starting_date = fields.Date( | ||
help="The cost change has effect since this date.", | ||
default=fields.Date.context_today, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- Eduardo López ([Moduon](https://www.moduon.team/)) | ||
- Jairo Llopis ([Moduon](https://www.moduon.team/)) | ||
- Rafael Blasco ([Moduon](https://www.moduon.team/)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
This module allows to update employee's costs from a given date onwards, | ||
and logs cost changes in a separate table. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
To use this module, you need to: | ||
|
||
1. Go to Employees > and select an employee. | ||
2. In HR Settings > Application Settings click on 'Update Cost'. | ||
3. Set a new Cost and the From Date. Click on 'UPDATE'. | ||
4. Now a new button 'Cost History' has appeared. Click on it to see employee's | ||
cost changes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
access_hr_employee_timesheet_cost_user,access_hr_employee_timesheet_cost_user,model_hr_employee_timesheet_cost_history,hr.group_hr_user,1,0,0,0 | ||
access_hr_employee_timesheet_cost_wizard_user,access_hr_employee_timesheet_cost_wizard_user,model_hr_employee_timesheet_cost_wizard,hr.group_hr_user,1,1,1,1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.