跳至內容
選單
此問題已被標幟
1 回覆
7291 瀏覽次數

When attaching pictures to products and/or variants, the pictures are AFAIK stored in the database. The database size can get huge if there are a lot of products, or when the products change every year and the old ones need to be preserved for legacy reasons. Is there a way to tell Odoo that it should save the pictures as files on the file system (exact location is a configuration), and not in the database? It would also be nice that, when the same picture is used for multiple products, the picture is only stored once.

 

 

頭像
捨棄
最佳答案

If you are talking about V7 , yes it is in database... and here is a topic with more info, and solutions for your problem.

If you are using V8, then attachments are stored on fs by default.. .location of stored data is ~/.local/share/Odoo/dbname....
or you can set custom location by adding data_dir = /path/to/locatin in your config file.. 

Hope it helps.. 

頭像
捨棄

Attachments are different than product images added through the product edit form, correct? Aren't the images stored as base64 strings in the product_template table?

作者

That's what I'm thinking as well: attachments (documents) are stored on the file system with module Document Management or something similar. Product pictures seem to be stored in the database as base64 without alternative. Which makes my point: when you work with 4000+ products and a collection that changes every year, the database size gets enormous without much added value.

相關帖文 回覆 瀏覽次數 活動
7
12月 22
12106
6
4月 16
13054
1
3月 24
1833
1
2月 23
2130
1
12月 22
11747