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,