[FIX] do not get next sequence in its own cursor

lp bug: https://launchpad.net/bugs/415972 fixed

bzr revid: christophe@tinyerp.com-20090820091600-1wlzlr9s4f041lbq
This commit is contained in:
Christophe Simonis 2009-08-20 11:16:00 +02:00
parent 608f994263
commit 48ed571bab
1 changed files with 0 additions and 3 deletions

View File

@ -71,8 +71,6 @@ class ir_sequence(osv.osv):
}
def get_id(self, cr, uid, sequence_id, test='id=%s', context=None):
# as we have to commit, we must create a fresh new cursor
cr = pooler.get_db(cr.dbname).cursor()
try:
cr.execute('SELECT id, number_next, prefix, suffix, padding FROM ir_sequence WHERE '+test+' AND active=%s FOR UPDATE', (sequence_id, True))
res = cr.dictfetchone()
@ -84,7 +82,6 @@ class ir_sequence(osv.osv):
return self._process(res['prefix']) + self._process(res['suffix'])
finally:
cr.commit()
cr.close()
return False
def get(self, cr, uid, code):