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_enabled

View 19.0 View 20.0
Inputs Method Outputs
  • totp_secret
+ if not (self.env.su or self.env.user.has_group('base.group_erp_manager')):
+             self.totp_enabled = False
+             self = self.filtered(lambda u: u._origin == self.env.user).with_prefetch()
for r, v in zip(self, self.sudo()):
            r.totp_enabled = bool(v.totp_secret)
  • totp_enabled

Back to entity