res_users.py 360 B

123456789101112131415
  1. # -*- coding: utf-8 -*-
  2. # Part of Odoo. See LICENSE file for full copyright and licensing details.
  3. from odoo import models
  4. class Users(models.Model):
  5. _inherit = 'res.users'
  6. def get_totp_invite_url(self):
  7. if not self._is_internal():
  8. return '/my/security'
  9. else:
  10. return super(Users, self).get_totp_invite_url()