summaryrefslogtreecommitdiff
path: root/addons/document/document_storage.py
diff options
context:
space:
mode:
authorgreg-apieum <>2010-02-24 10:32:10 +0100
committergreg-apieum <>2010-02-24 10:32:10 +0100
commit0adc5881463d83f956faabec28db9a911bb20fca (patch)
tree71cf12ef72400259cd523a4438c18c8ce1ea0f3a /addons/document/document_storage.py
parente7a22755e5d44a4de0867e44e19e269af5af56f9 (diff)
ADD to config 'document_path' to set ftp root path
bzr revid: greg-apieum-20100224093210-mpitlp5ckckxjvm5
Diffstat (limited to 'addons/document/document_storage.py')
-rw-r--r--addons/document/document_storage.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py
index 615bfaca1f3..1cf643d0eb5 100644
--- a/addons/document/document_storage.py
+++ b/addons/document/document_storage.py
@@ -34,6 +34,8 @@ import string
import netsvc
from content_index import cntIndex
+DMS_ROOT_PATH = tools.config.get('document_path', os.path.join(tools.config.get('root_path'), 'filestore'))
+
""" The algorithm of data storage
@@ -111,8 +113,7 @@ class document_storage(osv.osv):
}
def _get_rootpath(self, cr, uid, context=None):
- from tools import config
- return os.path.join(tools.config['root_path'], 'filestore', cr.dbname)
+ return os.path.join(DMS_ROOT_PATH, cr.dbname)
_defaults = {
'user_id': lambda self, cr, uid, ctx: uid,