From aa62691f5a44806fe55888778d72c78a1da28de3 Mon Sep 17 00:00:00 2001 From: Stephane Wirtel Date: Thu, 13 Nov 2008 16:35:28 +0100 Subject: [PATCH] ;-) swap filestore and cr.dbname bzr revid: stephane@tinyerp.com-20081113153528-5f2i411vnvjcuplu --- addons/document/document.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/document/document.py b/addons/document/document.py index 498534379f7..21064169335 100644 --- a/addons/document/document.py +++ b/addons/document/document.py @@ -484,7 +484,7 @@ class document_file(osv.osv): result[id] = d elif m=='fs': try: - path = os.path.join(os.getcwd(), cr.dbname,'filestore') + path = os.path.join(os.getcwd(), 'filestore', cr.dbname) value = file(os.path.join(path,r), 'rb').read() result[id] = base64.encodestring(value) except: @@ -500,7 +500,7 @@ class document_file(osv.osv): if not value: return True if (not context) or context.get('store_method','fs')=='fs': - path = os.path.join(os.getcwd(), cr.dbname, "filestore") + path = os.path.join(os.getcwd(), "filestore", cr.dbname) if not os.path.isdir(path): os.makedirs(path) flag = None