diff --git a/model/res_users.py b/model/res_users.py index 12b7ff5c71cf4d25dc4a75724abffd1335d9b6a5_bW9kZWwvcmVzX3VzZXJzLnB5..5ac61bcbc5f502d4f19cba377a5fc65f8195dd20_bW9kZWwvcmVzX3VzZXJzLnB5 100644 --- a/model/res_users.py +++ b/model/res_users.py @@ -262,8 +262,15 @@ ID (as they can't cohabit). """ - if vals and vals.get('saml_uid'): - if not self._allow_saml_and_password(): + # Clear out the pass when: + # - An SAML ID is being set. + # - The user is not the Odoo admin. + # - The "allow both" setting is disabled. + if ( + vals and vals.get('saml_uid') and + self.id is not SUPERUSER_ID and + not self._allow_saml_and_password() + ): vals.update({ 'password': False, 'password_crypt': False,