Browse Source

Merge pull request #45 from coopiteasy/12.0-add-mail-waiting-list

[12.0][ADD] emc : email when added to waiting list
pull/40/head
Houssine BAKKALI 4 years ago
committed by GitHub
parent
commit
414df1460d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 55
      easy_my_coop/data/mail_template_data.xml
  2. 2799
      easy_my_coop/i18n/fr.po
  3. 1218
      easy_my_coop/i18n/fr_BE.po
  4. 2
      easy_my_coop/models/coop.py

55
easy_my_coop/data/mail_template_data.xml

@ -103,6 +103,61 @@
</div>
%endif
<div>
<img src=${object.company_id.logo_url}>
</div>
</div>
]]></field>
</record>
<record id="email_template_waiting_list" model="mail.template">
<field name="name">Waiting List Email</field>
<field name="email_from">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="subject">Subscription request added on waiting list. </field>
<field name="email_to">${object.email}</field>
<field name="reply_to">${(object.company_id.coop_email_contact or object.user_id.email)|safe}</field>
<field name="model_id" ref="model_subscription_request"/>
<field name="auto_delete" eval="True"/>
<field name="lang">${object.lang}</field>
<field name="easy_my_coop" eval="True"/>
<field name="body_html"><![CDATA[
<div style="font-family: 'Lucica Grande', Ubuntu, Arial, Verdana, sans-serif; font-size: 12px; color: rgb(34, 34, 34); background-color: #FFF; ">
<p>Hello ${object.name},</p>
<p>Thank you for your subscription request. There are currently no project to raise funds for, thus we added it on waiting list.
We will contact you as soon as the subscription requests are re-opened.
</p>
<br/>
<p>If you have any question, do not hesitate to contact us.</p>
<br/>
<p>Sustainably yours,</p>
<p>${object.company_id.name}.</p>
% if object.company_id.street:
${object.company_id.street}
% endif
% if object.company_id.street2:
${object.company_id.street2}<br/>
% endif
% if object.company_id.city or object.company_id.zip:
${object.company_id.zip} ${object.company_id.city}<br/>
% 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 ''}<br/>
% endif
% if object.company_id.phone:
Phone:&nbsp; ${object.company_id.phone}
% endif
% if object.company_id.website:
<div>
Web :&nbsp;<a href="${object.company_id.website}">${object.company_id.website}</a>
</div>
%endif
<div>
<img src=${object.company_id.logo_url}>
</div>

2799
easy_my_coop/i18n/fr.po
File diff suppressed because it is too large
View File

1218
easy_my_coop/i18n/fr_BE.po
File diff suppressed because it is too large
View File

2
easy_my_coop/models/coop.py

@ -607,6 +607,8 @@ class SubscriptionRequest(models.Model):
@api.one
def put_on_waiting_list(self):
waiting_list_mail_template = self.env.ref('easy_my_coop.email_template_waiting_list', False)
waiting_list_mail_template.send_mail(self.id, True)
self.write({'state': 'waiting'})

Loading…
Cancel
Save