diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2024-10-25 15:50:41 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2024-10-25 15:50:41 +0700 |
| commit | 56f2deda9cdf2a51d5a53aade7758a0ac9313e05 (patch) | |
| tree | 0c9d558c36130b05c032b6638093de992f58bca2 | |
| parent | b8ff264742f9415ceb4d919948b40800700fd9bd (diff) | |
<iman> update send email template
| -rw-r--r-- | indoteknik_api/controllers/api_v1/user.py | 2 | ||||
| -rwxr-xr-x | indoteknik_custom/models/res_users.py | 5 | ||||
| -rw-r--r-- | indoteknik_custom/views/res_users.xml | 60 |
3 files changed, 66 insertions, 1 deletions
diff --git a/indoteknik_api/controllers/api_v1/user.py b/indoteknik_api/controllers/api_v1/user.py index b293c6b5..56b89b27 100644 --- a/indoteknik_api/controllers/api_v1/user.py +++ b/indoteknik_api/controllers/api_v1/user.py @@ -639,7 +639,7 @@ class User(controller.Controller): if user.parent_id: request_company.send_company_switch_approve_mail() else: - request_company.send_company_request_mail() + request_company.send_company_request_mail_switch() response['switch'] = 'Pending' return self.response(response) diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 16f94b37..fce48b30 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -36,6 +36,11 @@ class ResUsers(models.Model): for user in self: template.send_mail(user.id, force_send=True) + def send_company_request_mail_switch(self): + template = self.env.ref('indoteknik_custom.mail_template_res_user_company_request_switch') + for user in self: + template.send_mail(user.id, force_send=True) + def send_company_request_approve_mail(self): template = self.env.ref('indoteknik_custom.mail_template_res_user_company_request_approve') for user in self: diff --git a/indoteknik_custom/views/res_users.xml b/indoteknik_custom/views/res_users.xml index b93ae012..bb643701 100644 --- a/indoteknik_custom/views/res_users.xml +++ b/indoteknik_custom/views/res_users.xml @@ -120,6 +120,66 @@ </table> </field> </record> + <record id="mail_template_res_user_company_request_switch" model="mail.template"> + <field name="name">Users: Company Request</field> + <field name="model_id" ref="base.model_res_users"/> + <field name="subject">Email Pendaftaran Bisnis dalam Proses Review</field> + <field name="email_from">"Indoteknik.com" <noreply@indoteknik.com></field> + <field name="reply_to">sales@indoteknik.com</field> + <field name="email_to">${object.login | safe}</field> + <field name="body_html" type="html"> + <table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Inter, Helvetica, Verdana, Arial,sans-serif; line-height: 24px; color: #454748; width: 100%; border-collapse:separate;"> + <tr><td align="center"> + <table border="0" cellpadding="0" cellspacing="0" width="590" style="font-size: 13px; padding: 16px; background-color: white; color: #454748; border-collapse:separate;"> + <!-- HEADER --> + <tbody> + <tr> + <td align="center" style="min-width: 590px;"> + <table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;"> + <tr> + <td valign="middle"> + <span></span> + </td> + </tr> + + <tr> + <td colspan="2" style="text-align:center;"> + <hr width="100%" style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;" /> + </td> + </tr> + </table> + </td> + </tr> + <!-- CONTENT --> + <tr> + <td align="center" style="min-width: 590px;"> + <table border="0" cellpadding="0" cellspacing="0" width="590" style="min-width: 590px; background-color: white; padding: 0px 8px 0px 8px; border-collapse:separate;"> + <tr><td style="padding-bottom: 24px;"><b>Halo ${object.name},</b></td></tr> + + <tr><td style="padding-bottom: 16px;">Terima kasih atas kepercayaan Anda dengan mendaftarkan bisnis Anda di Indoteknik.com. Permohonan Anda saat ini sedang dalam proses review oleh tim kami.</td></tr> + <tr><td style="padding-bottom: 16px;">Saat ini, kami sedang melakukan pengecekan akhir pada data yang Anda berikan. Proses ini biasanya memakan waktu sekitar 2 x 24 jam.</td></tr> + <tr><td style="padding-bottom: 16px;">Setelah proses review selesai, kami akan segera menginformasikan status akun bisnis Anda melalui email.</td></tr> + <tr><td style="padding-bottom: 16px;">Jika ada pertanyaan lebih lanjut, jangan ragu untuk menghubungi kami di <a href="mailto:sales@indoteknik.com">sales@indoteknik.com</a> atau hubungi whatsapp kami di <a href="https://wa.me/6281717181922">0817-1718-1922</a></td></tr> + <tr><td style="padding-bottom: 16px;">Terima kasih atas perhatiannya.</td></tr> + + <tr><td style="padding-bottom: 2px;"><strong>Hormat kami,</strong></td></tr> + <tr><td style="padding-bottom: 2px;">Indoteknik.com</td></tr> + <tr> + <td style="text-align:center;"> + <hr width="100%" + style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;" /> + </td> + </tr> + </table> + </td> + </tr> + <!-- CONTENT --> + </tbody> + </table> + </td></tr> + </table> + </field> + </record> <record id="mail_template_res_user_company_request_approve" model="mail.template"> <field name="name">Users: Company Request Approve</field> <field name="model_id" ref="base.model_res_users"/> |
