mirror of
https://github.com/camptocamp/odoo-cloud-platform.git
synced 2026-06-24 08:47:40 +00:00
An Object Storage read is slower than a disk of database access. It might take ~200 to 300ms to retrieve a file content. This is not an issue for attachments such as the pdf files or any attachment that we want to read on demand. But that's too slow for files needed to render a web page. We'll store in the database: * Assets (js, css, ...). As a side effect, the databases will be more portable, as assets are rebuilt frequently, storing them in the Object Storage led the integration server to try to read assets deleted since long ago * Attachments linked to Binary fields named 'image_small', 'image_medium', 'web_icon_data'. Those fields are often used on kanban views that display a lot a images and retrieving them all was then very slow (Odoo does not do async requests). The migration to S3 is no longer called during initialization of the registry: it would be too slow as we would have to define if the attachments must be kept in database or sent to S3 on each new start. It means we have to call `env['ir.attachment'].force_storage()` to run the migration.
20 lines
542 B
Python
20 lines
542 B
Python
# -*- coding: utf-8 -*-
|
|
# Copyright 2016 Camptocamp SA
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
|
|
|
|
|
|
{'name': 'Attachments on S3 storage',
|
|
'summary': 'Store assets and attachments on a S3 compatible object storage',
|
|
'version': '10.0.1.1.0',
|
|
'author': 'Camptocamp,Odoo Community Association (OCA)',
|
|
'license': 'AGPL-3',
|
|
'category': 'Knowledge Management',
|
|
'depends': ['base'],
|
|
'external_dependencies': {
|
|
'python': ['boto'],
|
|
},
|
|
'website': 'http://www.camptocamp.com',
|
|
'data': [],
|
|
'installable': True,
|
|
}
|