Skip to content

Commit e0fcb39

Browse files
astirpealissonjns
authored andcommitted
[ADD][12.0] hr_timesheet_sheet_no_create
1 parent 994ec4d commit e0fcb39

File tree

5 files changed

+45
-0
lines changed

5 files changed

+45
-0
lines changed
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright 2020 Onestein (<https://www.onestein.eu>)
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "HR Timesheet Sheet - No create projects/tasks",
6+
"version": "12.0.1.0.0",
7+
"category": "Human Resources",
8+
"author": "Onestein, Odoo Community Association (OCA)",
9+
"website": "https://github.com/OCA/timesheet",
10+
"license": "AGPL-3",
11+
"summary": "Avoid creation of projects and tasks in timesheet sheet lines",
12+
"depends": ["hr_timesheet_sheet"],
13+
"data": ["views/hr_timesheet_sheet.xml"],
14+
"installable": True,
15+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Andrea Stirpe <[email protected]>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
With this module it will not be possible to create projects and tasks
2+
directly from the lines of a timesheet sheet.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!-- Copyright 2020 Onestein (<https://www.onestein.eu>)
3+
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
4+
5+
<odoo>
6+
7+
<record id="hr_timesheet_sheet_form" model="ir.ui.view">
8+
<field name="model">hr_timesheet.sheet</field>
9+
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form"/>
10+
<field name="arch" type="xml">
11+
<xpath expr="//field[@name='timesheet_ids']/tree//field[@name='project_id']" position="attributes">
12+
<attribute name="options">{'no_create': True}</attribute>
13+
</xpath>
14+
<xpath expr="//field[@name='timesheet_ids']/tree//field[@name='task_id']" position="attributes">
15+
<attribute name="options">{'no_create': True}</attribute>
16+
</xpath>
17+
<xpath expr="//field[@name='timesheet_ids']/form//field[@name='project_id']" position="attributes">
18+
<attribute name="options">{'no_create': True}</attribute>
19+
</xpath>
20+
<xpath expr="//field[@name='timesheet_ids']/form//field[@name='task_id']" position="attributes">
21+
<attribute name="options">{'no_create': True}</attribute>
22+
</xpath>
23+
</field>
24+
</record>
25+
26+
</odoo>

0 commit comments

Comments
 (0)