Replace has_lock cursor function with lock

This commit is contained in:
Cédric Krier
2010-02-25 16:44:09 +01:00
parent 1a9f27cfcc
commit db670a76f2
+1 -2
View File
@@ -645,8 +645,7 @@ class Move(ModelSQL, ModelView):
if context is None:
context = {}
if cursor.has_lock():
cursor.execute('LOCK TABLE stock_move')
cursor.lock(self._table)
local_ctx = context and context.copy() or {}
local_ctx['stock_date_end'] = date_obj.today(cursor, user,