From cee85a925a9240867f96978346b011eae7c08c6f Mon Sep 17 00:00:00 2001 From: Antony Lesuisse Date: Mon, 7 Apr 2014 14:50:50 +0200 Subject: [PATCH] [FIX] temporary fix for concurrent commit during test until we improve test cursor to emulate multiple cursors bzr revid: al@openerp.com-20140407125050-c4fq8okuya4jxj0w --- openerp/addons/base/res/res_users.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openerp/addons/base/res/res_users.py b/openerp/addons/base/res/res_users.py index b85c49abf15..772f7f7290b 100644 --- a/openerp/addons/base/res/res_users.py +++ b/openerp/addons/base/res/res_users.py @@ -394,7 +394,8 @@ class res_users(osv.osv): # (In this way, there is no opportunity to have two transactions # interleaving their cr.execute()..cr.commit() calls and have one # of them rolled back due to a concurrent access.) - cr.autocommit(True) + if not openerp.tools.config['test_enable']: + cr.autocommit(True) # check if user exists res = self.search(cr, SUPERUSER_ID, [('login','=',login)]) if res: