diff --git a/event_mail/models/event.py b/event_mail/models/event.py index cf6a37a97..4db443f98 100644 --- a/event_mail/models/event.py +++ b/event_mail/models/event.py @@ -38,6 +38,6 @@ def _onchange_event_mail_template_id(self): @api.onchange("event_type_id") def _onchange_type(self): """If a template is already set, we'll override the event.type - schedulers""" + schedulers""" if not self.event_mail_template_id: return super()._onchange_type() diff --git a/event_mail/models/res_company.py b/event_mail/models/res_company.py index 6620c0256..4e6b66f76 100644 --- a/event_mail/models/res_company.py +++ b/event_mail/models/res_company.py @@ -7,5 +7,6 @@ class ResCompany(models.Model): _inherit = "res.company" event_mail_template_id = fields.Many2one( - comodel_name="event.mail.template", string="Mail Template", + comodel_name="event.mail.template", + string="Mail Template", ) diff --git a/event_mail/tests/test_event_mail.py b/event_mail/tests/test_event_mail.py index 52b5b620d..fb892a4eb 100644 --- a/event_mail/tests/test_event_mail.py +++ b/event_mail/tests/test_event_mail.py @@ -97,7 +97,8 @@ def test_event_type(self): {"name": "Online", "is_online": "True", "use_mail_schedule": "False"} ) self.assertFalse( - online_type_id.event_type_mail_ids.exists(), "Musn't be 'Mail Schedule'", + online_type_id.event_type_mail_ids.exists(), + "Musn't be 'Mail Schedule'", ) with Form(self.env["event.event"]) as event_form: event_form.name = "Event test" @@ -119,7 +120,8 @@ def test_company_event_type(self): {"name": "Physical", "is_online": "False", "use_mail_schedule": "False"} ) self.assertTrue( - physical_type_id.event_type_mail_ids.exists(), "Must be 'Mail Schedule'", + physical_type_id.event_type_mail_ids.exists(), + "Must be 'Mail Schedule'", ) self.assertEqual( len(physical_type_id.event_type_mail_ids), diff --git a/setup/event_mail/odoo/addons/event_mail b/setup/event_mail/odoo/addons/event_mail new file mode 120000 index 000000000..0c9773666 --- /dev/null +++ b/setup/event_mail/odoo/addons/event_mail @@ -0,0 +1 @@ +../../../../event_mail \ No newline at end of file diff --git a/setup/event_mail/setup.py b/setup/event_mail/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/event_mail/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)