Skip to content

[18.0][MIG] hr_timesheet_task_domain: Migration to 18.0 #726

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
e867136
[ADD] hr_timesheet_task_domain: task domain depends on project
alexey-pelykh Feb 12, 2019
07cec87
Added translation using Weblate (German)
marylla Jul 10, 2019
c2bf604
[FIX] hr_timesheet_task_domain: Incorrect model name
pedrobaeza Sep 16, 2019
655975a
[IMP] hr_timesheet_task_domain: black, isort
Feb 12, 2020
7f20913
[MIG] hr_timesheet_task_domain: Migration to 13.0
Feb 12, 2020
7363803
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh Nov 8, 2020
1a70499
[IMP] hr_timesheet_task_domain: isort, black, prettier
fshah-initos May 4, 2021
36acbfa
[MIG] Migrate module hr_timesheet_task_domain to v14.
fshah-initos May 4, 2021
bc1e773
Added translation using Weblate (French)
remi-filament May 10, 2022
a23c8ac
[MIG] hr_timesheet_task_domain: Migration to 15.0
manuelcalerosolis Jun 27, 2022
f07bbb7
Translated using Weblate (French)
vincent-hatakeyama Oct 5, 2022
e170ee7
Added translation using Weblate (Italian)
mymage Jan 9, 2023
d2545c2
[MIG] hr_timesheet_task_domain: Migration to 16.0
Yadier-Tecnativa Jun 27, 2023
9577237
Translated using Weblate (Italian)
mymage Jul 8, 2023
370886e
Translated using Weblate (Spanish)
Ivorra78 Aug 27, 2023
e80f5a3
Added translation using Weblate (Portuguese (Brazil))
adrianojprado Oct 27, 2023
306d417
[IMP] hr_timesheet_task_domain: pre-commit auto fixes
victoralmau Nov 6, 2024
6ac0794
[MIG] hr_timesheet_task_domain: Migration to 17.0
victoralmau Nov 6, 2024
24e1a58
[MIG] hr_timesheet_task_domain: Migration to 18.0
BhaveshHeliconia Jan 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
98 changes: 98 additions & 0 deletions hr_timesheet_task_domain/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
===============================
Task Log: limit Task by Project
===============================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:b2119664ace110682f4434eb89adb0f8177347388a0c135f6232ad2d2b3d63b5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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-OCA%2Ftimesheet-lightgray.png?logo=github
:target: https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_task_domain
:alt: OCA/timesheet
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/timesheet-18-0/timesheet-18-0-hr_timesheet_task_domain
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/timesheet&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module adjusts the domain applied to task field in order to limit
task selection to currently-selected project, also limits selection to
tasks in any of "Open" stages in order to accommodate a project flow.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/timesheet/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_task_domain%0Aversion:%2018.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
-------

* Tecnativa
* CorporateHub

Contributors
------------

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Antonio Espinosa
- Carlos Dauden
- Sergio Teruel
- Luis M. ontalba
- Ernesto Tejeda
- Manuel Calero
- Yadier Quesada

- `CorporateHub <https://corporatehub.eu/>`__

- Alexey Pelykh <alexey.pelykh@corphub.eu>

- Foram Shah <foram.shah@initos.com>

- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`__

- Bhavesh Heliconia

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/18.0/hr_timesheet_task_domain>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions hr_timesheet_task_domain/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import models
21 changes: 21 additions & 0 deletions hr_timesheet_task_domain/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Sergio Teruel
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Ernesto Tejeda
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020 Tecnativa - Manuel Calero
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

{
"name": "Task Log: limit Task by Project",
"version": "18.0.1.0.0",
"category": "Human Resources",
"website": "https://github.com/OCA/timesheet",
"author": "Tecnativa, CorporateHub, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"application": False,
"summary": ("Limit task selection to tasks on currently-selected project"),
"depends": ["hr_timesheet"],
}
27 changes: 27 additions & 0 deletions hr_timesheet_task_domain/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2019-07-11 12:43+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: none\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.7.1\n"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr "Kostenstellenbuchung"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr ""
27 changes: 27 additions & 0 deletions hr_timesheet_task_domain/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 13.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-09-03 05:14+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: none\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr "Línea analítica"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr "Tarea"
27 changes: 27 additions & 0 deletions hr_timesheet_task_domain/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-10-05 15:29+0000\n"
"Last-Translator: Vincent Hatakeyama <vincent+github@hatakeyama.fr>\n"
"Language-Team: none\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr "Ligne analytique"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr ""
24 changes: 24 additions & 0 deletions hr_timesheet_task_domain/i18n/hr_timesheet_task_domain.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.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"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr ""

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr ""
27 changes: 27 additions & 0 deletions hr_timesheet_task_domain/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-07-08 08:43+0000\n"
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr "Riga analitica"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr "Attività"
27 changes: 27 additions & 0 deletions hr_timesheet_task_domain/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-27 21:55+0000\n"
"Last-Translator: Adriano Prado <adrianojprado@gmail.com>\n"
"Language-Team: none\n"
"Language: pt_BR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: hr_timesheet_task_domain
#: model:ir.model,name:hr_timesheet_task_domain.model_account_analytic_line
msgid "Analytic Line"
msgstr "Linha Analítica"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr "Tarefa"
3 changes: 3 additions & 0 deletions hr_timesheet_task_domain/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

from . import account_analytic_line
24 changes: 24 additions & 0 deletions hr_timesheet_task_domain/models/account_analytic_line.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Sergio Teruel
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2024 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import fields, models

from odoo.addons.project.models.project_task import CLOSED_STATES


class AccountAnalyticLine(models.Model):
_inherit = "account.analytic.line"

task_id = fields.Many2one(
domain="project_id and [('company_id', 'in', (company_id, False)), "
"('project_id.allow_timesheets', '=', True), "
"('state', 'not in', " + str(list(CLOSED_STATES.keys())) + "), "
"('project_id', '=', project_id)] "
"or [('company_id', 'in', (company_id, False)), "
"('project_id.allow_timesheets', '=', True), "
"('project_id', '=?', project_id)]",
)
3 changes: 3 additions & 0 deletions hr_timesheet_task_domain/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
19 changes: 19 additions & 0 deletions hr_timesheet_task_domain/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
- [Tecnativa](https://www.tecnativa.com):

> - Pedro M. Baeza
> - Antonio Espinosa
> - Carlos Dauden
> - Sergio Teruel
> - Luis M. ontalba
> - Ernesto Tejeda
> - Manuel Calero
> - Yadier Quesada

- [CorporateHub](https://corporatehub.eu/)

- Alexey Pelykh \<<alexey.pelykh@corphub.eu>\>

- Foram Shah \<<foram.shah@initos.com>\>
- [Heliconia Solutions Pvt. Ltd.](https://www.heliconia.io)
- Bhavesh Heliconia

3 changes: 3 additions & 0 deletions hr_timesheet_task_domain/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This module adjusts the domain applied to task field in order to limit
task selection to currently-selected project, also limits selection to
tasks in any of "Open" stages in order to accommodate a project flow.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading