From 8382930334fa188e3a851e2644bcc6e887f7ae2d Mon Sep 17 00:00:00 2001 From: Ernesto Tejeda Date: Fri, 7 Jan 2022 19:29:08 -0500 Subject: [PATCH] [MIG] event_project: Migration to 14.0 --- event_project/README.rst | 10 +++++----- event_project/__manifest__.py | 4 ++-- event_project/models/event_event.py | 19 ++----------------- event_project/static/description/index.html | 8 ++++---- event_project/tests/test_event_project.py | 6 ------ event_project/views/event_event_view.xml | 1 - oca_dependencies.txt | 2 +- 7 files changed, 14 insertions(+), 36 deletions(-) diff --git a/event_project/README.rst b/event_project/README.rst index 164a009b8..05df8f25e 100644 --- a/event_project/README.rst +++ b/event_project/README.rst @@ -14,13 +14,13 @@ Event 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%2Fevent-lightgray.png?logo=github - :target: https://github.com/OCA/event/tree/12.0/event_project + :target: https://github.com/OCA/event/tree/14.0/event_project :alt: OCA/event .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/event-12-0/event-12-0-event_project + :target: https://translation.odoo-community.org/projects/event-14-0/event-14-0-event_project :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/199/12.0 + :target: https://runbot.odoo-community.org/runbot/199/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -56,7 +56,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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -94,6 +94,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/event `_ project on GitHub. +This module is part of the `OCA/event `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/event_project/__manifest__.py b/event_project/__manifest__.py index 2925a0aef..806548c11 100644 --- a/event_project/__manifest__.py +++ b/event_project/__manifest__.py @@ -6,8 +6,8 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Event project", - "version": "12.0.1.0.0", - "author": "Tecnativa, " "Odoo Community Association (OCA)", + "version": "14.0.1.0.0", + "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/event", "license": "AGPL-3", "category": "Event Management", diff --git a/event_project/models/event_event.py b/event_project/models/event_event.py index 3fee10c48..9021d423e 100644 --- a/event_project/models/event_event.py +++ b/event_project/models/event_event.py @@ -20,12 +20,11 @@ class EventEvent(models.Model): ) count_tasks = fields.Integer( string="Task number", - compute="_count_tasks", + compute="_compute_count_tasks", ) - @api.multi @api.depends("task_ids") - def _count_tasks(self): + def _compute_count_tasks(self): for event in self: event.count_tasks = len(event.task_ids) @@ -63,7 +62,6 @@ def create(self, vals): event.project_data_update(vals) return event - @api.multi def write(self, vals): if vals.get("project_id") is not None and not vals.get("project_id"): self.mapped("project_id").write({"event_id": False}) @@ -73,16 +71,3 @@ def write(self, vals): if recalculate and not self.env.context.get("no_recalculate"): self.project_id.project_recalculate() return res - - @api.multi - def button_cancel(self): - """Archive linked project when event is cancelled""" - super(EventEvent, self).button_cancel() - self.mapped("project_id").write({"active": False}) - - @api.multi - def button_draft(self): - """Uncharchive linked project when event is set to draft again""" - super(EventEvent, self).button_draft() - if self.project_id: - self.project_id.active = True diff --git a/event_project/static/description/index.html b/event_project/static/description/index.html index f327e671a..e3deac1b8 100644 --- a/event_project/static/description/index.html +++ b/event_project/static/description/index.html @@ -3,7 +3,7 @@ - + Event project