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

[16.0][MIG] hr_timesheet_portal #579

Open
wants to merge 10 commits into
base: 16.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_timesheet_portal/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
===========================
Timesheet portal (editable)
===========================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-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%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_portal
: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_timesheet_portal
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/117/16.0
:alt: Try me on Runbot

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

This module allows portal users to edit their timesheets via the frontend.

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

Configuration
=============

To configure this module, you need to:

#. Add users to the group `Editable timesheets`. If you want all portal users be able to edit timesheets, add the group as an implied group of the `Portal` group

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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_portal%0Aversion:%2012.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
~~~~~~~

* Hunki Enterprises BV

Contributors
~~~~~~~~~~~~

* Holger Brunn <[email protected]> (https://hunki-enterprises.com)
* Achraf Mhadhbi <[email protected]>

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/timesheet <https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_portal>`_ 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_timesheet_portal/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
31 changes: 31 additions & 0 deletions hr_timesheet_portal/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2021 Hunki Enterprises BV
# Copyright 2023 bloopark systems - Achraf Mhadhbi
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Timesheet portal (editable)",
"summary": "Fill in timesheets via the portal",
"version": "16.0.1.0.1",
"development_status": "Alpha",
"category": "Website",
"website": "https://github.com/OCA/timesheet",
"author": "Hunki Enterprises BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": [
"hr_timesheet",
"portal",
"website",
],
"data": [
"templates/portal.xml",
"security/hr_timesheet_portal_security.xml",
"security/ir.model.access.csv",
],
"demo": [
"demo/hr_timesheet_portal.xml",
],
"assets": {
"web.assets_frontend": [
"hr_timesheet_portal/static/src/**/*",
],
},
}
10 changes: 10 additions & 0 deletions hr_timesheet_portal/demo/hr_timesheet_portal.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Hunki Enterprises BV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

<record id="base.group_portal" model="res.groups">
<field name="implied_ids" eval="[(4, ref('group_hr_timesheet_portal'))]" />
</record>

</odoo>
39 changes: 39 additions & 0 deletions hr_timesheet_portal/i18n/hr_timesheet_portal.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_portal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.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_timesheet_portal
#: model:res.groups,comment:hr_timesheet_portal.group_hr_timesheet_portal
msgid "Add portal users who should be allowed to edit their timesheets"
msgstr ""

#. module: hr_timesheet_portal
#. openerp-web
#: code:addons/hr_timesheet_portal/static/src/js/hr_timesheet_portal.js:125
#, python-format
msgid "Cancel"
msgstr ""

#. module: hr_timesheet_portal
#: model:res.groups,name:hr_timesheet_portal.group_hr_timesheet_portal
msgid "Editable timesheets"
msgstr ""

#. module: hr_timesheet_portal
#. openerp-web
#: code:addons/hr_timesheet_portal/static/src/js/hr_timesheet_portal.js:124
#, python-format
msgid "Submit"
msgstr ""

43 changes: 43 additions & 0 deletions hr_timesheet_portal/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_portal
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-01-26 12:45+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.14.1\n"

#. module: hr_timesheet_portal
#: model:res.groups,comment:hr_timesheet_portal.group_hr_timesheet_portal
msgid "Add portal users who should be allowed to edit their timesheets"
msgstr ""
"Aggiungi utenti portale che devono essere autorizzati a modificare i loro "
"fogli ore"

#. module: hr_timesheet_portal
#. openerp-web
#: code:addons/hr_timesheet_portal/static/src/js/hr_timesheet_portal.js:125
#, python-format
msgid "Cancel"
msgstr "Annulla"

#. module: hr_timesheet_portal
#: model:res.groups,name:hr_timesheet_portal.group_hr_timesheet_portal
msgid "Editable timesheets"
msgstr "Fogli ore modificabili"

#. module: hr_timesheet_portal
#. openerp-web
#: code:addons/hr_timesheet_portal/static/src/js/hr_timesheet_portal.js:124
#, python-format
msgid "Submit"
msgstr "Invia"
3 changes: 3 additions & 0 deletions hr_timesheet_portal/readme/CONFIGURE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
To configure this module, you need to:

#. Add users to the group `Editable timesheets`. If you want all portal users be able to edit timesheets, add the group as an implied group of the `Portal` group
2 changes: 2 additions & 0 deletions hr_timesheet_portal/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Holger Brunn <[email protected]> (https://hunki-enterprises.com)
* Achraf Mhadhbi <[email protected]>
1 change: 1 addition & 0 deletions hr_timesheet_portal/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module allows portal users to edit their timesheets via the frontend.
34 changes: 34 additions & 0 deletions hr_timesheet_portal/security/hr_timesheet_portal_security.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2021 Hunki Enterprises BV
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

<record id="group_hr_timesheet_portal" model="res.groups">
<field name="name">Editable timesheets</field>
<field name="category_id" ref="base.module_category_website" />
<field
name="comment"
>Add portal users who should be allowed to edit their timesheets</field>
</record>

<record id="rule_account_analytic_line" model="ir.rule">
<field name="model_id" ref="analytic.model_account_analytic_line" />
<field name="domain_force">[
'|',
'&amp;',
('task_id.project_id.privacy_visibility', '=', 'portal'),
('task_id.project_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
'&amp;',
('task_id.project_id.privacy_visibility', '=', 'portal'),
('task_id.message_partner_ids', 'child_of', [user.partner_id.commercial_partner_id.id]),
]</field>
<field name="groups" eval="[(4, ref('group_hr_timesheet_portal'))]" />
</record>

<record id="rule_hr_employee" model="ir.rule">
<field name="model_id" ref="hr.model_hr_employee" />
<field name="domain_force">[(0, '=', 1)]</field>
<field name="groups" eval="[(4, ref('group_hr_timesheet_portal'))]" />
</record>

</odoo>
3 changes: 3 additions & 0 deletions hr_timesheet_portal/security/ir.model.access.csv
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
crud_account_analytic_line,CRUD analytic lines,analytic.model_account_analytic_line,group_hr_timesheet_portal,1,1,1,1
read_hr_employee,Read employees,hr.model_hr_employee,group_hr_timesheet_portal,1,0,0,0
Binary file added hr_timesheet_portal/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading