Devishree Brahmbhatt (OpenERP) has proposed merging 
lp:~openerp-dev/openobject-addons/trunk-bug-809745-dbr into 
lp:openobject-addons.

Requested reviews:
  Bhumika (OpenERP) (sbh-openerp)
Related bugs:
  Bug #809745 in OpenERP Addons: "Document module migration of "url" 
attachments"
  https://bugs.launchpad.net/openobject-addons/+bug/809745

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-809745-dbr/+merge/70865

Hello Ma'am,

Fixes : " Document module migration of "url" attachments ".
So, kindly review this.

Thank You.
-- 
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-809745-dbr/+merge/70865
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-addons/trunk-bug-809745-dbr.
=== modified file 'document/document.py'
--- document/document.py	2011-07-01 23:41:24 +0000
+++ document/document.py	2011-08-09 12:19:25 +0000
@@ -64,7 +64,7 @@
                     "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")
 

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to