Mohammed Shekha(Open ERP) has proposed merging 
lp:~openerp-dev/openobject-client-web/6.0-opw-18009-msh into 
lp:openobject-client-web/6.0.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-18009-msh/+merge/79515

Hello,

To generate add attachment to any object from sidebar, and then go to document 
form of knowledge and then open that attachment which you have added.

You will find that there is no filename so when user will click saveas button 
he will not get the filename what he saved instead his file will be saved as a 
filename.dat.

So here changed the code of attachment.py and save the data.filename in 
data_fname field because datas_fname should be name of file.

Thanks.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-18009-msh/+merge/79515
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-client-web/6.0-opw-18009-msh.
=== modified file 'addons/openerp/controllers/attachment.py'
--- addons/openerp/controllers/attachment.py	2011-01-17 11:57:11 +0000
+++ addons/openerp/controllers/attachment.py	2011-10-17 05:03:23 +0000
@@ -75,6 +75,7 @@
         attachment_id = rpc.RPCProxy('ir.attachment').create({
             'name': datas.filename,
             'datas': base64.encodestring(datas.file.read()),
+            'datas_fname': datas.filename,
         }, ctx)
         return {'id': attachment_id, 'name': datas.filename}
 

_______________________________________________
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