Browse Source

[FIX] pass correct invoice.id in mail.template

14.0-MIG-INITIAL
default 4 years ago
parent
commit
d839123348
  1. 6
      easy_my_coop/models/account_invoice.py

6
easy_my_coop/models/account_invoice.py

@ -2,11 +2,11 @@
# Houssine Bakkali <houssine@coopiteasy.be>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from datetime import datetime
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class AccountInvoice(models.Model):
_inherit = "account.invoice"
@ -114,7 +114,7 @@ class AccountInvoice(models.Model):
def send_certificate_email(self, certificate_email_template, sub_reg_line):
# we send the email with the certificate in attachment
certificate_email_template.sudo().send_mail(self.partner_id.id, False)
certificate_email_template.sudo().send_mail(self.id, False)
def set_cooperator_effective(self, effective_date):
sub_register_obj = self.env["subscription.register"]

Loading…
Cancel
Save