diff --git a/hr_timesheet_hide_documents_section/README.rst b/hr_timesheet_hide_documents_section/README.rst new file mode 100644 index 0000000000..d8cfcc7f56 --- /dev/null +++ b/hr_timesheet_hide_documents_section/README.rst @@ -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 `_. +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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* Kencove + +Contributors +~~~~~~~~~~~~ + +* Do Anh Duy + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/hr_timesheet_hide_documents_section/__init__.py b/hr_timesheet_hide_documents_section/__init__.py new file mode 100644 index 0000000000..13bb72a067 --- /dev/null +++ b/hr_timesheet_hide_documents_section/__init__.py @@ -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( + [("key", "=", "hr_timesheet.portal_my_home_timesheet"), ("active", "=", False)] + ) + if view: + view.active = True + _logger.info( + "Re-activated 'hr_timesheet.portal_my_home_timesheet' view during module uninstall." + ) diff --git a/hr_timesheet_hide_documents_section/__manifest__.py b/hr_timesheet_hide_documents_section/__manifest__.py new file mode 100644 index 0000000000..f053f38427 --- /dev/null +++ b/hr_timesheet_hide_documents_section/__manifest__.py @@ -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", +} diff --git a/hr_timesheet_hide_documents_section/readme/CONTRIBUTORS.rst b/hr_timesheet_hide_documents_section/readme/CONTRIBUTORS.rst new file mode 100644 index 0000000000..d465b79d5c --- /dev/null +++ b/hr_timesheet_hide_documents_section/readme/CONTRIBUTORS.rst @@ -0,0 +1 @@ +* Do Anh Duy diff --git a/hr_timesheet_hide_documents_section/readme/DESCRIPTION.rst b/hr_timesheet_hide_documents_section/readme/DESCRIPTION.rst new file mode 100644 index 0000000000..e6adc407f9 --- /dev/null +++ b/hr_timesheet_hide_documents_section/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +This module hide Timesheets document section on customer portal (/my). diff --git a/hr_timesheet_hide_documents_section/readme/ROADMAP.rst b/hr_timesheet_hide_documents_section/readme/ROADMAP.rst new file mode 100644 index 0000000000..e15e4cb8f6 --- /dev/null +++ b/hr_timesheet_hide_documents_section/readme/ROADMAP.rst @@ -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. diff --git a/hr_timesheet_hide_documents_section/static/description/icon.png b/hr_timesheet_hide_documents_section/static/description/icon.png new file mode 100644 index 0000000000..3a0328b516 Binary files /dev/null and b/hr_timesheet_hide_documents_section/static/description/icon.png differ diff --git a/hr_timesheet_hide_documents_section/static/description/index.html b/hr_timesheet_hide_documents_section/static/description/index.html new file mode 100644 index 0000000000..312babfd63 --- /dev/null +++ b/hr_timesheet_hide_documents_section/static/description/index.html @@ -0,0 +1,430 @@ + + + + + +Timesheet Hide Documents Section + + + +
+

Timesheet Hide Documents Section

+ + +

Beta License: AGPL-3 OCA/timesheet Translate me on Weblate Try me on Runboat

+

This module hide Timesheets document section on customer portal (/my).

+

Table of contents

+ +
+

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

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Kencove
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/hr_timesheet_hide_documents_section/views/hr_timesheet_portal_templates.xml b/hr_timesheet_hide_documents_section/views/hr_timesheet_portal_templates.xml new file mode 100644 index 0000000000..e7ca35788c --- /dev/null +++ b/hr_timesheet_hide_documents_section/views/hr_timesheet_portal_templates.xml @@ -0,0 +1,10 @@ + + + + + + + + + diff --git a/setup/hr_timesheet_hide_documents_section/odoo/addons/hr_timesheet_hide_documents_section b/setup/hr_timesheet_hide_documents_section/odoo/addons/hr_timesheet_hide_documents_section new file mode 120000 index 0000000000..ee2bdb38aa --- /dev/null +++ b/setup/hr_timesheet_hide_documents_section/odoo/addons/hr_timesheet_hide_documents_section @@ -0,0 +1 @@ +../../../../hr_timesheet_hide_documents_section \ No newline at end of file diff --git a/setup/hr_timesheet_hide_documents_section/setup.py b/setup/hr_timesheet_hide_documents_section/setup.py new file mode 100644 index 0000000000..28c57bb640 --- /dev/null +++ b/setup/hr_timesheet_hide_documents_section/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)