summaryrefslogtreecommitdiff
path: root/addons/document/document_storage.py
diff options
context:
space:
mode:
authorrpa (Open ERP) <rpa@tinyerp.com>2010-12-16 11:23:48 +0530
committerrpa (Open ERP) <rpa@tinyerp.com>2010-12-16 11:23:48 +0530
commit7d5e28fbb8d49b8a2825bfdd525938d99574e234 (patch)
treec1e90a7757ef2b3fee2190a44a4f7d448707d23b /addons/document/document_storage.py
parent953a15d2a7391370414462402198780b06d45243 (diff)
parent4e307d022c8fbdba848b8a4f57d668a4b6bd036f (diff)
[MERGE]: Merge with lp:~openerp-dev/openobject-addons/trunk-dev-addons2
bzr revid: rpa@tinyerp.com-20101216055348-7yrvv48hjq15grv9
Diffstat (limited to 'addons/document/document_storage.py')
-rw-r--r--addons/document/document_storage.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py
index aa2edb6b411..b61b7fd65fc 100644
--- a/addons/document/document_storage.py
+++ b/addons/document/document_storage.py
@@ -422,9 +422,7 @@ class document_storage(osv.osv):
optionally, fil_obj could point to the browse object of the file
(ir.attachment)
"""
- if not context:
- context = {}
- boo = self.browse(cr, uid, id, context)
+ boo = self.browse(cr, uid, id, context=context)
if not boo.online:
raise IOError(errno.EREMOTE, 'medium offline')
@@ -439,7 +437,7 @@ class document_storage(osv.osv):
"""
if context is None:
context = {}
- boo = self.browse(cr, uid, id, context)
+ boo = self.browse(cr, uid, id, context=context)
if not boo.online:
raise IOError(errno.EREMOTE, 'medium offline')
@@ -540,9 +538,7 @@ class document_storage(osv.osv):
This function MUST be used from an ir.attachment. It wouldn't make sense
to store things persistently for other types (dynamic).
"""
- if not context:
- context = {}
- boo = self.browse(cr, uid, id, context)
+ boo = self.browse(cr, uid, id, context=context)
if fil_obj:
ira = fil_obj
else: