Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Two-Factor Authentication (TOTP)

Entity: res.users

Compute Method: _compute_totp_secret

Inputs Method Outputs
  • id
for user in self:
            if not user.id:
                user.totp_secret = user._origin.totp_secret
                continue
            self.env.cr.execute('SELECT totp_secret FROM res_users WHERE id=%s', (user.id,))
            user.totp_secret = self.env.cr.fetchone()[0]

Back to entity