Skip to content
Snippets Groups Projects
Commit 899c8df4 authored by Juliana's avatar Juliana
Browse files

[ADD]Add translation message

parent d8c93e7f
No related branches found
No related tags found
No related merge requests found
...@@ -86,14 +86,22 @@ ...@@ -86,14 +86,22 @@
>accéder aux différents contrats liés à votre opération : contrat d’achat local, contrats avec la personne morale organisatrice…</li> >accéder aux différents contrats liés à votre opération : contrat d’achat local, contrats avec la personne morale organisatrice…</li>
</ul> </ul>
<p>Votre nom d'utilisateur: ${object.email or ''}<br/> <p
Lien d’initialisation de votre mot de passe: <br/> >Votre nom d'utilisateur: ${object.email or ''}<br
<a href="${'user_signup_url' in ctx and ctx['user_signup_url'] or ''}"> />
Lien d’initialisation de votre mot de passe: <br
/>
<a
href="${'user_signup_url' in ctx and ctx['user_signup_url'] or ''}"
>
${'user_signup_url' in ctx and ctx['user_signup_url'] or ''} ${'user_signup_url' in ctx and ctx['user_signup_url'] or ''}
</a> </a>
</p><br /> </p><br />
<p>Une fois votre mot de passe crée, vous pouvez accéder à la plateforme Elocoop en suivant ce lien : <p
<a href="${'portal_url' in ctx and ctx['portal_url'] or ''}">${'portal_url' in ctx and ctx['portal_url'] or ''}</a></p> >Une fois votre mot de passe crée, vous pouvez accéder à la plateforme Elocoop en suivant ce lien :
<a
href="${'portal_url' in ctx and ctx['portal_url'] or ''}"
>${'portal_url' in ctx and ctx['portal_url'] or ''}</a></p>
<br /><br /> <br /><br />
Bonne journée,<br /> Bonne journée,<br />
L'équipe d'Elocoop L'équipe d'Elocoop
......
...@@ -4,3 +4,4 @@ ...@@ -4,3 +4,4 @@
from . import res_partner from . import res_partner
from . import res_company from . import res_company
from . import res_config_settings from . import res_config_settings
from . import res_users
# Copyright 2022 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, models
class ResUsers(models.Model):
_inherit = "res.users"
def password_match_message(self):
self.ensure_one()
company_id = self.company_id
message = []
if company_id.password_lower:
message.append(
_(
"\n* Lettre minuscule (au moins %s caractères)"
% str(company_id.password_lower)
)
)
if company_id.password_upper:
message.append(
_(
"\n* Lettre majuscule (au moins %s caractères)"
% str(company_id.password_upper)
)
)
if company_id.password_numeric:
message.append(
_(
"\n* Chiffre numérique (au moins %s caractères)"
% str(company_id.password_numeric)
)
)
if company_id.password_special:
message.append(
_(
"\n* Chiffre numérique (au moins %s caractères)"
% str(company_id.password_special)
)
)
if message:
message = [_("Doit contenir: ")] + message
if company_id.password_length:
message = [
_("Le mot de passe doit contenir %d caractères ou plus.")
% company_id.password_length
] + message
return "\r".join(message)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment