From 4d4c66acc478cf20527fdea9b923693e6f2b8d26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Tue, 7 Dec 2021 09:43:38 +0000 Subject: [PATCH] [IMP] website_slides: remove unnecessary create override An override of invite wizard exists to give a value to body and subject. However as those are computed field (not required) this is not necessary. Task-2709581 Part-of: odoo/odoo#80947 --- addons/website_slides/wizard/slide_channel_invite.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/addons/website_slides/wizard/slide_channel_invite.py b/addons/website_slides/wizard/slide_channel_invite.py index 6c66d0c5842..bae1be76d4b 100644 --- a/addons/website_slides/wizard/slide_channel_invite.py +++ b/addons/website_slides/wizard/slide_channel_invite.py @@ -44,16 +44,6 @@ class SlideChannelInvite(models.TransientModel): ', '.join(invalid_partners.mapped('name')) )) - @api.model - def create(self, values): - if values.get('template_id') and not (values.get('body') or values.get('subject')): - template = self.env['mail.template'].browse(values['template_id']) - if not values.get('subject'): - values['subject'] = template.subject - if not values.get('body'): - values['body'] = template.body_html - return super(SlideChannelInvite, self).create(values) - def action_invite(self): """ Process the wizard content and proceed with sending the related email(s), rendering any template patterns on the fly if needed """