From 386e1749c9f0429dc8ef00b3a687b4b82ce98c3e Mon Sep 17 00:00:00 2001
From: Juliana <juliana@le-filament.com>
Date: Mon, 13 Jun 2022 14:23:55 +0200
Subject: [PATCH] [UPD]Change mail url portal + email from

---
 data/mail_data.xml    | 8 +++++---
 models/res_partner.py | 1 +
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/data/mail_data.xml b/data/mail_data.xml
index 7f467ca..c364b3f 100644
--- a/data/mail_data.xml
+++ b/data/mail_data.xml
@@ -7,6 +7,7 @@
             <field name="model_id" ref="base.model_res_partner" />
             <field name="subject">Votre compte ${object.name}</field>
             <field name="email_to">${object.email}</field>
+            <field name="email_from">app@elo.coop</field>
             <field name="body_html" type="html">
                 <table
                     border="0"
@@ -93,8 +94,9 @@
                                                                         href="${'portal_url' in ctx and ctx['portal_url'] or ''}"
                                                                     >${'portal_url' in ctx and ctx['portal_url'] or ''}</a></li>
                                         </ul>
-                                        Vous pouvez définir ou modifier votre mot de passe.<br
-                                                            /><br />
+                                        Vous pouvez initialiser votre mot de passe:<br/>
+                                        Lien d'initialisation: <a href="${'user_signup_url' in ctx and ctx['user_signup_url'] or ''}">${'user_signup_url' in ctx and ctx['user_signup_url'] or ''}</a>
+                                        <br /><br />
                                         Bonne journée,<br />
                                         L'équipe d'Elocoop
                                     </div>
@@ -177,7 +179,7 @@
                                 <div>
                                     Bonjour ${object.name},<br /><br />
                                     Nous avons reçu une demande de réinitialisation de mot de passe pour votre compte de la plateforme d'Autoconsommation Enercoop.
-                                    Cliquez sur ce lien, valable 24 heures, pour le changer::<br
+                                    Cliquez sur ce lien, valable 24 heures, pour le changer:<br
                                                             />
                                     <div style="margin: 16px 0px 16px 0px;">
                                         <a
diff --git a/models/res_partner.py b/models/res_partner.py
index c1cd287..4106c0b 100644
--- a/models/res_partner.py
+++ b/models/res_partner.py
@@ -131,6 +131,7 @@ class ResPartner(models.Model):
                 dbname=self._cr.dbname,
                 portal_url=portal_url,
                 company_id=company_id,
+                user_signup_url=user_portal.signup_url,
                 lang=lang,
             ).send_mail(self.id, force_send=True)
         else:
-- 
GitLab