summaryrefslogtreecommitdiff
path: root/addons/document/document_storage.py
diff options
context:
space:
mode:
authoruco (OpenERP) <uco@tinyerp.com>2010-11-19 19:18:01 +0530
committeruco (OpenERP) <uco@tinyerp.com>2010-11-19 19:18:01 +0530
commit12fcd1be2f1a891b7fe099ad0044e68c45280907 (patch)
treef60c92735fb1f9bde88b4affe5fa513b5e460570 /addons/document/document_storage.py
parent58e9ba97bbe188438cb67c1f59292f9b4d1de1c5 (diff)
[IMP] : Added context=None on methods used for _constraints and replaced context={} with context=None.
bzr revid: uco@tinyerp.com-20101119134801-974ev29j4tu46pq2
Diffstat (limited to 'addons/document/document_storage.py')
-rw-r--r--addons/document/document_storage.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/addons/document/document_storage.py b/addons/document/document_storage.py
index aa2edb6b411..eaa4244f10f 100644
--- a/addons/document/document_storage.py
+++ b/addons/document/document_storage.py
@@ -439,7 +439,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')
@@ -542,7 +542,7 @@ class document_storage(osv.osv):
"""
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:
@@ -688,6 +688,8 @@ class document_storage(osv.osv):
@return the dict of values that can safely be be stored in the db.
"""
+ if not context:
+ context = {}
sbro = self.browse(cr, uid, file_node.storage_id, context=context)
assert sbro, "The file #%d didn't provide storage" % file_node.file_id
@@ -730,6 +732,8 @@ class document_storage(osv.osv):
file should move to.
@return the dict of values that can safely be be stored in the db.
"""
+ if not context:
+ context = {}
sbro = self.browse(cr, uid, file_node.storage_id, context=context)
assert sbro, "The file #%d didn't provide storage" % file_node.file_id