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