addons/auth_totp_portal/models/res_users.py
raw| 1 | # -*- coding: utf-8 -*- |
| 2 | # Part of Odoo. See LICENSE file for full copyright and licensing details. |
| 3 | |
| 4 | from odoo import models |
| 5 | |
| 6 | |
| 7 | class ResUsers(models.Model): |
| 8 | _inherit = 'res.users' |
| 9 | |
| 10 | def get_totp_invite_url(self): |
| 11 | if not self._is_internal(): |
| 12 | return '/my/security' |
| 13 | else: |
| 14 | return super().get_totp_invite_url() |