Skip to content
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
81 changes: 81 additions & 0 deletions hr_timesheet_hide_documents_section/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
================================
Timesheet Hide Documents Section
================================

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

.. |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%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_hide_documents_section
: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_hide_documents_section
: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 hide Timesheets document section on customer portal (/my).

**Table of contents**

.. contents::
:local:

Known issues / Roadmap
======================

* This module only hides Timesheets section of Documents on the customer portal home page. The portal user can still access it by manually entering the appropriate URL in the web browser. Use the Access Rights and Record Rules feature to further block access to these objects.

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_timesheet_hide_documents_section%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
~~~~~~~

* Kencove

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

* Do Anh Duy <duyda@trobz.com>

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_hide_documents_section>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
16 changes: 16 additions & 0 deletions hr_timesheet_hide_documents_section/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from odoo import api, SUPERUSER_ID
import logging

_logger = logging.getLogger(__name__)


def uninstall_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
view = env["ir.ui.view"].search(

Check warning on line 9 in hr_timesheet_hide_documents_section/__init__.py

View check run for this annotation

Codecov / codecov/patch

hr_timesheet_hide_documents_section/__init__.py#L8-L9

Added lines #L8 - L9 were not covered by tests
[("key", "=", "hr_timesheet.portal_my_home_timesheet"), ("active", "=", False)]
)
if view:
view.active = True
_logger.info(

Check warning on line 14 in hr_timesheet_hide_documents_section/__init__.py

View check run for this annotation

Codecov / codecov/patch

hr_timesheet_hide_documents_section/__init__.py#L13-L14

Added lines #L13 - L14 were not covered by tests
"Re-activated 'hr_timesheet.portal_my_home_timesheet' view during module uninstall."
)
16 changes: 16 additions & 0 deletions hr_timesheet_hide_documents_section/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2025 Kencove (https://www.kencove.com).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Timesheet Hide Documents Section",
"version": "16.0.1.0.0",
"license": "AGPL-3",
"summary": """Hide Timesheet document section on customer portal.""",
"depends": ["hr_timesheet"],
"author": "Kencove, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/timesheet",
"category": "Services/Timesheets",
"data": ["views/hr_timesheet_portal_templates.xml"],
"installable": True,
"uninstall_hook": "uninstall_hook",
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* Do Anh Duy <duyda@trobz.com>
1 change: 1 addition & 0 deletions hr_timesheet_hide_documents_section/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module hide Timesheets document section on customer portal (/my).
1 change: 1 addition & 0 deletions hr_timesheet_hide_documents_section/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* This module only hides Timesheets section of Documents on the customer portal home page. The portal user can still access it by manually entering the appropriate URL in the web browser. Use the Access Rights and Record Rules feature to further block access to these objects.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading