Skip to content

gisce/ir_attachment_mongodb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

Store OpenERP attachments to MongoDB

To migrate data, rewrite datas field of ir.attachment model like the following erppeek snippet:

ira = C.IrAttachment
ira_ids = ira.search()

for ira_id in ira_ids:
    datas = ira.read(ira_id, ['datas'])['datas']
    ira.write([ira_id], {'datas': datas})