[FIX] document : Migration of url attachments

lp bug: https://launchpad.net/bugs/809745 fixed

bzr revid: dbr@tinyerp.com-20110809121553-sow9vfchkuc7du1u
This commit is contained in:
Guewen Baconnier 2011-08-09 17:45:53 +05:30 committed by DBR (OpenERP)
parent 13ecd980b7
commit 48e5b1b8b7
1 changed files with 1 additions and 1 deletions

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")