From e3d5033c46867562aa985531ea72c54b8463966a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Wed, 19 Oct 2022 12:45:37 +0200 Subject: [PATCH] [MIG] mail_notification_custom_subject: Migration to 15.0 TT36470 --- mail_notification_custom_subject/README.rst | 10 +- .../__manifest__.py | 2 +- .../models/mail_message_custom_subject.py | 2 - .../models/mail_thread.py | 4 +- .../readme/CONTRIBUTORS.rst | 1 + .../static/description/index.html | 8 +- .../test_mail_notification_custom_subject.py | 19 ++-- ...mail_notification_custom_subject_views.xml | 106 +++++++++--------- 8 files changed, 72 insertions(+), 80 deletions(-) diff --git a/mail_notification_custom_subject/README.rst b/mail_notification_custom_subject/README.rst index 13b55c9d43..38730b9611 100644 --- a/mail_notification_custom_subject/README.rst +++ b/mail_notification_custom_subject/README.rst @@ -14,13 +14,13 @@ Mail Notification Custom Subject :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsocial-lightgray.png?logo=github - :target: https://github.com/OCA/social/tree/14.0/mail_notification_custom_subject + :target: https://github.com/OCA/social/tree/15.0/mail_notification_custom_subject :alt: OCA/social .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/social-14-0/social-14-0-mail_notification_custom_subject + :target: https://translation.odoo-community.org/projects/social-15-0/social-15-0-mail_notification_custom_subject :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/205/14.0 + :target: https://runbot.odoo-community.org/runbot/205/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -60,7 +60,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. @@ -105,6 +105,6 @@ Current `maintainer `__: |maintainer-joao-p-marques| -This module is part of the `OCA/social `_ project on GitHub. +This module is part of the `OCA/social `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/mail_notification_custom_subject/__manifest__.py b/mail_notification_custom_subject/__manifest__.py index 11b9545574..1fdd601046 100644 --- a/mail_notification_custom_subject/__manifest__.py +++ b/mail_notification_custom_subject/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Mail Notification Custom Subject", "summary": "Apply a custom subject to mail notifications", - "version": "14.0.1.0.0", + "version": "15.0.1.0.0", "category": "Social Network", "website": "https://github.com/OCA/social", "author": "Tecnativa, Odoo Community Association (OCA)", diff --git a/mail_notification_custom_subject/models/mail_message_custom_subject.py b/mail_notification_custom_subject/models/mail_message_custom_subject.py index fe6fda0f3a..4c8db6a8c2 100644 --- a/mail_notification_custom_subject/models/mail_message_custom_subject.py +++ b/mail_notification_custom_subject/models/mail_message_custom_subject.py @@ -22,7 +22,6 @@ class MailMessageCustomSubject(models.Model): required=True, ) subject_template = fields.Char( - string="Subject Template", required=True, help="Subject (placeholders may be used here)", ) @@ -32,7 +31,6 @@ class MailMessageCustomSubject(models.Model): ("append_after", "Append After"), ("replace", "Replace"), ], - string="Position", default="replace", help="Whether to replace, append at beggining or append at end to other" " templates that apply to a given context", diff --git a/mail_notification_custom_subject/models/mail_thread.py b/mail_notification_custom_subject/models/mail_thread.py index 17d8042f14..d7bb14417e 100644 --- a/mail_notification_custom_subject/models/mail_thread.py +++ b/mail_notification_custom_subject/models/mail_thread.py @@ -21,7 +21,6 @@ def message_post( subtype_xmlid=None, subtype_id=False, partner_ids=None, - channel_ids=None, attachments=None, attachment_ids=None, add_sign=True, @@ -29,7 +28,7 @@ def message_post( **kwargs ): if not subtype_id and subtype_xmlid: - subtype_id = self.env["ir.model.data"].xmlid_to_res_id( + subtype_id = self.env["ir.model.data"]._xmlid_to_res_id( subtype_xmlid, raise_if_not_found=False, ) @@ -71,7 +70,6 @@ def message_post( subtype_xmlid=subtype_xmlid, subtype_id=subtype_id, partner_ids=partner_ids, - channel_ids=channel_ids, attachments=attachments, attachment_ids=attachment_ids, add_sign=add_sign, diff --git a/mail_notification_custom_subject/readme/CONTRIBUTORS.rst b/mail_notification_custom_subject/readme/CONTRIBUTORS.rst index 4231ca13b5..82fac20ef2 100644 --- a/mail_notification_custom_subject/readme/CONTRIBUTORS.rst +++ b/mail_notification_custom_subject/readme/CONTRIBUTORS.rst @@ -3,6 +3,7 @@ * Pedro M. Baeza * João Marques * Carlos Roca + * Víctor Martínez * Versada * Naglis Jonaitis diff --git a/mail_notification_custom_subject/static/description/index.html b/mail_notification_custom_subject/static/description/index.html index e0922890bb..3a98523173 100644 --- a/mail_notification_custom_subject/static/description/index.html +++ b/mail_notification_custom_subject/static/description/index.html @@ -3,7 +3,7 @@ - + Mail Notification Custom Subject