bzr revid: fp@tinyerp.com-20110917142602-vo8pl5dpqp82e4z0
This commit is contained in:
Fabien Pinckaers
2011-09-17 16:26:02 +02:00
+1 -1
View File
@@ -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")