-
-
Notifications
You must be signed in to change notification settings - Fork 147
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
[17.0][MIG] fs_attachment: Migration to 17.0 #344
Merged
OCA-git-bot
merged 48 commits into
OCA:17.0
from
nguyenminhchien:17.0-mig-fs_attachment
Mar 24, 2024
Merged
[17.0][MIG] fs_attachment: Migration to 17.0 #344
OCA-git-bot
merged 48 commits into
OCA:17.0
from
nguyenminhchien:17.0-mig-fs_attachment
Mar 24, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Feb 28, 2024
14 tasks
gurneyalex
approved these changes
Mar 11, 2024
nguyenminhchien
force-pushed
the
17.0-mig-fs_attachment
branch
from
March 11, 2024 09:10
396ae5e
to
f1c14e0
Compare
Also fix typo into summary
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...
…ds to different FS storages
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
Add history for commit included from OCA#285 and the author to the contributors list
When manipulating the file system api through a local variable named *fs*, we observed some strange behavior when it was wrongly redefined in an enclosing scope as in the following example: *with fs.open(...) as fs*. This commit fixes this issue by renaming the local variable and therefore avoiding the name clash.
Currently translated at 36.9% (24 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/
Before this change, when the fs_url was computed the computed value was always reassigned to the fs_url attribute even if the value was the same. In a lot of cases the value was the same and the reassignment was not necessary. Unfortunately this reassignment has as side effect to mark the record as dirty and generate a SQL update statement at the end of the transaction.
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/
fs.storage is protected as it contains credentials. It must be accessed sudo when needed for regular users manipulating ir.attachments.
Let "image.png" be an image. Thumbnails might be created with a path such as "38/5b/image-128.png". Before, the path was forgotten when updating the attachment, so accessing the file would crash, making the record inaccessible.
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
nguyenminhchien
force-pushed
the
17.0-mig-fs_attachment
branch
from
March 11, 2024 09:12
f1c14e0
to
79f1068
Compare
lmignon
approved these changes
Mar 24, 2024
/ocabot migration fs_attachment |
/ocabot merge nobump |
This PR looks fantastic, let's merge it! |
Congratulations, your PR was merged at 22ab4c9. Thanks a lot for contributing to OCA. ❤️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref: BSRD-747