I can confirm what Tomás is saying. Tested on Ubuntu 12.04 and Arch, with the latest official branches from launchpad.
The bug is because the browse method can receive either a list of ids or an id. If it receives an id it returns a browse record, not a list. This bug happens when you call a browse method on the attachment with only one id, not a list. -- You received this bug notification because you are a member of OpenERP Indian Team, which is subscribed to OpenERP Addons. https://bugs.launchpad.net/bugs/1225107 Title: [7.0] [document] error when writing a document to a static directory from FTP Status in OpenERP Addons (modules): Invalid Bug description: There is an error when writing a document to a static dir from FTP. This is the traceback: 2013-09-13 15:52:20,297 9224 ERROR sbd openerp.addons.document_ftp.ftpserver: Traceback (most recent call last): File "/usr/lib/python2.7/asyncore.py", line 83, in read obj.handle_read_event() File "/usr/lib/python2.7/asyncore.py", line 444, in handle_read_event self.handle_read() File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document_ftp/ftpserver/ftpserver.py", line 657, in handle_read chunk = self.recv(self.ac_in_buffer_size) File "/usr/lib/python2.7/asyncore.py", line 388, in recv self.handle_close() File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document_ftp/ftpserver/ftpserver.py", line 795, in handle_close self.close() File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document_ftp/ftpserver/ftpserver.py", line 801, in close self.file_obj.close() File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document/document.py", line 2111, in close registry.get('ir.attachment').write(cr, 1, par.file_id, {'datas': data}) File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/base_calendar/crm_meeting.py", line 160, in write return super(ir_attachment, self).write(cr, uid, ids, vals, context=context) File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document/document.py", line 132, in write return super(document_file, self).write(cr, uid, ids, vals, context) File "/srv/openerp/7.0/src/openobject-server/openerp/addons/base/ir/ir_attachment.py", line 268, in write self.check(cr, uid, ids, 'write', context=context, values=vals) File "/srv/openerp/7.0/instances/sbd/addons/openobject-addons/document/document.py", line 78, in check cr.execute('SELECT DISTINCT parent_id from ir_attachment WHERE id in %s AND parent_id is not NULL', (tuple(ids),)) TypeError: 'long' object is not iterable The error is not in the FTP module, but on the document module. I will post an MP to solve this in a couple of minutes. To manage notifications about this bug go to: https://bugs.launchpad.net/openobject-addons/+bug/1225107/+subscriptions _______________________________________________ Mailing list: https://launchpad.net/~openerp-india Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-india More help : https://help.launchpad.net/ListHelp

