From b008502a4afd6f3bac59a9746b4d95182cfeecee Mon Sep 17 00:00:00 2001 From: PicchiSeba Date: Thu, 8 Aug 2024 10:04:56 +0200 Subject: [PATCH] [MIG] project_task_recurring_activity: Migration to 16.0 --- project_task_recurring_activity/README.rst | 10 +++++----- .../__manifest__.py | 2 +- .../models/recurring_activity.py | 9 ++------- .../static/description/index.html | 18 ++++++++++-------- .../tests/test_project_recurrence.py | 13 ++++++------- .../views/project_task.xml | 18 ++++++++++-------- 6 files changed, 34 insertions(+), 36 deletions(-) diff --git a/project_task_recurring_activity/README.rst b/project_task_recurring_activity/README.rst index a5d559a973..e2d3b4d3fd 100644 --- a/project_task_recurring_activity/README.rst +++ b/project_task_recurring_activity/README.rst @@ -17,13 +17,13 @@ Project Task Recurring Activity :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github - :target: https://github.com/OCA/project/tree/14.0/project_task_recurring_activity + :target: https://github.com/OCA/project/tree/16.0/project_task_recurring_activity :alt: OCA/project .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/project-14-0/project-14-0-project_task_recurring_activity + :target: https://translation.odoo-community.org/projects/project-16-0/project-16-0-project_task_recurring_activity :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/project&target_branch=14.0 + :target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=16.0 :alt: Try me on Runboat |badge1| |badge2| |badge3| |badge4| |badge5| @@ -54,7 +54,7 @@ Bug Tracker Bugs are tracked on `GitHub 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -96,6 +96,6 @@ Current `maintainers `__: |maintainer-dessanhemrayev| |maintainer-CetmixGitDrone| -This module is part of the `OCA/project `_ project on GitHub. +This module is part of the `OCA/project `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/project_task_recurring_activity/__manifest__.py b/project_task_recurring_activity/__manifest__.py index 6d83f70622..af04a7e0b5 100644 --- a/project_task_recurring_activity/__manifest__.py +++ b/project_task_recurring_activity/__manifest__.py @@ -4,7 +4,7 @@ "author": "Cetmix, Odoo Community Association (OCA)", "website": "https://github.com/OCA/project", "category": "Project Management", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "depends": ["project"], "data": [ diff --git a/project_task_recurring_activity/models/recurring_activity.py b/project_task_recurring_activity/models/recurring_activity.py index 72e7a27dc2..354aca9416 100644 --- a/project_task_recurring_activity/models/recurring_activity.py +++ b/project_task_recurring_activity/models/recurring_activity.py @@ -18,13 +18,8 @@ class RecurringActivity(models.Model): index=True, required=True, ) - summary = fields.Char( - string="Summary", - ) - description = fields.Html( - string="Description", - sanitize_style=True, - ) + summary = fields.Char() + description = fields.Html(sanitize_style=True) days_after_task_creation_date = fields.Integer() next_recurrence_date = fields.Date( string="next_date", compute="_compute_next_recurrence_date", store=True diff --git a/project_task_recurring_activity/static/description/index.html b/project_task_recurring_activity/static/description/index.html index 6a8257c941..2d9e8cf9a5 100644 --- a/project_task_recurring_activity/static/description/index.html +++ b/project_task_recurring_activity/static/description/index.html @@ -1,4 +1,3 @@ - @@ -9,10 +8,11 @@ /* :Author: David Goodger (goodger@python.org) -:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $ +:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $ :Copyright: This stylesheet has been placed in the public domain. Default cascading style sheet for the HTML output of Docutils. +Despite the name, some widely supported CSS2 features are used. See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to customize this style sheet. @@ -275,7 +275,7 @@ margin-left: 2em ; margin-right: 2em } -pre.code .ln { color: grey; } /* line numbers */ +pre.code .ln { color: gray; } /* line numbers */ pre.code, code { background-color: #eeeeee } pre.code .comment, code .comment { color: #5C6576 } pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold } @@ -301,7 +301,7 @@ span.pre { white-space: pre } -span.problematic { +span.problematic, pre.problematic { color: red } span.section-subtitle { @@ -369,7 +369,7 @@

Project Task Recurring Activity

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! source digest: sha256:a3bfe23bed7c7175a529bed6611a8b9f0ba5e63fb9aaaf9676341d1d8f2a2245 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

+

Beta License: AGPL-3 OCA/project Translate me on Weblate Try me on Runboat

This module allow users to add activities to the recurring tasks and have them automatically duplicated within recurring tasks at set intervals.

Table of contents

@@ -402,7 +402,7 @@

Bug Tracker

Bugs are tracked on GitHub 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.

+feedback.

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

@@ -425,13 +425,15 @@

Contributors

Maintainers

This module is maintained by the OCA.

-Odoo Community Association + +Odoo Community Association +

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.

Current maintainers:

dessanhemrayev CetmixGitDrone

-

This module is part of the OCA/project project on GitHub.

+

This module is part of the OCA/project project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/project_task_recurring_activity/tests/test_project_recurrence.py b/project_task_recurring_activity/tests/test_project_recurrence.py index c1ea51930b..6d9eb09403 100644 --- a/project_task_recurring_activity/tests/test_project_recurrence.py +++ b/project_task_recurring_activity/tests/test_project_recurrence.py @@ -4,10 +4,10 @@ from odoo import _, fields from odoo.exceptions import UserError -from odoo.tests.common import Form, SavepointCase +from odoo.tests.common import Form, TransactionCase -class TestProjectrecurrence(SavepointCase): +class TestProjectrecurrence(TransactionCase): @classmethod def setUpClass(cls): super(TestProjectrecurrence, cls).setUpClass() @@ -19,7 +19,7 @@ def setUpClass(cls): cls.demo_user = ( cls.env["res.users"] - .with_context({"no_reset_password": True}) + .with_context(no_reset_password=True) .create( { "name": "demo", @@ -37,7 +37,7 @@ def setUpClass(cls): ) cls.demo_user2 = ( cls.env["res.users"] - .with_context({"no_reset_password": True}) + .with_context(no_reset_password=True) .create( { "name": "demo2", @@ -58,7 +58,6 @@ def setUpClass(cls): "name": "activity_a", "default_user_id": cls.demo_user.id, "summary": "summary", - "default_description": "description", } ) cls.mail_activity_b = cls.env["mail.activity.type"].create( @@ -69,7 +68,7 @@ def setUpClass(cls): ) cls.project_recurring = ( cls.env["project.project"] - .with_context({"mail_create_nolog": True}) + .with_context(mail_create_nolog=True) .create( { "name": "Recurring", @@ -84,7 +83,7 @@ def setUpClass(cls): cls.project_recurring2 = ( cls.env["project.project"] - .with_context({"mail_create_nolog": True}) + .with_context(mail_create_nolog=True) .create( { "name": "Recurring", diff --git a/project_task_recurring_activity/views/project_task.xml b/project_task_recurring_activity/views/project_task.xml index 2d7d91f65c..556a590c1d 100644 --- a/project_task_recurring_activity/views/project_task.xml +++ b/project_task_recurring_activity/views/project_task.xml @@ -5,14 +5,16 @@ -