From bd5309cd6c94f9a18475d625d1ece2cb20bc2708 Mon Sep 17 00:00:00 2001 From: Quentin Mondot Date: Fri, 14 Aug 2026 12:42:42 +0200 Subject: [PATCH] [ADD] hr_timesheet_hide_folded_project Hide projects in a folded stage from the timesheet line project selector and forbid creating projects on the fly from timesheet lines --- hr_timesheet_hide_folded_projects/README.rst | 47 +++++++++++++++++++ hr_timesheet_hide_folded_projects/__init__.py | 0 .../__manifest__.py | 23 +++++++++ .../views/hr_timesheet_views.xml | 14 ++++++ 4 files changed, 84 insertions(+) create mode 100644 hr_timesheet_hide_folded_projects/README.rst create mode 100644 hr_timesheet_hide_folded_projects/__init__.py create mode 100644 hr_timesheet_hide_folded_projects/__manifest__.py create mode 100644 hr_timesheet_hide_folded_projects/views/hr_timesheet_views.xml diff --git a/hr_timesheet_hide_folded_projects/README.rst b/hr_timesheet_hide_folded_projects/README.rst new file mode 100644 index 0000000..6aa2791 --- /dev/null +++ b/hr_timesheet_hide_folded_projects/README.rst @@ -0,0 +1,47 @@ +================================= +hr_timesheet_hide_folded_projects +================================= + +In the timesheet line list view (as used on tasks, projects and the "My +Timesheets" view), hide projects whose stage is +folded, and forbid creating a new project on the fly from the project +selector. + +Installation +============ + +Use Odoo normal module installation procedure to install +``hr_timesheet_hide_folded_projects``. + +Known issues / Roadmap +====================== + +None yet. + +Bug Tracker +=========== + +Bugs are tracked on `our issues website `_. 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. + +Credits +======= + +Contributors +------------ + +* Quentin Mondot + +Funders +------- + +The development of this module has been financially supported by: +* Elabore (https://elabore.coop) + + +Maintainer +---------- + +This module is maintained by Elabore. diff --git a/hr_timesheet_hide_folded_projects/__init__.py b/hr_timesheet_hide_folded_projects/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/hr_timesheet_hide_folded_projects/__manifest__.py b/hr_timesheet_hide_folded_projects/__manifest__.py new file mode 100644 index 0000000..36e3a4a --- /dev/null +++ b/hr_timesheet_hide_folded_projects/__manifest__.py @@ -0,0 +1,23 @@ +# Copyright 2026 Elabore +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + "name": "hr_timesheet_hide_folded_projects", + "version": "18.0.1.0.0", + "author": "Elabore", + "website": "https://git.elabore.coop/elabore/hr-tools", + "maintainer": "Elabore", + "license": "AGPL-3", + "category": "HR", + "summary": "Hide projects in a folded stage from the timesheet line project selector, " + "and forbid creating projects on the fly from timesheet lines", + "depends": [ + "hr_timesheet", + ], + "data": [ + "views/hr_timesheet_views.xml", + ], + "installable": True, + "auto_install": False, + "application": False, +} diff --git a/hr_timesheet_hide_folded_projects/views/hr_timesheet_views.xml b/hr_timesheet_hide_folded_projects/views/hr_timesheet_views.xml new file mode 100644 index 0000000..46b0a46 --- /dev/null +++ b/hr_timesheet_hide_folded_projects/views/hr_timesheet_views.xml @@ -0,0 +1,14 @@ + + + + hr.timesheet.line.tree.hide.folded.projects + account.analytic.line + + + + [('stage_id.fold', '=', False)] + {'no_create': True} + + + +