diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-30 09:53:05 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-10-30 09:53:05 +0700 |
| commit | 0831511787b1cd2171d6dd1dd6c2c9da46b64d2e (patch) | |
| tree | 46b77b2098e35e1bdadba8d46aa2ebcbe61065e3 /indoteknik_custom/models | |
| parent | 6a87a12ca305d22db5532d1c645b67e9c5bf9747 (diff) | |
Add get activation token url on activation mail template
Diffstat (limited to 'indoteknik_custom/models')
| -rwxr-xr-x | indoteknik_custom/models/res_users.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indoteknik_custom/models/res_users.py b/indoteknik_custom/models/res_users.py index 02433deb..1e729550 100755 --- a/indoteknik_custom/models/res_users.py +++ b/indoteknik_custom/models/res_users.py @@ -27,4 +27,8 @@ class ResUsers(models.Model): for user in self: user._generate_otp() user._generate_activation_token() - template.send_mail(user.id, force_send=True)
\ No newline at end of file + template.send_mail(user.id, force_send=True) + + def get_activation_token_url(self): + base_url = self.env['ir.config_parameter'].get_param('site.base.url') + return f'{base_url}/register?activation=token&token={self.activation_token}' |
