Skip to content

Commit

Permalink
Merge PR #29 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by robinkeunen
  • Loading branch information
github-grap-bot committed Jan 12, 2024
2 parents ec9abd0 + fe61ad2 commit 2c9c628
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 0 deletions.
67 changes: 67 additions & 0 deletions hr_timesheet_project_prevent_creation/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
======================================================
Prevent creation of projects and tasks from timesheets
======================================================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-coopiteasy%2Fcie--timesheet-lightgray.png?logo=github
:target: https://github.com/coopiteasy/cie-timesheet/tree/12.0/hr_timesheet_project_prevent_creation
:alt: coopiteasy/cie-timesheet

|badge1| |badge2| |badge3|

Prevent creation of projects and tasks from timesheets.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/coopiteasy/cie-timesheet/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 <https://github.com/coopiteasy/cie-timesheet/issues/new?body=module:%20hr_timesheet_project_prevent_creation%0Aversion:%2012.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~

* Coop IT Easy SC

Contributors
~~~~~~~~~~~~

* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Carmen Bianca Bakker

Maintainers
~~~~~~~~~~~

.. |maintainer-carmenbianca| image:: https://github.com/carmenbianca.png?size=40px
:target: https://github.com/carmenbianca
:alt: carmenbianca

Current maintainer:

|maintainer-carmenbianca|

This module is part of the `coopiteasy/cie-timesheet <https://github.com/coopiteasy/cie-timesheet/tree/12.0/hr_timesheet_project_prevent_creation>`_ project on GitHub.

You are welcome to contribute.
3 changes: 3 additions & 0 deletions hr_timesheet_project_prevent_creation/__init__.py
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
27 changes: 27 additions & 0 deletions hr_timesheet_project_prevent_creation/__manifest__.py
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": "16.0.1.0.0",
"category": "Human Resources",
"website": "https://github.com/coopiteasy/cie-timesheet",
"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": [],
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

3 changes: 3 additions & 0 deletions hr_timesheet_project_prevent_creation/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
* `Coop IT Easy SC <https://coopiteasy.be>`_:

* Carmen Bianca Bakker
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Prevent creation of projects and tasks from timesheets.
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 hr_timesheet_project_prevent_creation/views/hr_timesheet_views.xml
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>
6 changes: 6 additions & 0 deletions setup/hr_timesheet_project_prevent_creation/setup.py
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,
)

0 comments on commit 2c9c628

Please sign in to comment.