houssine
5 years ago
committed by
Rémy Taymans
10 changed files with 66 additions and 10 deletions
-
2easy_my_coop/__manifest__.py
-
8easy_my_coop/data/mail_template_data.xml
-
1easy_my_coop/models/__init__.py
-
22easy_my_coop/models/mail_template.py
-
1easy_my_coop/views/email_template_view.xml
-
2easy_my_coop_loan/data/mail_template_data.xml
-
1easy_my_coop_loan/models/__init__.py
-
15easy_my_coop_loan/models/mail_template.py
-
6easy_my_coop_taxshelter_report/data/mail_template_data.xml
-
18easy_my_coop_taxshelter_report/models/mail_template.py
@ -0,0 +1,22 @@ |
|||
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 |
|||
|
|||
easy_my_coop = fields.Boolean(string="Easy my coop mail template") |
@ -0,0 +1,15 @@ |
|||
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 |
Write
Preview
Loading…
Cancel
Save
Reference in new issue