From c7499df2959cd1ed1f895c27d664712914bf806a Mon Sep 17 00:00:00 2001 From: houssine Date: Fri, 14 Jun 2019 14:30:58 +0200 Subject: [PATCH] [IMP] this is handled in the get_mail_template_certificate function --- easy_my_coop/models/account_invoice.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/easy_my_coop/models/account_invoice.py b/easy_my_coop/models/account_invoice.py index 6e89996..be05075 100644 --- a/easy_my_coop/models/account_invoice.py +++ b/easy_my_coop/models/account_invoice.py @@ -76,7 +76,7 @@ class account_invoice(models.Model): mail_template_id = self.get_mail_template_certificate() - # flag the partner as a effective member + # flag the partner as an effective member # if not yet cooperator we generate a cooperator number if self.partner_id.member is False \ and self.partner_id.old_member is False: @@ -87,8 +87,7 @@ class account_invoice(models.Model): 'cooperator_register_number': int(sub_reg_num)}) elif self.partner_id.old_member: self.partner_id.write({'member': True, 'old_member': False}) - else: - mail_template_id = self.get_mail_template_certificate() + sequence_operation = self.get_sequence_operation() sub_reg_operation = sequence_operation.next_by_id()