Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] fs_attachment: Migration to 18.0 #403

Open
wants to merge 70 commits into
base: 18.0
Choose a base branch
from

Conversation

qgroulard
Copy link

@qgroulard qgroulard commented Oct 7, 2024

Including commits from #402

@sbidoul
Copy link
Member

sbidoul commented Oct 7, 2024

@qgroulard there is a handful of commits to grab from #402

@sbidoul sbidoul changed the title [MIG] fs_attachment: Migration to 18.0 [18.0][MIG] fs_attachment: Migration to 18.0 Oct 7, 2024
@sbidoul
Copy link
Member

sbidoul commented Oct 7, 2024

/ocabot migration fs_attachment

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Oct 7, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Oct 7, 2024
12 tasks
Copy link
Member

@sbidoul sbidoul left a comment

Choose a reason for hiding this comment

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

Code review.

lmignon and others added 22 commits October 15, 2024 07:42
Avoid recompute of new columns when installed on an existing database
Allows to provide configuration parameters through server environement files.
Remove code used to try to read file from the root filesystem and write into the specialized filesystem. This code was used to try to provide a way to manage staging environments by reusing the same filesystem storage but with a different directory_path depending of the environement. A simpler method is to configure use a different filesystem storage by environement. If a production database is restored in pre production env, you can declare a new filesystem storage with a different code to store the attachements by default and configure the filesystem storage from the production with information allowing to read documents stored in it but not to modify or delete existing documents. This make the implementation far more simple.
To create a new cursor, just ask to the current registry.... Loading a registry is very time consuming and could lead to deadlocks...
Fix image streaming
Fix image streaming with resize
Fix content size whithout x-send-file
This code was initially used to magically know if we need to obfusc or not the filename into the database. Since this option is now explicit, we can safely remove-it. Moreover, without this code it's now possible to migrate old storage_file contents to the new fs_* addons
mymage and others added 29 commits October 15, 2024 07:42
Currently translated at 100.0% (65 of 65 strings)

Translation: storage-16.0/storage-16.0-fs_attachment
Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_attachment/it/
If say click-odoo-update fails partway, the columns are already created
and the following tentative update fails because the columns exist.
…en the new mimetype doesn't match the old one
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: storage-17.0/storage-17.0-fs_attachment
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_attachment/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: storage-17.0/storage-17.0-fs_attachment
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_attachment/
The method _check_force_db_for_default_attachment_rules() encountered issues when used with a constraints() decorator due to the computed field use_as_default_for_attachments, which is not stored in the database. This fix consists in replacing the constraints() decorator with a directly invoked method.
Currently translated at 100.0% (64 of 64 strings)

Translation: storage-17.0/storage-17.0-fs_attachment
Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_attachment/zh_CN/
When trying to get access to files stored into an external filesystem, don't crash if the files cannot be accessed. This is necessary to avoid blocking Odoo's operation if an external system is not accessible.
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.