From dcb3c680fd3d03e373fd9dae8581ac432febcbe6 Mon Sep 17 00:00:00 2001 From: houssine Date: Thu, 21 Nov 2019 16:54:34 +0100 Subject: [PATCH] [FIX] comment init method --- easy_my_coop/models/mail_template.py | 18 ++++-------------- easy_my_coop_loan/data/mail_template_data.xml | 1 - easy_my_coop_loan/models/mail_template.py | 13 ++++--------- .../models/mail_template.py | 12 ++++-------- 4 files changed, 12 insertions(+), 32 deletions(-) diff --git a/easy_my_coop/models/mail_template.py b/easy_my_coop/models/mail_template.py index 76be7e0..f346a21 100644 --- a/easy_my_coop/models/mail_template.py +++ b/easy_my_coop/models/mail_template.py @@ -1,22 +1,12 @@ from odoo import models, fields -EMAIL_TEMPLATE_IDS = [ - "easy_my_coop.email_template_release_capital", - "easy_my_coop.email_template_confirmation", - "easy_my_coop.email_template_confirmation_company", - "easy_my_coop.email_template_certificat", - "easy_my_coop.email_template_certificat_increase", - "easy_my_coop.email_template_share_transfer", - "easy_my_coop.email_template_share_update" - ] - class MailTemplate(models.Model): _inherit = "mail.template" - def init(self): - for template_id in EMAIL_TEMPLATE_IDS: - mail_template = self.env.ref(template_id) - mail_template.easy_my_coop = True +# def init(self): +# for template_id in EMAIL_TEMPLATE_IDS: +# mail_template = self.env.ref(template_id) +# mail_template.easy_my_coop = True easy_my_coop = fields.Boolean(string="Easy my coop mail template") diff --git a/easy_my_coop_loan/data/mail_template_data.xml b/easy_my_coop_loan/data/mail_template_data.xml index 878ebad..4c708c9 100644 --- a/easy_my_coop_loan/data/mail_template_data.xml +++ b/easy_my_coop_loan/data/mail_template_data.xml @@ -3,7 +3,6 @@ - Loan Subscription Confirmation Email ${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe} diff --git a/easy_my_coop_loan/models/mail_template.py b/easy_my_coop_loan/models/mail_template.py index 0efac37..12138c7 100644 --- a/easy_my_coop_loan/models/mail_template.py +++ b/easy_my_coop_loan/models/mail_template.py @@ -1,15 +1,10 @@ from odoo import models -EMAIL_TEMPLATE_IDS = [ - "easy_my_coop_loan.loan_subscription_confirmation", - "easy_my_coop_loan.loan_issue_payment_request", - ] - class MailTemplate(models.Model): _inherit = "mail.template" - def init(self): - for template_id in EMAIL_TEMPLATE_IDS: - mail_template = self.env.ref(template_id) - mail_template.easy_my_coop = True +# def init(self): +# for template_id in EMAIL_TEMPLATE_IDS: +# mail_template = self.env.ref(template_id) +# mail_template.easy_my_coop = True diff --git a/easy_my_coop_taxshelter_report/models/mail_template.py b/easy_my_coop_taxshelter_report/models/mail_template.py index 585c0bd..4d44e0a 100644 --- a/easy_my_coop_taxshelter_report/models/mail_template.py +++ b/easy_my_coop_taxshelter_report/models/mail_template.py @@ -1,17 +1,13 @@ from odoo import api, models -EMAIL_TEMPLATE_IDS = [ - "easy_my_coop_taxshelter_report.email_template_tax_shelter_certificate", - ] - class MailTemplate(models.Model): _inherit = "mail.template" - def init(self): - for template_id in EMAIL_TEMPLATE_IDS: - mail_template = self.env.ref(template_id) - mail_template.easy_my_coop = True +# def init(self): +# for template_id in EMAIL_TEMPLATE_IDS: +# mail_template = self.env.ref(template_id) +# mail_template.easy_my_coop = True @api.multi def send_mail_with_multiple_attachments(self, res_id,