[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
This commit is contained in:
2026-08-14 12:42:42 +02:00
parent 7996ecc501
commit bd5309cd6c
4 changed files with 84 additions and 0 deletions

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>