-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] hr_timesheet_analytic_tag: Migration to 18.0
- Loading branch information
Showing
7 changed files
with
23 additions
and
41 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 |
---|---|---|
|
@@ -17,13 +17,13 @@ Hr Timesheet Analytic Tag | |
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html | ||
:alt: License: AGPL-3 | ||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--analytic-lightgray.png?logo=github | ||
:target: https://github.com/OCA/account-analytic/tree/17.0/hr_timesheet_analytic_tag | ||
:target: https://github.com/OCA/account-analytic/tree/18.0/hr_timesheet_analytic_tag | ||
:alt: OCA/account-analytic | ||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png | ||
:target: https://translation.odoo-community.org/projects/account-analytic-17-0/account-analytic-17-0-hr_timesheet_analytic_tag | ||
:target: https://translation.odoo-community.org/projects/account-analytic-18-0/account-analytic-18-0-hr_timesheet_analytic_tag | ||
: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/account-analytic&target_branch=17.0 | ||
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-analytic&target_branch=18.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
@@ -43,7 +43,7 @@ Bug Tracker | |
Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-analytic/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/account-analytic/issues/new?body=module:%20hr_timesheet_analytic_tag%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. | ||
`feedback <https://github.com/OCA/account-analytic/issues/new?body=module:%20hr_timesheet_analytic_tag%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. | ||
|
||
|
@@ -63,9 +63,10 @@ Contributors | |
- Víctor Martínez | ||
- Pedro M. Baeza | ||
|
||
- APSL - Nagarro <https://apsl.tech> | ||
- `APSL-Nagarro <https://www.apsl.tech>`__: | ||
|
||
- Bernat Obrador | ||
- Bernat Obrador <[email protected]> | ||
- Antoni Marroig <[email protected]> | ||
|
||
Maintainers | ||
----------- | ||
|
@@ -88,6 +89,6 @@ Current `maintainer <https://odoo-community.org/page/maintainer-role>`__: | |
|
||
|maintainer-victoralmau| | ||
|
||
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/17.0/hr_timesheet_analytic_tag>`_ project on GitHub. | ||
This module is part of the `OCA/account-analytic <https://github.com/OCA/account-analytic/tree/18.0/hr_timesheet_analytic_tag>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
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
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# Copyright 2023 Tecnativa - Víctor Martínez | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) | ||
from odoo import Command, models | ||
from odoo import Command, api, models | ||
|
||
|
||
class AccountAnalyticLine(models.Model): | ||
_inherit = "account.analytic.line" | ||
|
||
def _timesheet_preprocess(self, vals_list): | ||
res = super()._timesheet_preprocess(vals_list) | ||
@api.model_create_multi | ||
def create(self, vals_list): | ||
for vals in vals_list: | ||
if vals.get("task_id") and not vals.get("tag_ids"): | ||
task = self.env["project.task"].browse(vals.get("task_id")) | ||
vals["tag_ids"] = [Command.set(task.analytic_tag_ids.ids)] | ||
return res | ||
return super().create(vals_list) |
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
- [Tecnativa](https://www.tecnativa.com): | ||
- Víctor Martínez | ||
- Pedro M. Baeza | ||
- APSL - Nagarro \<<https://apsl.tech>\> | ||
- Bernat Obrador | ||
- [APSL-Nagarro](https://www.apsl.tech): | ||
- Bernat Obrador \<<[email protected]>\> | ||
- Antoni Marroig \<<[email protected]>\> |
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
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
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