[FIX] temporary fix for concurrent commit during test until we improve test

cursor to emulate multiple cursors

bzr revid: al@openerp.com-20140407125050-c4fq8okuya4jxj0w
This commit is contained in:
Antony Lesuisse 2014-04-07 14:50:50 +02:00
parent 9c1debf7d9
commit cee85a925a
1 changed files with 2 additions and 1 deletions

View File

@ -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: