diff options
| author | Foram Katharotiya (OpenERP) <fka@tinyerp.com> | 2012-06-22 12:18:39 +0530 |
|---|---|---|
| committer | Foram Katharotiya (OpenERP) <fka@tinyerp.com> | 2012-06-22 12:18:39 +0530 |
| commit | 0c374a66bc3de5cdf48eb66b2078c0946aa045db (patch) | |
| tree | 50320ad4188001b50cb8b0dcd239cc121ad7ef48 /addons/document/document.py | |
| parent | e02d8a68ef8eba0ab3b6c084301e0b707e8402e6 (diff) | |
[IMP] Add logging at the top of python files
bzr revid: fka@tinyerp.com-20120622064839-llitm8szgikxznwr
Diffstat (limited to 'addons/document/document.py')
| -rw-r--r-- | addons/document/document.py | 7 |
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) |
