Files
odoo_source/addons/web/controllers
Simon Lejeune 5c6087e38e [FIX] web: dropping a database leads to an unusable cursor
Explicitly remove the cursor of the request. Dropping a database
is not transactional and if overrides of ir_http's dispatch worked
with the database (for example, utm), we are not able to commit
the changes at the end of the request.

It worked nice before rev 40561b0fb6 that changed the use of self.pool
by request.env. Note: a cursor is always attached to an environment. Since
the call to super possibly broke the cursor (for example by dropping the
database), the end of the dispatch operation that try to commit and/or close
the cursor could possibly result in the traceback 'unable to close a closed
cursor' with request.env. With self.pool, it didn't happen because the
code actually called in the utm's dispatch override doesn't use a cr
and so there's nothing to close.
2016-09-21 15:56:59 +02:00
..