diff --git a/easy_my_coop_loan/data/mail_template_data.xml b/easy_my_coop_loan/data/mail_template_data.xml index eb5ac4f..a0aed13 100644 --- a/easy_my_coop_loan/data/mail_template_data.xml +++ b/easy_my_coop_loan/data/mail_template_data.xml @@ -62,6 +62,8 @@ ]]> + + Loan Issue Payment Request - Send by Email @@ -124,5 +126,57 @@ ]]> + + + Loan Issue Confirm Payment Received - Send by Email + + ${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe} + + ${object.company_id.name} Payment received (Ref ${object.loan_issue_id.name or 'n/a'}) + ${object.partner_id.id} + + ${(object.company_id.coop_email_contact or object.loan_issue_id.user_id.email)|safe} + + + + ${object.partner_id.lang} + + +

Bonjour ${object.partner_id.name},

+

Par la présente, nous vous confirmons que nous avons bien reçu de votre part le versement pour la souscription des obligations FinMip

+
${object.partner_id.name}
${object.amount}
${object.loan_issue_id.display_name}
${object.quantity}
+

Comme prévu dans la note d'information (reprise en attaché), ces obligations vous seront remboursées dans les 15 jours ouvrables qui suivent :

  •  pour les obligations à 5 ans, assorties d'un intérêt annuel brut de 0,85%

  • pour les obligations à 10 ans, assorties d'un intérêt annuel brut de 1,25%

+

Un précompte mobilier de 30 % sera retenu à la source sur les intérêts.

+

Si vous avez la moindre question, n'hésitez pas à nous contacter.

Nous vous remercions grandement pour votre soutien.

+

+ +

${object.company_id.name}.

+ + % if object.company_id.street: + ${object.company_id.street} + % endif + % if object.company_id.street2: + ${object.company_id.street2}
+ % endif + % if object.company_id.city or object.company_id.zip: + ${object.company_id.zip} ${object.company_id.city}
+ % endif + % if object.company_id.country_id: + ${object.company_id.state_id and ('%s, ' % object.company_id.state_id.name) or ''} ${object.company_id.country_id.name or ''}
+ % endif + % if object.company_id.phone: + Phone:  ${object.company_id.phone} + % endif + + % if object.company_id.website: + + %endif + ]]>
+
+ diff --git a/easy_my_coop_loan/models/loan_issue_line.py b/easy_my_coop_loan/models/loan_issue_line.py index 3bb45f9..f8cafcf 100644 --- a/easy_my_coop_loan/models/loan_issue_line.py +++ b/easy_my_coop_loan/models/loan_issue_line.py @@ -114,7 +114,17 @@ class LoanIssueLine(models.Model): for line in self: line.write({"state": "cancelled"}) + @api.multi + def get_confirm_paid_email_template(self): + self.ensure_one() + return self.env.ref( + "easy_my_coop_loan.email_template_loan_confirm_paid" + ) + @api.multi def action_paid(self): for line in self: + loan_email_template = self.get_confirm_paid_email_template() + loan_email_template.sudo().send_mail(line.id, force_send=False) + line.write({"state": "paid"})