1 Commits

Author SHA1 Message Date
bd5309cd6c [ADD] hr_timesheet_hide_folded_project
Some checks failed
pre-commit / pre-commit (pull_request) Has been cancelled
Hide projects in a folded stage from the timesheet line project selector
and forbid creating projects on the fly from timesheet lines
2026-08-14 12:42:42 +02:00
6 changed files with 85 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
{
"name": "hr_holidays_timeoff_analysis",
"version": "18.0.1.0.1",
"version": "18.0.1.0.0",
"author": "Elabore",
"website": "https://git.elabore.coop/elabore/elabore-addons",
"maintainer": "Elabore",

View File

@@ -1,3 +1,2 @@
id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink
access_hr_leave_timeoff_day_user,access_hr_holidays_timeoff_day_user,model_hr_leave_timeoff_day,hr_holidays.group_hr_holidays_user,1,0,0,0
access_hr_leave_timeoff_day_manager,access_hr_holidays_timeoff_day_manager,model_hr_leave_timeoff_day,hr_holidays.group_hr_holidays_manager,1,0,0,0
1 id name model_id/id group_id/id perm_read perm_write perm_create perm_unlink
access_hr_leave_timeoff_day_user access_hr_holidays_timeoff_day_user model_hr_leave_timeoff_day hr_holidays.group_hr_holidays_user 1 0 0 0
2 access_hr_leave_timeoff_day_manager access_hr_holidays_timeoff_day_manager model_hr_leave_timeoff_day hr_holidays.group_hr_holidays_manager 1 0 0 0

View File

@@ -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 <https://github.com/elabore-coop/hr-tools/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.
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.

View File

@@ -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,
}

View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="hr_timesheet_line_tree_hide_folded_projects" model="ir.ui.view">
<field name="name">hr.timesheet.line.tree.hide.folded.projects</field>
<field name="model">account.analytic.line</field>
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" />
<field name="arch" type="xml">
<xpath expr="//field[@name='project_id']" position="attributes">
<attribute name="domain">[('stage_id.fold', '=', False)]</attribute>
<attribute name="options">{'no_create': True}</attribute>
</xpath>
</field>
</record>
</odoo>