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

Module: Empty users password

Entity: res.users

Compute Method: _compute_has_password

Inputs Method Outputs
  • id
self.env.cr.execute(
            """SELECT id, password FROM res_users WHERE id IN %s;""", (tuple(self.ids),)
        )
res = {row[0]: row[1] for row in self.env.cr.fetchall()}
for user in self:
            user.has_password = bool(res.get(user.id))

Back to entity