From db670a76f2dcddea7def2482848fe03e543c348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 25 Feb 2010 16:44:09 +0100 Subject: [PATCH] Replace has_lock cursor function with lock --- move.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/move.py b/move.py index 6b5e05efa1..28fffc1473 100644 --- a/move.py +++ b/move.py @@ -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,