[FIX] document_ftp/document_webdav: correctly fix what was incorrectly fixed in
revno 4821, revision-id tfr@openerp.com-20110628141309-oag99snygj3vuqwn : pooler.get_db_only was removed from the server but not from the addons. It seems the commit 4821 tried to solved the situation by using get_db instead, which is wrong and it will load the db instead of just trying to get a cursor. This commit solves correctly the removel of get_db_only: by using sql_db.db_connect (for which get_db_only was an alias). bzr revid: vmt@openerp.com-20110909113916-td9o8yct0u5bitb6
This commit is contained in:
parent
f59aaf7ca0
commit
28f900202b
|
@ -11,6 +11,7 @@ import fnmatch
|
|||
|
||||
import pooler
|
||||
import netsvc
|
||||
import sql_db
|
||||
|
||||
from service import security
|
||||
from osv import osv
|
||||
|
@ -68,7 +69,7 @@ class abstracted_fs(object):
|
|||
db, cr = None, None
|
||||
try:
|
||||
try:
|
||||
db = pooler.get_db(db_name)
|
||||
db = sql_db.db_connect(db_name)
|
||||
cr = db.cursor()
|
||||
cr.execute("SELECT 1 FROM pg_class WHERE relkind = 'r' AND relname = 'ir_module_module'")
|
||||
if not cr.fetchone():
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#
|
||||
##############################################################################
|
||||
import pooler
|
||||
import sql_db
|
||||
|
||||
import os
|
||||
import time
|
||||
|
@ -361,7 +362,7 @@ class openerp_dav_handler(dav_interface):
|
|||
for db_name in result:
|
||||
cr = None
|
||||
try:
|
||||
db = pooler.get_db(db_name)
|
||||
db = sql_db.db_connect(db_name)
|
||||
cr = db.cursor()
|
||||
cr.execute("SELECT id FROM ir_module_module WHERE name = 'document' AND state='installed' ")
|
||||
res=cr.fetchone()
|
||||
|
|
Loading…
Reference in New Issue