Skip to Content
Menu
v 7.0 v 8.0 v 9.0 v 10.0 v 11.0 v 12.0 Third Party 168
Download for v 12.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 255
Technical Name base_attachment_object_storage
LicenseAGPL-3
Websitehttps://github.com/camptocamp/odoo-cloud-platform
Versions 7.0 8.0 9.0 10.0 11.0 12.0
You bought this module and need support? Click here!

Base class for attachments on external object store

This is a base addon that regroup common code used by addons targeting specific object store

Configuration

Object storage may be slow, and for this reason, we want to store some files in the database whatever.

Small images (128, 256) are used in Odoo in list / kanban views. We want them to be fast to read. They are generally < 50KB (default configuration) so they don't take that much space in database, but they'll be read much faster than from the object storage.

The assets (application/javascript, text/css) are stored in database as well whatever their size is:

  • a database doesn't have thousands of them
  • of course better for performance
  • better portability of a database: when replicating a production instance for dev, the assets are included

This storage configuration can be modified in the system parameter ir_attachment.storage.force.database, as a JSON value, for instance:

{"image/": 51200, "application/javascript": 0, "text/css": 0}

Where the key is the beginning of the mimetype to configure and the value is the limit in size below which attachments are kept in DB. 0 means no limit.

Default configuration means:

  • images mimetypes (image/png, image/jpeg, ...) below 50KB are stored in database
  • application/javascript are stored in database whatever their size
  • text/css are stored in database whatever their size

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.