Skip to content

[19.0][MIG] attachment_unindex_content: Migration to 19.0#3521

Open
moylop260 wants to merge 36 commits intoOCA:19.0from
vauxoo-dev:19.0-attachment_unindex_content-moy
Open

[19.0][MIG] attachment_unindex_content: Migration to 19.0#3521
moylop260 wants to merge 36 commits intoOCA:19.0from
vauxoo-dev:19.0-attachment_unindex_content-moy

Conversation

@moylop260
Copy link
Contributor

@moylop260 moylop260 commented Feb 12, 2026

Migration commits:

Other commits:

FUTURE TASKS AFTER MERGE

  • Backporting "other commits" to 18.0

ebirbe and others added 30 commits February 12, 2026 16:59
This module is intended to disable the indexation of data on the
ir.attachment model.

Attachment model has a field called 'index_content' where the content
of the attachment is read and stored directly in the database. This field is
useful in order to search content of a file. But most of cases it is not used,
so, you can install this module in order to:

- **Avoid Duplicating Data:** Because indexation extracts text content
from files and put it on the database in order it could be searched, but
this implies you have the file data in your `filestore` directory, and
also part (or sometimes all) of that data in your database too.
- **Improve Performance:** Since not all indexed files are plain text, they
require extra process to read them.

Maybe you could try to uninstall modules like `document` in order to
disable its indexation features, but you could face the uninstallation of other
modules that could be useful for you (e.g, `hr_recruitment` depends on that).

But even if you don't have `document` installed, you'd still have
plain text content indexation by default.

Using this module you will not require to uninstall any module to
disable the attachment content indexation, because we directly disable it at
`ir.attachment` base.
Currently translated at 100.0% (4 of 4 strings)

Translation: server-tools-14.0/server-tools-14.0-attachment_unindex_content
Translate-URL: https://translation.odoo-community.org/projects/server-tools-14-0/server-tools-14-0-attachment_unindex_content/es_AR/
Odoo introduced a new param `checksum` to the method `_index` on the
attachment model [1]. Since that param is not supported on this model,
the following error is now being raised:

    TypeError: _index() got an unexpected keyword argument 'checksum'

[1] odoo/odoo@3d59cc84
- Manifest's "Version" updated to "16.0.1.0.0"
- Translation files updated to new version
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-16.0/server-tools-16.0-attachment_unindex_content
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_unindex_content/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: server-tools-16.0/server-tools-16.0-attachment_unindex_content
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_unindex_content/
Currently translated at 100.0% (1 of 1 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_unindex_content
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_unindex_content/es/
Currently translated at 100.0% (1 of 1 strings)

Translation: server-tools-16.0/server-tools-16.0-attachment_unindex_content
Translate-URL: https://translation.odoo-community.org/projects/server-tools-16-0/server-tools-16-0-attachment_unindex_content/it/
@moylop260 moylop260 force-pushed the 19.0-attachment_unindex_content-moy branch from c7a6a3a to e194f13 Compare February 12, 2026 23:18
@moylop260
Copy link
Contributor Author

/ocabot migration attachment_unindex_content

@OCA-git-bot OCA-git-bot added this to the 19.0 milestone Feb 12, 2026
@OCA-git-bot OCA-git-bot mentioned this pull request Feb 12, 2026
41 tasks
@randall-vx
Copy link
Contributor

Technically, LGTM 👍

@rolandojduartem
Copy link

I am just worried about no test, is this module needed?

@moylop260 moylop260 force-pushed the 19.0-attachment_unindex_content-moy branch 10 times, most recently from 1c6d599 to 78467ef Compare February 13, 2026 17:46
* Remove superfluous keys in the manifest
* Remove financed migrations by other companies
* Bump manifest version
… dependency

Without declaring explicit dependency,
Odoo did not guarantee its load order,
resulting in attachment content still being indexed
…n about missing pdfminer.six

The PDF indexation function is never called by the module `attachment_unindex_content`, so the package is not needed.
Related to https://github.com/odoo/odoo/blob/d15685304f47/addons/attachment_indexation/models/ir_attachment.py#L17
@moylop260 moylop260 force-pushed the 19.0-attachment_unindex_content-moy branch from 78467ef to 14f4266 Compare February 13, 2026 18:15
Copy link
Member

@Kiplangatdan Kiplangatdan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Tested on a v19 local instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.