Contributors mailing list archives


Module loading priority and inheritance

DEC, Yann Papouin
- 15/06/2022 13:28:43

I just installed the auth_totp module to add MFA support to our odoo 12.0 instance and its behaviour is totally broken after a server restart when the auth_ldap module is also installed.

Because _check_credentials logic is just made to accept at least one Valid authentication and not globally refuse any authentication, the current implementation of the auth_totp will always fail if a module validate _check_credentials after that the MfaLoginNeeded exception is raised.

To me it's more a framework issue and the manifest should allow a new priority value to sort modules without inter-dependencies (because actually, it seems to use an alphabetic sorting based on module name).
But without this, how do you handle such situations ?

Yann PAPOUIN, Ingénieur R&D | DEC