[IMP] check that the cursor has not been closed before execute a query [REF] refactor the debug logging of the queries
[IMP] check that the cursor has not been closed before execute a query
[REF] refactor the debug logging of the queries


akretion/openerp-server,akretion/openerp-server,akretion/openerp-server