diff options
| author | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-20 13:52:55 +0530 |
|---|---|---|
| committer | rpa (Open ERP) <rpa@tinyerp.com> | 2010-12-20 13:52:55 +0530 |
| commit | 4e307d022c8fbdba848b8a4f57d668a4b6bd036f (patch) | |
| tree | 249f8361bac695c0bec0c844d964194202d680a0 /addons/document/document_storage.py | |
| parent | 6e34e7c52a3f37876b627fb5c80ac79d3c614807 (diff) | |
| parent | c2f85df411949653257c5b51f1578a1e40709510 (diff) | |
[MERGE]: Merge with lp:openobject-addons
bzr revid: rpa@tinyerp.com-20101215042654-04ccazkz5v57ml3j
bzr revid: rpa@tinyerp.com-20101216043335-ji5h61dra451cml4
bzr revid: rpa@tinyerp.com-20101220082255-1g3ea50rkjlacwqw
Diffstat (limited to 'addons/document/document_storage.py')
| -rw-r--r-- | addons/document/document_storage.py | 10 |
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: |
