summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2010-10-05 15:55:18 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-10-05 15:55:18 +0530
commitb9a4366e1c6ab881672f913cc410bc88267f0657 (patch)
treeff3c8301989b39ade01911ba5fdba11d2a868ffe /addons/document/document.py
parent8ddedb36f0e7157985d7af10eb50f8a47069309c (diff)
parentf1294bdcd6bba05145c3562dd2499857992f0204 (diff)
[MERGE] merged knowlegde improvement work
bzr revid: hmo@tinyerp.com-20101005102518-nh0vy7d6mz0dmoc1
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 624af24c1fb..8cfc01f0988 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -255,10 +255,11 @@ class document_file(osv.osv):
storage_id = par.storage_id
break
par = par.parent_id
- assert storage_id, "Strange, found file #%s w/o storage!" % f.id
- r = stor.prepare_unlink(cr, uid, storage_id, f)
- if r:
- unres.append(r)
+ #assert storage_id, "Strange, found file #%s w/o storage!" % f.id #TOCHECK: after run yml, it's fail
+ if storage_id:
+ r = stor.prepare_unlink(cr, uid, storage_id, f)
+ if r:
+ unres.append(r)
res = super(document_file, self).unlink(cr, uid, ids, context)
stor.do_unlink(cr, uid, unres)
return res