DB attachments saved by checksum

attachment_db_by_checksum
REPOSITORY
REPOSITORYOCA/storage
GIT
GIThttps://github.com/OCA/storage.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/storage/tree/14.0/attachment_db_by_checksum
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYStorage
LICENSE
LICENSELGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), TAKOBI
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), TAKOBI
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, Simone Rubino, oca-ci
WEBSITE
WEBSITEhttps://github.com/OCA/storage
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:04
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

Code Analysis

Views touched (0)

No views found for this module.

Models touched (2)

New fields (0)

No new fields.

Public methods (2)
  • force_storage(self)
    @api.model
  • force_storage_by_checksum(self)
    @api.model
    Copy all the attachments to `Attachment content by hash`.

New fields (2)
  • checksum Char
    help='Checksum in the shape 2a/2a...\n' index=True readonly=True required=True string='Checksum/SHA1'
  • db_datas Binary
    attachment=False string='Database Data'
Public methods (1)
  • search_by_checksum(self, fname)
    Get Attachment content, searching by `fname`. Note that `fname` is the relative path of the attachment as it would be saved by the core, for example 2a/2a..., this is the same value that we store in field `ir.attachment.content.checksum`.