Browse Source

[ADD] emc : email when added to waiting list

pull/43/head
Elouan Le Bars 5 years ago
parent
commit
95da099322
  1. 54
      easy_my_coop/data/mail_template_data.xml
  2. 1372
      easy_my_coop/i18n/fr.po
  3. 528
      easy_my_coop/i18n/fr_BE.po
  4. 2
      easy_my_coop/models/coop.py

54
easy_my_coop/data/mail_template_data.xml

@ -101,6 +101,60 @@
</div> </div>
%endif %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="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> <div>
<img src=${object.company_id.logo_url}> <img src=${object.company_id.logo_url}>
</div> </div>

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

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

2
easy_my_coop/models/coop.py

@ -566,6 +566,8 @@ class subscription_request(models.Model):
@api.one @api.one
def put_on_waiting_list(self): 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'}) self.write({'state': 'waiting'})

Loading…
Cancel
Save