Initial commit: OCA Mrp packages (117 packages)

This commit is contained in:
Ernad Husremovic 2025-08-29 15:43:05 +02:00
commit 277e84fd7a
4403 changed files with 395154 additions and 0 deletions

View file

@ -0,0 +1,46 @@
# HR Employee Cost History
Odoo addon: hr_employee_cost_history
## Installation
```bash
pip install odoo-bringout-oca-timesheet-hr_employee_cost_history
```
## Dependencies
This addon depends on:
- hr_timesheet
## Manifest Information
- **Name**: HR Employee Cost History
- **Version**: 16.0.1.1.0
- **Category**: Human Resources
- **License**: LGPL-3
- **Installable**: True
## Source
Based on [OCA/timesheet](https://github.com/OCA/timesheet) branch 16.0, addon `hr_employee_cost_history`.
## License
This package maintains the original LGPL-3 license from the upstream Odoo project.
## Documentation
- Overview: doc/OVERVIEW.md
- Architecture: doc/ARCHITECTURE.md
- Models: doc/MODELS.md
- Controllers: doc/CONTROLLERS.md
- Wizards: doc/WIZARDS.md
- Reports: doc/REPORTS.md
- Security: doc/SECURITY.md
- Install: doc/INSTALL.md
- Usage: doc/USAGE.md
- Configuration: doc/CONFIGURATION.md
- Dependencies: doc/DEPENDENCIES.md
- Troubleshooting: doc/TROUBLESHOOTING.md
- FAQ: doc/FAQ.md

View file

@ -0,0 +1,32 @@
# Architecture
```mermaid
flowchart TD
U[Users] -->|HTTP| V[Views and QWeb Templates]
V --> C[Controllers]
V --> W[Wizards Transient Models]
C --> M[Models and ORM]
W --> M
M --> R[Reports]
DX[Data XML] --> M
S[Security ACLs and Groups] -. enforces .-> M
subgraph Hr_employee_cost_history Module - hr_employee_cost_history
direction LR
M:::layer
W:::layer
C:::layer
V:::layer
R:::layer
S:::layer
DX:::layer
end
classDef layer fill:#eef8ff,stroke:#6ea8fe,stroke-width:1px
```
Notes
- Views include tree/form/kanban templates and report templates.
- Controllers provide website/portal routes when present.
- Wizards are UI flows implemented with `models.TransientModel`.
- Data XML loads data/demo records; Security defines groups and access.

View file

@ -0,0 +1,3 @@
# Configuration
Refer to Odoo settings for hr_employee_cost_history. Configure related models, access rights, and options as needed.

View file

@ -0,0 +1,3 @@
# Controllers
This module does not define custom HTTP controllers.

View file

@ -0,0 +1,5 @@
# Dependencies
This addon depends on:
- [hr_timesheet](../../odoo-bringout-oca-ocb-hr_timesheet)

View file

@ -0,0 +1,4 @@
# FAQ
- Q: Which Odoo version? A: 16.0 (OCA/OCB packaged).
- Q: How to enable? A: Start server with --addon hr_employee_cost_history or install in UI.

View file

@ -0,0 +1,7 @@
# Install
```bash
pip install odoo-bringout-oca-timesheet-hr_employee_cost_history"
# or
uv pip install odoo-bringout-oca-timesheet-hr_employee_cost_history"
```

View file

@ -0,0 +1,13 @@
# Models
Detected core models and extensions in hr_employee_cost_history.
```mermaid
classDiagram
class hr_employee_timesheet_cost_history
class hr_employee
```
Notes
- Classes show model technical names; fields omitted for brevity.
- Items listed under _inherit are extensions of existing models.

View file

@ -0,0 +1,6 @@
# Overview
Packaged Odoo addon: hr_employee_cost_history. Provides features documented in upstream Odoo 16 under this addon.
- Source: OCA/OCB 16.0, addon hr_employee_cost_history
- License: LGPL-3

View file

@ -0,0 +1,3 @@
# Reports
This module does not define custom reports.

View file

@ -0,0 +1,34 @@
# Security
Access control and security definitions in hr_employee_cost_history.
## Access Control Lists (ACLs)
Model access permissions defined in:
- **[ir.model.access.csv](../hr_employee_cost_history/security/ir.model.access.csv)**
- 2 model access rules
## Record Rules
Row-level security rules defined in:
```mermaid
graph TB
subgraph "Security Layers"
A[Users] --> B[Groups]
B --> C[Access Control Lists]
C --> D[Models]
B --> E[Record Rules]
E --> F[Individual Records]
end
```
Security files overview:
- **[ir.model.access.csv](../hr_employee_cost_history/security/ir.model.access.csv)**
- Model access permissions (CRUD rights)
Notes
- Access Control Lists define which groups can access which models
- Record Rules provide row-level security (filter records by user/group)
- Security groups organize users and define permission sets
- All security is enforced at the ORM level by Odoo

View file

@ -0,0 +1,5 @@
# Troubleshooting
- Ensure Python and Odoo environment matches repo guidance.
- Check database connectivity and logs if startup fails.
- Validate that dependent addons listed in DEPENDENCIES.md are installed.

View file

@ -0,0 +1,7 @@
# Usage
Start Odoo including this addon (from repo root):
```bash
python3 scripts/nix_odoo_web_server.py --db-name mydb --addon hr_employee_cost_history
```

View file

@ -0,0 +1,3 @@
# Wizards
This module does not include UI wizards.

View file

@ -0,0 +1,101 @@
========================
HR Employee Cost History
========================
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e05c63cdc9b7fb8934d79462374d61596d5eaf827ca28e5127717ed33928a244
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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-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/16.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-16-0/timesheet-16-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=16.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.
**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:%2016.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/16.0/hr_employee_cost_history>`_ project on GitHub.
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

View file

@ -0,0 +1,4 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from . import models
from . import wizards

View file

@ -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": "16.0.1.1.0",
"development_status": "Beta",
"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",
],
}

View file

@ -0,0 +1,148 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_cost_history
#
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_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\"/> Ažuriraj cijenu"
#. 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\"/> Povijest cijena"
#. 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 "Otkaži"
#. 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 "Promijeni cijenu timesheet-a od ovog datuma nadalje."
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__comment
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__comment
msgid "Comment"
msgstr "Komentar"
#. 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 "Trošak"
#. 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 "Kreirao"
#. 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 "Kreirano"
#. 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 "Valuta"
#. 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 "Prikazani naziv"
#. 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 "Zaposleni"
#. 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 "Povijest cijena timesheet-a zaposlenika"
#. 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 "Čarobnjak cijene timesheet-a zaposlenika"
#. 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 "Od datuma"
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__hourly_cost
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__hourly_cost
msgid "Hourly Cost"
msgstr "Trošak po satu rada"
#. 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 "ID"
#. 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 "Zadnje mijenjano"
#. 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 "Zadnji ažurirao"
#. 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 "Zadnje ažurirano"
#. 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 "Datum početka"
#. 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 "Promjena cijene ima učinak od ovog datuma."
#. 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 "Povijest cijena timesheet-a"
#. 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 "Ažuriraj"
#. 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 "Ažuriraj cijenu timesheet-a"

View file

@ -0,0 +1,155 @@
# 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:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__comment
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__comment
msgid "Comment"
msgstr ""
#. 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__hourly_cost
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__hourly_cost
msgid "Hourly Cost"
msgstr ""
#. 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_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"
#~ msgid "Timesheet Cost"
#~ msgstr "Coste del parte de horas"

View file

@ -0,0 +1,152 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_cost_history
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-03-13 15:06+0000\n"
"Last-Translator: Arnaud LAYEC <arnaudlayec@gmail.com>\n"
"Language-Team: none\n"
"Language: fr\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 5.10.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\"/> Modifier le coût"
#. 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\"/> Historique des coûts"
#. 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 "Annuler"
#. 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 ""
"Modifie le coût des lignes de feuilles de temps saisies depuis cette date."
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__comment
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__comment
msgid "Comment"
msgstr ""
#. 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 "Coût"
#. 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 "Créé par"
#. 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 "Créé le"
#. 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 "Devise"
#. 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 "Nom affiché"
#. 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 "Employé"
#. 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 "Historique de coût des temps de l'employée"
#. 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 "Assistant des coûts de temps de l'employé"
#. 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 "Depuis la date"
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__hourly_cost
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__hourly_cost
msgid "Hourly Cost"
msgstr "Coût horaire"
#. 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 "ID"
#. 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 "Dernière modification le"
#. 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 "Dernière mise à jour par"
#. 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 "Dernière mise à jour le"
#. 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 "Date de début"
#. 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 "Le changement de coût prend effet à partir de cette date."
#. 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 "Historique des coûts des lignes de feuilles de temps"
#. 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 "Modifier"
#. 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 "Modiifer le coût des temps"

View file

@ -0,0 +1,148 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_cost_history
#
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_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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__comment
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__comment
msgid "Comment"
msgstr ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__hourly_cost
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__hourly_cost
msgid "Hourly Cost"
msgstr ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""
#. 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 ""

View file

@ -0,0 +1,151 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_employee_cost_history
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-05-20 06:59+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\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 5.10.4\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\"/> Aggiorna costo"
#. 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\"/> Cronologia costo"
#. 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 "Annulla"
#. 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 "Modifica i costi fogli ore da questa data in poi."
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__comment
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__comment
msgid "Comment"
msgstr "Commento"
#. 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 "Costo"
#. 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 "Creato da"
#. 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 "Creato il"
#. 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 "Valuta"
#. 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 "Nome visualizzato"
#. 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 "Dipendente"
#. 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 "Cronologia costo fogli ore dipendenti"
#. 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 "Procedura guidata costo fogli ore dipendenti"
#. 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 "Dalla data"
#. module: hr_employee_cost_history
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_history__hourly_cost
#: model:ir.model.fields,field_description:hr_employee_cost_history.field_hr_employee_timesheet_cost_wizard__hourly_cost
msgid "Hourly Cost"
msgstr "Costo orario"
#. 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 "ID"
#. 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 "Ultima modifica il"
#. 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 "Ultimo aggiornamento di"
#. 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 "Ultimo aggiornamento il"
#. 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 "Data inizio"
#. 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 "La modifica del costo ha effetto da questa data."
#. 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 "Cronologia costo foflio ore"
#. 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 "Aggiorna"
#. 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 "Aggiorna costo foglio ore"

View file

@ -0,0 +1,2 @@
from . import hr_employee
from . import hr_employee_timesheet_cost_history

View file

@ -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,
)

View file

@ -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).
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,
)
comment = fields.Char()

View file

@ -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/))

View file

@ -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.

View file

@ -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.

View file

@ -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
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 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
3 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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View file

@ -0,0 +1,440 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
<title>HR Employee Cost History</title>
<style type="text/css">
/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
*/
/* used to remove borders from tables and images */
.borderless, table.borderless td, table.borderless th {
border: 0 }
table.borderless td, table.borderless th {
/* Override padding for "table.docutils td" with "! important".
The right padding separates the table cells. */
padding: 0 0.5em 0 0 ! important }
.first {
/* Override more specific margin styles with "! important". */
margin-top: 0 ! important }
.last, .with-subtitle {
margin-bottom: 0 ! important }
.hidden {
display: none }
.subscript {
vertical-align: sub;
font-size: smaller }
.superscript {
vertical-align: super;
font-size: smaller }
a.toc-backref {
text-decoration: none ;
color: black }
blockquote.epigraph {
margin: 2em 5em ; }
dl.docutils dd {
margin-bottom: 0.5em }
object[type="image/svg+xml"], object[type="application/x-shockwave-flash"] {
overflow: hidden;
}
/* Uncomment (and remove this text!) to get bold-faced definition list terms
dl.docutils dt {
font-weight: bold }
*/
div.abstract {
margin: 2em 5em }
div.abstract p.topic-title {
font-weight: bold ;
text-align: center }
div.admonition, div.attention, div.caution, div.danger, div.error,
div.hint, div.important, div.note, div.tip, div.warning {
margin: 2em ;
border: medium outset ;
padding: 1em }
div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title {
font-weight: bold ;
font-family: sans-serif }
div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title, .code .error {
color: red ;
font-weight: bold ;
font-family: sans-serif }
/* Uncomment (and remove this text!) to get reduced vertical space in
compound paragraphs.
div.compound .compound-first, div.compound .compound-middle {
margin-bottom: 0.5em }
div.compound .compound-last, div.compound .compound-middle {
margin-top: 0.5em }
*/
div.dedication {
margin: 2em 5em ;
text-align: center ;
font-style: italic }
div.dedication p.topic-title {
font-weight: bold ;
font-style: normal }
div.figure {
margin-left: 2em ;
margin-right: 2em }
div.footer, div.header {
clear: both;
font-size: smaller }
div.line-block {
display: block ;
margin-top: 1em ;
margin-bottom: 1em }
div.line-block div.line-block {
margin-top: 0 ;
margin-bottom: 0 ;
margin-left: 1.5em }
div.sidebar {
margin: 0 0 0.5em 1em ;
border: medium outset ;
padding: 1em ;
background-color: #ffffee ;
width: 40% ;
float: right ;
clear: right }
div.sidebar p.rubric {
font-family: sans-serif ;
font-size: medium }
div.system-messages {
margin: 5em }
div.system-messages h1 {
color: red }
div.system-message {
border: medium outset ;
padding: 1em }
div.system-message p.system-message-title {
color: red ;
font-weight: bold }
div.topic {
margin: 2em }
h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
margin-top: 0.4em }
h1.title {
text-align: center }
h2.subtitle {
text-align: center }
hr.docutils {
width: 75% }
img.align-left, .figure.align-left, object.align-left, table.align-left {
clear: left ;
float: left ;
margin-right: 1em }
img.align-right, .figure.align-right, object.align-right, table.align-right {
clear: right ;
float: right ;
margin-left: 1em }
img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
}
table.align-center {
margin-left: auto;
margin-right: auto;
}
.align-left {
text-align: left }
.align-center {
clear: both ;
text-align: center }
.align-right {
text-align: right }
/* reset inner alignment in figures */
div.align-right {
text-align: inherit }
/* div.align-center * { */
/* text-align: left } */
.align-top {
vertical-align: top }
.align-middle {
vertical-align: middle }
.align-bottom {
vertical-align: bottom }
ol.simple, ul.simple {
margin-bottom: 1em }
ol.arabic {
list-style: decimal }
ol.loweralpha {
list-style: lower-alpha }
ol.upperalpha {
list-style: upper-alpha }
ol.lowerroman {
list-style: lower-roman }
ol.upperroman {
list-style: upper-roman }
p.attribution {
text-align: right ;
margin-left: 50% }
p.caption {
font-style: italic }
p.credits {
font-style: italic ;
font-size: smaller }
p.label {
white-space: nowrap }
p.rubric {
font-weight: bold ;
font-size: larger ;
color: maroon ;
text-align: center }
p.sidebar-title {
font-family: sans-serif ;
font-weight: bold ;
font-size: larger }
p.sidebar-subtitle {
font-family: sans-serif ;
font-weight: bold }
p.topic-title {
font-weight: bold }
pre.address {
margin-bottom: 0 ;
margin-top: 0 ;
font: inherit }
pre.literal-block, pre.doctest-block, pre.math, pre.code {
margin-left: 2em ;
margin-right: 2em }
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
pre.code .literal.string, code .literal.string { color: #0C5404 }
pre.code .name.builtin, code .name.builtin { color: #352B84 }
pre.code .deleted, code .deleted { background-color: #DEB0A1}
pre.code .inserted, code .inserted { background-color: #A3D289}
span.classifier {
font-family: sans-serif ;
font-style: oblique }
span.classifier-delimiter {
font-family: sans-serif ;
font-weight: bold }
span.interpreted {
font-family: sans-serif }
span.option {
white-space: nowrap }
span.pre {
white-space: pre }
span.problematic, pre.problematic {
color: red }
span.section-subtitle {
/* font-size relative to parent (h1..h6 element) */
font-size: 80% }
table.citation {
border-left: solid 1px gray;
margin-left: 1px }
table.docinfo {
margin: 2em 4em }
table.docutils {
margin-top: 0.5em ;
margin-bottom: 0.5em }
table.footnote {
border-left: solid 1px black;
margin-left: 1px }
table.docutils td, table.docutils th,
table.docinfo td, table.docinfo th {
padding-left: 0.5em ;
padding-right: 0.5em ;
vertical-align: top }
table.docutils th.field-name, table.docinfo th.docinfo-name {
font-weight: bold ;
text-align: left ;
white-space: nowrap ;
padding-left: 0 }
/* "booktabs" style (no vertical lines) */
table.docutils.booktabs {
border: 0px;
border-top: 2px solid;
border-bottom: 2px solid;
border-collapse: collapse;
}
table.docutils.booktabs * {
border: 0px;
}
table.docutils.booktabs th {
border-bottom: thin solid;
text-align: left;
}
h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
font-size: 100% }
ul.auto-toc {
list-style-type: none }
</style>
</head>
<body>
<div class="document" id="hr-employee-cost-history">
<h1 class="title">HR Employee Cost History</h1>
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e05c63cdc9b7fb8934d79462374d61596d5eaf827ca28e5127717ed33928a244
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/timesheet/tree/16.0/hr_employee_cost_history"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_employee_cost_history"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/timesheet&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module allows to update employees costs from a given date onwards,
and logs cost changes in a separate table.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
<li><a class="reference internal" href="#usage" id="toc-entry-1">Usage</a></li>
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="usage">
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
<p>To use this module, you need to:</p>
<ol class="arabic simple">
<li>Go to Employees &gt; and select an employee.</li>
<li>In HR Settings &gt; Application Settings click on Update Cost.</li>
<li>Set a new Cost and the From Date. Click on UPDATE.</li>
<li>Now a new button Cost History has appeared. Click on it to see
employees cost changes.</li>
</ol>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_employee_cost_history%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
<div class="section" id="authors">
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<ul class="simple">
<li>Moduon</li>
</ul>
</div>
<div class="section" id="contributors">
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Eduardo López (<a class="reference external" href="https://www.moduon.team/">Moduon</a>)</li>
<li>Jairo Llopis (<a class="reference external" href="https://www.moduon.team/">Moduon</a>)</li>
<li>Rafael Blasco (<a class="reference external" href="https://www.moduon.team/">Moduon</a>)</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<p>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.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<p><a class="reference external image-reference" href="https://github.com/edlopen"><img alt="edlopen" src="https://github.com/edlopen.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/rafaelbn"><img alt="rafaelbn" src="https://github.com/rafaelbn.png?size=40px" /></a></p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/16.0/hr_employee_cost_history">OCA/timesheet</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
</div>
</body>
</html>

View file

@ -0,0 +1,3 @@
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from . import test_hr_timesheet

View file

@ -0,0 +1,223 @@
# Copyright 2024 Moduon Team S.L. <info@moduon.team>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from datetime import date
from dateutil.relativedelta import relativedelta
from freezegun import freeze_time
from odoo.tests.common import Form, TransactionCase, new_test_user, users
@freeze_time("2024-02-23", tick=True)
class HrEmployeeCostHistory(TransactionCase):
@classmethod
def setUpClass(cls):
super(HrEmployeeCostHistory, cls).setUpClass()
cls.default_plan = cls.env["account.analytic.plan"].create(
{"name": "Default", "company_id": False}
)
cls.analytic_account = cls.env["account.analytic.account"].create(
{
"name": "Analytic Account for Test Customer",
"code": "TEST",
"plan_id": cls.default_plan.id,
}
)
# users
new_test_user(
cls.env,
login="test_user_manager",
groups="hr_timesheet.group_timesheet_manager",
)
cls.user_employee = new_test_user(
cls.env,
login="test_user_employee",
groups="hr_timesheet.group_hr_timesheet_user",
)
# employee
cls.employee = cls.env["hr.employee"].create(
{
"name": "User Empl Employee",
"hourly_cost": 10.0,
"user_id": cls.user_employee.id,
}
)
# project and tasks
cls.project_customer = cls.env["project.project"].create(
{
"name": "Project X",
"allow_timesheets": True,
"analytic_account_id": cls.analytic_account.id,
}
)
cls.task1 = cls.env["project.task"].create(
{
"name": "Task One",
"priority": "0",
"kanban_state": "normal",
"project_id": cls.project_customer.id,
}
)
cls.task2 = cls.env["project.task"].create(
{
"name": "Task Two",
"priority": "1",
"kanban_state": "done",
"project_id": cls.project_customer.id,
}
)
# timesheets
cls.timesheets = cls.env["account.analytic.line"].create(
[
{
"project_id": cls.project_customer.id,
"task_id": cls.task1.id,
"name": "Timesheet 1",
"unit_amount": 4,
"user_id": cls.user_employee.id,
"employee_id": cls.employee.id,
"date": date.today() - relativedelta(days=5),
},
{
"project_id": cls.project_customer.id,
"task_id": cls.task1.id,
"name": "Timesheet 2",
"unit_amount": 3,
"user_id": cls.user_employee.id,
"employee_id": cls.employee.id,
"date": date.today() - relativedelta(days=3),
},
{
"project_id": cls.project_customer.id,
"task_id": cls.task2.id,
"name": "Timesheet 3",
"unit_amount": 2,
"user_id": cls.user_employee.id,
"employee_id": cls.employee.id,
"date": date.today() - relativedelta(days=1),
},
]
)
def new_timesheet_cost_wizard(self, employee, cost, date_from):
"""Create a new wizard for this test's employee."""
wizard = Form(
self.env["hr.employee.timesheet.cost.wizard"].with_context(
default_employee_id=employee.id,
default_hourly_cost=cost,
default_starting_date=date_from,
)
)
wizard_result = wizard.save()
wizard_result.update_employee_cost()
@users("test_user_manager")
def test_update_employee_cost_change(self):
"""Test modify employee's costs."""
old_cost = sum(
self.env["account.analytic.line"]
.search([("project_id", "=", self.project_customer.id)])
.mapped("amount")
)
old_cost = self.env["account.analytic.line"].read_group(
[("project_id", "=", self.project_customer.id)],
["amount"],
["project_id"],
)[0]["amount"]
self.assertEqual(old_cost, -90.0)
self.new_timesheet_cost_wizard(
self.employee, 15.0, date.today() - relativedelta(days=2)
)
new_cost = sum(
self.env["account.analytic.line"]
.search([("project_id", "=", self.project_customer.id)])
.mapped("amount")
)
self.assertEqual(new_cost, -100.0)
self.new_timesheet_cost_wizard(
self.employee, 20.0, date.today() - relativedelta(days=4)
)
new_cost = sum(
self.env["account.analytic.line"]
.search([("project_id", "=", self.project_customer.id)])
.mapped("amount")
)
self.assertEqual(new_cost, -140.0)
self.new_timesheet_cost_wizard(
self.employee, 20.0, date.today() - relativedelta(days=5)
)
new_cost = sum(
self.env["account.analytic.line"]
.search([("project_id", "=", self.project_customer.id)])
.mapped("amount")
)
self.assertEqual(new_cost, -180.0)
@users("test_user_manager")
def test_update_employee_history_cost(self):
"""Test employee history cost is consistent when dates overlap."""
# days ago when the cost was changed
days_history_cost = [15, 10, 5, 1]
for days in days_history_cost:
self.new_timesheet_cost_wizard(
self.employee, 15.0, date.today() - relativedelta(days=days)
)
# overlap the last two cost changes
self.new_timesheet_cost_wizard(
self.employee, 15.0, date.today() - relativedelta(days=7)
)
new_days_history_cost = [15, 10, 7]
timesheet_cost_ids = self.env["hr.employee.timesheet.cost.history"].search(
[
("employee_id", "=", self.employee.id),
]
)
self.assertEqual(len(timesheet_cost_ids), len(new_days_history_cost))
for timesheet_cost, days in zip(timesheet_cost_ids, new_days_history_cost):
self.assertEqual(
timesheet_cost.starting_date,
date.today() - relativedelta(days=days),
)
# modify same day but change cost
self.new_timesheet_cost_wizard(
self.employee, 20.0, date.today() - relativedelta(days=7)
)
timesheet_cost_ids = self.env["hr.employee.timesheet.cost.history"].search(
[
("employee_id", "=", self.employee.id),
]
)
self.assertEqual(len(timesheet_cost_ids), len(new_days_history_cost))
for timesheet_cost, days in zip(timesheet_cost_ids, new_days_history_cost):
self.assertEqual(
timesheet_cost.starting_date,
date.today() - relativedelta(days=days),
)
last_timesheet = timesheet_cost_ids[-1]
self.assertEqual(last_timesheet.hourly_cost, 20.0)
@users("test_user_manager")
def test_field_comment(self):
"""Test comment field."""
wizard = Form(
self.env["hr.employee.timesheet.cost.wizard"].with_context(
default_employee_id=self.employee.id,
default_hourly_cost=123,
default_starting_date=date.today(),
default_comment="Test comment",
)
)
wizard_result = wizard.save()
wizard_result.update_employee_cost()
comment = (
self.env["hr.employee.timesheet.cost.history"]
.search(
[
("employee_id", "=", self.employee.id),
("hourly_cost", "=", 123),
]
)
.comment
)
self.assertEqual(comment, "Test comment")

View file

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 Moduon Team S.L. <info@moduon.team>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
<odoo>
<record id="hr_employee_timesheet_cost_view_tree" model="ir.ui.view">
<field name="name">hr.employee.timesheet.cost.history.view.tree</field>
<field name="model">hr.employee.timesheet.cost.history</field>
<field name="arch" type="xml">
<tree>
<field name="hourly_cost" />
<field name="starting_date" />
<field name="comment" />
<field name="create_uid" optional="hide" />
<field name="create_date" optional="hide" />
</tree>
</field>
</record>
<record id="hr_employee_timesheet_cost_action" model="ir.actions.act_window">
<field name="name">Employee Timesheet Cost History</field>
<field name="res_model">hr.employee.timesheet.cost.history</field>
<field name="view_mode">tree</field>
<field name="domain">[('employee_id', '=', active_id)]</field>
<field name="target">current</field>
</record>
</odoo>

View file

@ -0,0 +1,50 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 Moduon Team S.L. <info@moduon.team>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
<odoo>
<record
id="hr_timesheet_retroactive_cost_view_employee_form_inherit"
model="ir.ui.view"
>
<field name="name">hr.employee.view.form.inherit</field>
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr_hourly_cost.view_employee_form" />
<field name="arch" type="xml">
<xpath expr="//field[@name='hourly_cost']" position="attributes">
<attribute name="readonly">1</attribute>
</xpath>
<xpath expr="//field[@name='currency_id']" position="before">
<field
name="timesheet_cost_history_ids"
invisible="1"
groups="hr.group_hr_user"
/>
<button
type="action"
name="%(action_hr_employee_timesheet_cost_wizard)d"
class="btn btn-link oe_inline"
role="button"
groups="hr.group_hr_user"
context="{'default_employee_id': id, 'default_hourly_cost': hourly_cost}"
>
<i class="fa fa-fw o_button_icon fa-arrow-right" /> Update Cost
</button>
<button
type="action"
name="%(hr_employee_timesheet_cost_action)d"
class="btn btn-link oe_inline"
role="button"
context="{'default_employee_id': id}"
groups="hr.group_hr_user"
attrs="{'invisible': [('timesheet_cost_history_ids', '=', [])]}"
>
<i class="fa fa-fw o_button_icon fa-history" /> Cost History
</button>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1 @@
from . import hr_employee_timesheet_cost_wizard

View file

@ -0,0 +1,70 @@
# Copyright 2022-2024 Moduon Team S.L. <info@moduon.team>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
from odoo import api, fields, models
class HrEmployeeTimesheetCost(models.TransientModel):
_name = "hr.employee.timesheet.cost.wizard"
_description = "Employee timesheet cost wizard"
employee_id = fields.Many2one(
comodel_name="hr.employee", string="Employee", ondelete="cascade", required=True
)
currency_id = fields.Many2one(
"res.currency", string="Currency", ondelete="cascade", required=True
)
hourly_cost = fields.Monetary(currency_field="currency_id", required=True)
starting_date = fields.Date(
required=True,
help="Change timesheet cost from this date onwards.",
default=fields.Datetime.now,
string="From Date",
)
comment = fields.Char()
@api.model
def default_get(self, fields):
rec = super().default_get(fields)
rec.update(
{
"currency_id": self.env.company.currency_id.id,
}
)
return rec
def update_employee_cost(self):
"""Recalculates employee timesheet cost from the given date.
This method uses the base function _timesheet_postprocess from
account_analytic_line (hr_timesheet) to recalculate employee costs.
Finally logs cost changes in cost history model.
"""
self.ensure_one()
bad_costs = self.employee_id.timesheet_cost_history_ids.filtered_domain(
[("starting_date", ">=", self.starting_date)]
)
costs = self.employee_id.timesheet_cost_history_ids - bad_costs
self.employee_id.sudo().write(
{
"hourly_cost": self.hourly_cost,
"timesheet_cost_history_ids": [
fields.Command.set(costs.ids),
fields.Command.create(
{
"employee_id": self.employee_id.id,
"currency_id": self.currency_id.id,
"hourly_cost": self.hourly_cost,
"starting_date": self.starting_date,
"comment": self.comment,
}
),
],
}
)
timesheet_ids = self.env["account.analytic.line"].search(
[
("employee_id", "=", self.employee_id.id),
("date", ">=", self.starting_date),
]
)
timesheet_ids._timesheet_postprocess({"employee_id": self.employee_id.id})

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 Moduon Team S.L. <info@moduon.team>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl). -->
<odoo>
<record id="hr_employee_timesheet_cost_wizard_view_form" model="ir.ui.view">
<field name="name">hr_employee_timesheet_cost_wizard.view.form</field>
<field name="model">hr.employee.timesheet.cost.wizard</field>
<field name="arch" type="xml">
<form string="Update Timesheet Cost">
<sheet>
<group>
<group>
<field name="hourly_cost" string="Cost" />
</group>
<group>
<field name="starting_date" />
</group>
</group>
<group>
<field name="comment" />
</group>
</sheet>
<footer>
<button
name="update_employee_cost"
string="Update"
type="object"
class="btn-primary"
data-hotkey="q"
/>
<button
string="Cancel"
class="btn-secondary"
special="cancel"
data-hotkey="z"
/>
</footer>
</form>
</field>
</record>
<record id="action_hr_employee_timesheet_cost_wizard" model="ir.actions.act_window">
<field name="name">Update Timesheet Cost</field>
<field name="res_model">hr.employee.timesheet.cost.wizard</field>
<field name="view_mode">form</field>
<field name="view_id" ref="hr_employee_timesheet_cost_wizard_view_form" />
<field name="target">new</field>
</record>
</odoo>

View file

@ -0,0 +1,42 @@
[project]
name = "odoo-bringout-oca-timesheet-hr_employee_cost_history"
version = "16.0.0"
description = "HR Employee Cost History - Adds an history to employee's costs."
authors = [
{ name = "Ernad Husremovic", email = "hernad@bring.out.ba" }
]
dependencies = [
"odoo-bringout-oca-ocb-hr_timesheet>=16.0.0",
"requests>=2.25.1"
]
readme = "README.md"
requires-python = ">= 3.11"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Office/Business",
]
[project.urls]
homepage = "https://github.com/bringout/0"
repository = "https://github.com/bringout/0"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.hatch.build.targets.wheel]
packages = ["hr_employee_cost_history"]
[tool.rye]
managed = true
dev-dependencies = [
"pytest>=8.4.1",
]