Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[17.0][ADD] hr_work_entry_profile: Migration to 17.0 #1387

Open
wants to merge 6 commits into
base: 17.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 86 additions & 0 deletions hr_work_entry_profile/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
=====================
HR Work Entry Profile
=====================

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

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

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

Add smart button ``Mon Profil > Prestations RH (hr.work.entry)``

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/hr/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/hr/issues/new?body=module:%20hr_work_entry_profile%0Aversion:%2017.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
-------

* Mint System GmbH

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

- Janik von Rotz [email protected]
- Do Anh Duy [email protected]

Other credits
-------------

The original development of this module has been done by Mint System. It
can be found in:
https://github.com/Mint-System/Odoo-Apps-HR/blob/15.0/hr_work_entry_profile

This module has been ported to the OCA with their agreement.

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

This module is maintained by the OCA.

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

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

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions hr_work_entry_profile/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
20 changes: 20 additions & 0 deletions hr_work_entry_profile/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2023 Janik von Rotz <[email protected]>
# Copyright 2024 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "HR Work Entry Profile",
"summary": """
User can access their work entries from the profile view.
""",
"author": "Mint System GmbH, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/hr",
"category": "Human Resources",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"depends": ["hr_work_entry"],
"data": ["views/res_users.xml"],
"installable": True,
"application": False,
"auto_install": False,
"images": ["images/screen.png"],
}
26 changes: 26 additions & 0 deletions hr_work_entry_profile/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_work_entry_profile
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-07 06:52+0000\n"
"PO-Revision-Date: 2023-04-07 06:52+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_work_entry_profile
#: model:ir.model,name:hr_work_entry_profile.model_res_users
msgid "Users"
msgstr "Benutzer"

#. module: hr_work_entry_profile
#: model_terms:ir.ui.view,arch_db:hr_work_entry_profile.res_users_view_form_profile
msgid "Work Entries"
msgstr "Arbeitseinträge"
26 changes: 26 additions & 0 deletions hr_work_entry_profile/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_work_entry_profile
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-04-07 06:53+0000\n"
"PO-Revision-Date: 2023-04-07 06:53+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: hr_work_entry_profile
#: model:ir.model,name:hr_work_entry_profile.model_res_users
msgid "Users"
msgstr "Utilisateurs"

#. module: hr_work_entry_profile
#: model_terms:ir.ui.view,arch_db:hr_work_entry_profile.res_users_view_form_profile
msgid "Work Entries"
msgstr "Prestations"
Binary file added hr_work_entry_profile/images/screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions hr_work_entry_profile/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import res_users
13 changes: 13 additions & 0 deletions hr_work_entry_profile/models/res_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright 2023 Janik von Rotz <[email protected]>
# Copyright 2024 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import models


class ResUsers(models.Model):
_inherit = "res.users"

def action_open_work_entries(self):
self.ensure_one()
return self.employee_id.action_open_work_entries()

Check warning on line 13 in hr_work_entry_profile/models/res_users.py

View check run for this annotation

Codecov / codecov/patch

hr_work_entry_profile/models/res_users.py#L12-L13

Added lines #L12 - L13 were not covered by tests
3 changes: 3 additions & 0 deletions hr_work_entry_profile/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions hr_work_entry_profile/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Janik von Rotz <[email protected]>
* Do Anh Duy <[email protected]>
4 changes: 4 additions & 0 deletions hr_work_entry_profile/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The original development of this module has been done by Mint System.
It can be found in: https://github.com/Mint-System/Odoo-Apps-HR/blob/15.0/hr_work_entry_profile

This module has been ported to the OCA with their agreement.
1 change: 1 addition & 0 deletions hr_work_entry_profile/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add smart button `Mon Profil > Prestations RH (hr.work.entry)`
Binary file added hr_work_entry_profile/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions hr_work_entry_profile/static/description/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body><a href="http://www.gnu.org/licenses/gpl-3.0-standalone.html">
<img alt="License: GPL-3" src="https://img.shields.io/badge/licence-GPL--3-blue.svg" />
</a>
<section id="hr-work-entry-profile">
<h1>HR Work Entry Profile</h1>
<p>User can access their work entries from the profile view.</p>
<p>For a detailed documentation have a look at <a href="https://www.odoo-wiki.org/hr-work-entry-profile.html">https://www.odoo-wiki.org/hr-work-entry-profile.html</a>.</p>
<img height="100" width="100" alt="Icon" src="https://raw.githubusercontent.com/Mint-System/Wiki/master/assets/icon-box.png" />
<section id="configuration">
<h2>Configuration</h2>
<ul>
<li>No additional configurations needed</li>
</ul>
<section id="maintainer">
<h3>Maintainer</h3>
<a href="https://www.mint-system.ch">
<img src="https://raw.githubusercontent.com/Mint-System/Wiki/master/assets/mint-system-logo.png" alt="" />
</a>
<p>This module is maintained by Mint System GmbH.</p>
<p>For support and more information, please visit <a href="https://www.mint-system.ch">our Website</a>.</p>
</section>
</section>
</section>
</body>
</html>
25 changes: 25 additions & 0 deletions hr_work_entry_profile/views/res_users.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="res_users_view_form_profile" model="ir.ui.view">
<field name="name">hr_work_entry_profile.res_users_view_form_profile</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="hr.res_users_view_form_profile" />
<field name="arch" type="xml">
<div name="button_box" position="inside">
<field name="employee_id" invisible="1" />
<button
type="object"
class="oe_stat_button"
id="open_work_entries"
invisible="not employee_id"
icon="fa-calendar"
name="action_open_work_entries"
string="Work Entries"
>
</button>
</div>
</field>
</record>

</odoo>
Loading