summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 6cd47569f0f..1f584e08d83 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -30,11 +30,14 @@ from tools.translate import _
import nodes
import logging
+_loggerdoc = logging.getLogger(__name__)
+
DMS_ROOT_PATH = tools.config.get('document_path', os.path.join(tools.config['root_path'], 'filestore'))
class document_file(osv.osv):
_inherit = 'ir.attachment'
_rec_name = 'datas_fname'
+
def _attach_parent_id(self, cr, uid, ids=None, context=None):
"""Migrate ir.attachments to the document module.
@@ -54,7 +57,7 @@ class document_file(osv.osv):
parent_id = self.pool.get('document.directory')._get_root_directory(cr,uid)
if not parent_id:
- logging.getLogger('document').warning("at _attach_parent_id(), still not able to set the parent!")
+ _loggerdoc.warning("at _attach_parent_id(), still not able to set the parent!")
return False
if ids is not None:
@@ -335,7 +338,7 @@ class document_file(osv.osv):
if r:
unres.append(r)
else:
- logging.getLogger('document').warning("Unlinking attachment #%s %s that has no storage",
+ self.loggerdoc.warning("Unlinking attachment #%s %s that has no storage",
f.id, f.name)
res = super(document_file, self).unlink(cr, uid, ids, context)
stor.do_unlink(cr, uid, unres)