From 52edf789c27a922dec648c49fec259d44a08b42d Mon Sep 17 00:00:00 2001 From: Wolfgang Taferner Date: Wed, 29 Jul 2015 09:40:16 +0200 Subject: [PATCH] [FIX] auth_crypt: safer import of base module Commit 856bc6f2b147970245f96e26d882f114c32e035c may cause an issue if the auth_crypt module is loaded before the base module. That should never happen in normal circumstances, but forcing an explicit import does not hurt and makes it safer. Closes #6742 --- addons/auth_crypt/auth_crypt.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/auth_crypt/auth_crypt.py b/addons/auth_crypt/auth_crypt.py index a7e3a826223..9724b511a05 100644 --- a/addons/auth_crypt/auth_crypt.py +++ b/addons/auth_crypt/auth_crypt.py @@ -22,7 +22,8 @@ _logger = logging.getLogger(__name__) magic_md5 = '$1$' magic_sha256 = '$5$' -openerp.addons.base.res.res_users.USER_PRIVATE_FIELDS.append('password_crypt') +from openerp.addons.base.res import res_users +res_users.USER_PRIVATE_FIELDS.append('password_crypt') def gen_salt(length=8, symbols=None): if symbols is None: