summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorGuewen Baconnier <>2011-08-09 17:45:53 +0530
committerDBR (OpenERP) <dbr@tinyerp.com>2011-08-09 17:45:53 +0530
commit48e5b1b8b7cf652090e82f94bc96704053ff0283 (patch)
tree81008dcca5065824e7e33c0c119ee22b6334da2a /addons/document/document.py
parent13ecd980b72d5f0c66c42e6f89bad1520584c8f5 (diff)
[FIX] document : Migration of url attachments
lp bug: https://launchpad.net/bugs/809745 fixed bzr revid: dbr@tinyerp.com-20110809121553-sow9vfchkuc7du1u
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index 69e123b87eb..b4a43fffa99 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -64,7 +64,7 @@ class document_file(osv.osv):
"SET parent_id = %s, db_datas = decode(encode(db_datas,'escape'), 'base64') " \
"WHERE parent_id IS NULL", (parent_id,))
- cr.execute("UPDATE ir_attachment SET file_size=length(db_datas) WHERE file_size = 0;")
+ cr.execute("UPDATE ir_attachment SET file_size=length(db_datas) WHERE file_size = 0 and type = 'binary'")
cr.execute("ALTER TABLE ir_attachment ALTER parent_id SET NOT NULL")