From 04b252b72c3bb5568f002e05d2fa889a1b4aae90 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Mon, 11 May 2015 16:22:17 +0200 Subject: [PATCH] [FIX] Cursor.closed property `_obj` doesn't exists anymore when the cursor is effectively closed. --- openerp/sql_db.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openerp/sql_db.py b/openerp/sql_db.py index 2ed408e61e5..f389a847548 100644 --- a/openerp/sql_db.py +++ b/openerp/sql_db.py @@ -404,9 +404,7 @@ class Cursor(object): @property def closed(self): - # NOTE: we cannot use `__getattr__` delegation as we - # should not `check` that the cursor is closed - return self._obj.closed + return self._closed class TestCursor(Cursor): """ A cursor to be used for tests. It keeps the transaction open across