-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ADD] hr_timesheet_project_prevent_creation
Signed-off-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
- Loading branch information
1 parent
16dd2ef
commit 2bd9fe0
Showing
8 changed files
with
99 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# SPDX-FileCopyrightText: 2022 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# SPDX-FileCopyrightText: 2022 Coop IT Easy SC | ||
# | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
{ | ||
"name": "Prevent creation of projects and tasks from timesheets", | ||
"summary": """ | ||
Prevent creation of projects and tasks from timesheets.""", | ||
"version": "12.0.1.0.0", | ||
"category": "Human Resources", | ||
"website": "https://coopiteasy.be", | ||
"author": "Coop IT Easy SC", | ||
"maintainers": ["carmenbianca"], | ||
"license": "AGPL-3", | ||
"application": False, | ||
"depends": [ | ||
"hr_timesheet", | ||
"hr_timesheet_sheet", | ||
], | ||
"excludes": [], | ||
"data": [ | ||
"views/hr_timesheet_sheet_views.xml", | ||
"views/hr_timesheet_views.xml", | ||
], | ||
"demo": [], | ||
"qweb": [], | ||
} |
3 changes: 3 additions & 0 deletions
3
hr_timesheet_project_prevent_creation/readme/CONTRIBUTORS.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
* `Coop IT Easy SC <https://coopiteasy.be>`_: | ||
|
||
* Carmen Bianca Bakker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Prevent creation of projects and tasks from timesheets. |
35 changes: 35 additions & 0 deletions
35
hr_timesheet_project_prevent_creation/views/hr_timesheet_sheet_views.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Coop IT Easy SC | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
<odoo> | ||
<record id="hr_timesheet_sheet_form" model="ir.ui.view"> | ||
<field | ||
name="name" | ||
>hr_timesheet.sheet.form.hr_timesheet_project_prevent_creation</field> | ||
<field name="model">hr_timesheet.sheet</field> | ||
<field name="inherit_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_form" /> | ||
<field name="arch" type="xml"> | ||
<field name="add_line_project_id" position="attributes"> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</field> | ||
<field name="add_line_task_id" position="attributes"> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</field> | ||
<xpath | ||
expr="//page/field[@name='timesheet_ids']/tree/field[@name='project_id']" | ||
position="attributes" | ||
> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</xpath> | ||
<xpath | ||
expr="//page/field[@name='timesheet_ids']/tree/field[@name='task_id']" | ||
position="attributes" | ||
> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</xpath> | ||
</field> | ||
</record> | ||
</odoo> |
23 changes: 23 additions & 0 deletions
23
hr_timesheet_project_prevent_creation/views/hr_timesheet_views.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Coop IT Easy SC | ||
SPDX-License-Identifier: AGPL-3.0-or-later | ||
--> | ||
<odoo> | ||
<record id="hr_timesheet_line_tree" model="ir.ui.view"> | ||
<field | ||
name="name" | ||
>account.analytic.line.tree.hr_timesheet_project_prevent_creation</field> | ||
<field name="model">account.analytic.line</field> | ||
<field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_tree" /> | ||
<field name="arch" type="xml"> | ||
<field name="project_id" position="attributes"> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</field> | ||
<field name="task_id" position="attributes"> | ||
<attribute name="options">{'no_create': True}</attribute> | ||
</field> | ||
</field> | ||
</record> | ||
</odoo> |
1 change: 1 addition & 0 deletions
1
...p/hr_timesheet_project_prevent_creation/odoo/addons/hr_timesheet_project_prevent_creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../../hr_timesheet_project_prevent_creation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import setuptools | ||
|
||
setuptools.setup( | ||
setup_requires=['setuptools-odoo'], | ||
odoo_addon=True, | ||
) |