Skip to content
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

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

Open
wants to merge 19 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
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
e181e27
[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
Prev Previous commit
Next Next commit
[MIG] hr_timesheet_task_domain: Migration to 16.0
[UPD] Update hr_timesheet_task_domain.pot

[UPD] README.rst

Update translation files

Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: timesheet-16.0/timesheet-16.0-hr_timesheet_task_domain
Translate-URL: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain/
  • Loading branch information
Yadier-Tecnativa authored and BhaveshHeliconia committed Feb 28, 2025
commit d2545c2488e66d9ab15f5cf45b3f7f7d4405069d
16 changes: 8 additions & 8 deletions hr_timesheet_task_domain/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,20 @@ Task Log: limit Task by Project
: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/15.0/hr_timesheet_task_domain
:target: https://github.com/OCA/timesheet/tree/16.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-15-0/timesheet-15-0-hr_timesheet_task_domain
:target: https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/117/15.0
:target: https://runbot.odoo-community.org/runbot/117/16.0
:alt: Try me on Runbot

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

This module adjusts the domain applied to task field in order to limit task
selection to currently-selected project. If `project_stage_closed` module is
installed, also limits selection to tasks in any of "Open" stages in order to
accommodate a project flow.
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**

Expand All @@ -41,7 +40,7 @@ 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 smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_task_domain%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_task_domain%0Aversion:%2016.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.

Expand All @@ -66,6 +65,7 @@ Contributors
* Luis M. ontalba
* Ernesto Tejeda
* Manuel Calero
* Yadier Quesada

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

Expand All @@ -86,6 +86,6 @@ 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/15.0/hr_timesheet_task_domain>`_ project on GitHub.
This module is part of the `OCA/timesheet <https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_task_domain>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion hr_timesheet_task_domain/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{
"name": "Task Log: limit Task by Project",
"version": "15.0.1.0.0",
"version": "16.0.1.0.0",
"category": "Human Resources",
"website": "https://github.com/OCA/timesheet",
"author": "Tecnativa, CorporateHub, Odoo Community Association (OCA)",
Expand Down
7 changes: 6 additions & 1 deletion hr_timesheet_task_domain/i18n/de.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
Expand All @@ -20,3 +20,8 @@ msgstr ""
#: 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 ""
7 changes: 6 additions & 1 deletion hr_timesheet_task_domain/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * hr_timesheet_task_domain
# * hr_timesheet_task_domain
#
msgid ""
msgstr ""
Expand All @@ -20,3 +20,8 @@ msgstr ""
#: 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 ""
21 changes: 10 additions & 11 deletions hr_timesheet_task_domain/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ 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__display_name
msgid "Display Name"
msgstr "Nom affiché"
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__task_id
msgid "Task"
msgstr ""

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line__id
msgid "ID"
msgstr "Id."
#~ msgid "Display Name"
#~ msgstr "Nom affiché"

#. module: hr_timesheet_task_domain
#: model:ir.model.fields,field_description:hr_timesheet_task_domain.field_account_analytic_line____last_update
msgid "Last Modified on"
msgstr "Dernière modification le"
#~ msgid "ID"
#~ msgstr "Id."

#~ msgid "Last Modified on"
#~ msgstr "Dernière modification le"
7 changes: 6 additions & 1 deletion hr_timesheet_task_domain/i18n/hr_timesheet_task_domain.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
Expand All @@ -17,3 +17,8 @@ msgstr ""
#: 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 ""
5 changes: 5 additions & 0 deletions hr_timesheet_task_domain/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,8 @@ msgstr ""
#: 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 ""
29 changes: 9 additions & 20 deletions hr_timesheet_task_domain/models/account_analytic_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,17 @@
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import api, models
from odoo import fields, models


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

@api.onchange("project_id")
def _onchange_project_id(self):
task = self.task_id
res = super()._onchange_project_id()
if res is None:
res = {}
if self.project_id: # Show only opened tasks
task_domain = [
("project_id", "=", self.project_id.id),
("stage_id.is_closed", "=", False),
]
res_domain = res.setdefault("domain", {})
res_domain.update({"task_id": task_domain})
else: # Reset domain for allowing selection of any task
res["domain"] = {"task_id": []}
if task.project_id == self.project_id:
# Restore previous task if belongs to the same project
self.task_id = task
return res
task_id = fields.Many2one(
domain="project_id and [('company_id', '=', company_id), "
"('project_id.allow_timesheets', '=', True), "
"('stage_id.fold', '=', False), ('project_id', '=', project_id)] "
"or [('company_id', '=', company_id), "
"('project_id.allow_timesheets', '=', True), "
"('project_id', '=?', project_id)]",
)
1 change: 1 addition & 0 deletions hr_timesheet_task_domain/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Luis M. ontalba
* Ernesto Tejeda
* Manuel Calero
* Yadier Quesada

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

Expand Down
5 changes: 2 additions & 3 deletions hr_timesheet_task_domain/readme/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
This module adjusts the domain applied to task field in order to limit task
selection to currently-selected project. If `project_stage_closed` module is
installed, also limits selection to tasks in any of "Open" stages in order to
accommodate a project flow.
selection to currently-selected project, also limits selection to tasks in any
of "Open" stages in order to accommodate a project flow.
12 changes: 6 additions & 6 deletions hr_timesheet_task_domain/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,10 @@ <h1 class="title">Task Log: limit Task by Project</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/timesheet/tree/15.0/hr_timesheet_task_domain"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/timesheet-15-0/timesheet-15-0-hr_timesheet_task_domain"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/117/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external" href="https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_task_domain"><img alt="OCA/timesheet" src="https://img.shields.io/badge/github-OCA%2Ftimesheet-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/timesheet-16-0/timesheet-16-0-hr_timesheet_task_domain"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/117/16.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
<p>This module adjusts the domain applied to task field in order to limit task
selection to currently-selected project. If <cite>project_stage_closed</cite> module is
installed, also limits selection to tasks in any of “Open” stages in order to
accommodate a project flow.</p>
selection to currently-selected project, also limits selection to tasks in any
of “Open” stages in order to accommodate a project flow.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
<ul class="simple">
Expand All @@ -389,7 +388,7 @@ <h1><a class="toc-backref" href="#id1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/timesheet/issues">GitHub Issues</a>.
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
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_task_domain%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/OCA/timesheet/issues/new?body=module:%20hr_timesheet_task_domain%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -414,6 +413,7 @@ <h2><a class="toc-backref" href="#id4">Contributors</a></h2>
<li>Luis M. ontalba</li>
<li>Ernesto Tejeda</li>
<li>Manuel Calero</li>
<li>Yadier Quesada</li>
</ul>
</blockquote>
</li>
Expand All @@ -433,7 +433,7 @@ <h2><a class="toc-backref" href="#id5">Maintainers</a></h2>
<p>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.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/15.0/hr_timesheet_task_domain">OCA/timesheet</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/timesheet/tree/16.0/hr_timesheet_task_domain">OCA/timesheet</a> project on GitHub.</p>
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
</div>
</div>
Expand Down
3 changes: 0 additions & 3 deletions hr_timesheet_task_domain/tests/__init__.py

This file was deleted.

34 changes: 0 additions & 34 deletions hr_timesheet_task_domain/tests/test_hr_timesheet_task_domain.py

This file was deleted.