2 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
Stéphan Sainléger
7996ecc501 [FIX] hr_luncheon_voucher: add button to existing header in employee tree view
The view inheritance was creating a duplicate <header> inside <list>
2026-07-21 15:00:14 +02:00
5 changed files with 85 additions and 3 deletions

View File

@@ -62,15 +62,13 @@
<field name="model">hr.employee</field>
<field name="inherit_id" ref="hr.view_employee_tree" />
<field name="arch" type="xml">
<xpath expr="//list" position="inside">
<header>
<xpath expr="//header" position="inside">
<button
type="object"
name="action_lv_allocations_requests_wizard"
string="Generate Luncheon Vouchers Allocations"
class="btn-primary"
/>
</header>
</xpath>
</field>
</record>

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>