Test has_lock before calling LOCK

This commit is contained in:
Cédric Krier committed 2009-07-07 19:39:58 +02:00
1 parent 12ce03ded7
commit f8bd8b8cec
1 file changed
+2 -1
+2 -1
View File
@@ -625,7 +625,8 @@ class Move(ModelSQL, ModelView):
if context is None:
context = {}
cursor.execute('LOCK TABLE stock_move')
if cursor.has_lock():
cursor.execute('LOCK TABLE stock_move')
local_ctx = context and context.copy() or {}
local_ctx['stock_date_end'] = date_obj.today(cursor, user,