Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
9832 Lượt xem

Hello there!

I have a Binary field, but it has been used too much and now the database is overloaded and it takes so long some queries. I want to fix it and I added "attachment=True" to the field, but the previous data are still on the database.

Is there any function to export all that data and import the data to the ir.attachment??

If it is not, any clues to do it myself, please? I suppose the point would be creating an ad-hoc function but I have no idea about how to get those files from the function, how to transform them into files, and how to save those files in the filestore according to ir.attachment rules.


Sorry for mistakes, I try my best with English.

Thank you all!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

 

Hello as far as I know in version 10 odoo files are stored on the file system, and not in the default database. For version 8 there is a free module for transfer from the database to the file system. 

The logic is written in python therefore to transfer on 10 version I think there are no problems.Link:



https://www.odoo.com/apps/modules/8.0/attachments_to_filesystem/

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
6
thg 12 23
19992
3
thg 3 17
3895
0
thg 2 23
1841
1
thg 4 18
12966
2
thg 1 18
3370