From 78a594ed05fcc7d548eea15dc448e768293c723e Mon Sep 17 00:00:00 2001 From: houssine Date: Wed, 2 Jan 2019 15:19:57 +0100 Subject: [PATCH] [REFACT] remove unused variable --- easy_my_coop/models/coop.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/easy_my_coop/models/coop.py b/easy_my_coop/models/coop.py index 3b59352..11d1620 100644 --- a/easy_my_coop/models/coop.py +++ b/easy_my_coop/models/coop.py @@ -44,10 +44,12 @@ class subscription_request(models.Model): if cooperator.member: vals['type'] = 'increase' vals['already_cooperator'] = True + subscr_request = super(subscription_request, self).create(vals) - mail_template_obj = self.env['mail.template'] + confirmation_mail_template = self.env.ref('easy_my_coop.email_template_confirmation', False) confirmation_mail_template.send_mail(subscr_request.id) + return subscr_request @api.model @@ -59,9 +61,10 @@ class subscription_request(models.Model): vals['type'] = 'increase' vals['already_cooperator'] = True subscr_request = super(subscription_request, self).create(vals) - mail_template_obj = self.env['mail.template'] + confirmation_mail_template = self.env.ref('easy_my_coop.email_template_confirmation_company', False) confirmation_mail_template.send_mail(subscr_request.id, True) + return subscr_request def check_belgian_identification_id(self, nat_register_num):