From 20a2c255aa995af4df26f55d549f3039081a3b09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Tue, 17 Nov 2020 14:24:27 +0000 Subject: [PATCH] [IMP] mass_mailing_custom_unsubscribe_event: black, isort, prettier --- mass_mailing_custom_unsubscribe_event/__manifest__.py | 9 ++------- .../models/event_registration.py | 7 ++++--- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/mass_mailing_custom_unsubscribe_event/__manifest__.py b/mass_mailing_custom_unsubscribe_event/__manifest__.py index d0bb44b16..a05202809 100644 --- a/mass_mailing_custom_unsubscribe_event/__manifest__.py +++ b/mass_mailing_custom_unsubscribe_event/__manifest__.py @@ -4,15 +4,10 @@ "name": "Allow to unsubscribe discretely from an event", "category": "Marketing", "version": "12.0.1.0.1", - "depends": [ - "event", - "mass_mailing_custom_unsubscribe", - ], + "depends": ["event", "mass_mailing_custom_unsubscribe"], "author": "Tecnativa, Odoo Community Association (OCA)", "website": "https://github.com/OCA/social", - "data": [ - "views/event_registration_views.xml", - ], + "data": ["views/event_registration_views.xml"], "license": "AGPL-3", "installable": True, "auto_install": True, diff --git a/mass_mailing_custom_unsubscribe_event/models/event_registration.py b/mass_mailing_custom_unsubscribe_event/models/event_registration.py index 1fd67a4d6..80afcd8ff 100644 --- a/mass_mailing_custom_unsubscribe_event/models/event_registration.py +++ b/mass_mailing_custom_unsubscribe_event/models/event_registration.py @@ -5,10 +5,11 @@ from odoo import fields, models class EventRegistration(models.Model): - _inherit = 'event.registration' + _inherit = "event.registration" opt_out = fields.Boolean( - string='Opt-Out', + string="Opt-Out", help="If opt-out is checked, this registree has refused to receive " - "emails for mass mailing and marketing campaign.") + "emails for mass mailing and marketing campaign.", + ) # No need of email field, as it already exists