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

TA#72174 [16.0][MIG] project_portal_hide_timesheets #487

Merged
merged 7 commits into from
Jan 16, 2025
Merged
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
1 change: 1 addition & 0 deletions .docker_files/main/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"project_milestone_time_kpi",
"project_no_quick_create",
"project_parent_enhanced",
"project_portal_hide_timesheets",
"project_progress_variance",
"project_projected_hours",
"project_remaining_hours_update",
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ COPY project_milestone_spent_hours /mnt/extra-addons/project_milestone_spent_hou
COPY project_milestone_time_kpi /mnt/extra-addons/project_milestone_time_kpi
COPY project_no_quick_create /mnt/extra-addons/project_no_quick_create
COPY project_parent_enhanced mnt/extra-addons/project_parent_enhanced
COPY project_portal_hide_timesheets mnt/extra-addons/project_portal_hide_timesheets
COPY project_progress_variance /mnt/extra-addons/project_progress_variance
COPY project_projected_hours mnt/extra-addons/project_projected_hours
COPY project_remaining_hours_update /mnt/extra-addons/project_remaining_hours_update
Expand Down
18 changes: 18 additions & 0 deletions project_portal_hide_timesheets/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Project Portal Hide Timesheets
==============================
This module hides the timesheet lines from the portal.
And it also hides buttons that allow to print or download the timesheet lines.
The anchor link `Timesheets` (in the left) is also removed from the portal.

*Before installing the module*

.. image:: static/description/timesheets_lines_visible.png

*After installing the module*

.. image:: static/description/timesheets_lines_invisible.png


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

{
"name": "Project Portal Hide Timesheets",
"version": "16.0.1.0.0",
"author": "Numigi",
"maintainer": "Numigi",
"website": "https://bit.ly/numigi-com",
"license": "LGPL-3",
"category": "Project",
"summary": "Hide timesheet lines in the task portal view.",
"depends": [
"hr_timesheet",
],
"data": [
"views/project_task_portal_templates.xml",
],
"installable": True,
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>

<template id="portal_my_task" inherit_id="hr_timesheet.portal_my_task" priority="100">
<xpath expr="//li[@id='nav-report']" position="replace">
<t t-esc="False"/>
</xpath>
<xpath expr="//li[@class='nav-item']" position="replace">
<t t-esc="False"/>
</xpath>
<xpath expr="//div[@class='container']" position="replace">
<t t-esc="False"/>
</xpath>
<xpath expr="//div[@t-if='task.planned_hours > 0']" position="replace">
<t t-esc="False"/>
</xpath>
<xpath expr="//t[@t-call='hr_timesheet.portal_my_task_planned_hours_template']" position="replace">
<t t-esc="False"/>
</xpath>
</template>

</odoo>
Loading