[MIG] fs_attachment: Migration to 18.0#391
Closed
Conversation
Contributor
|
Hi @lmignon, |
This addon define a new model 'fs.storage' used to get access to a filesystem storage (ftp, sftp, s3, azure, ...) through an unified interface provided by the 'fsspec' python library (https://filesystem-spec.readthedocs.io/en/latest)
…dav. It is not possible to specify a tuple in json
Add history for commit included from OCA#285 and the author to the contributors list
Before this change, users with basic access rights was no more able to create an attachment. The problem was caused by the need to access system information to determine in which file system the attachment should be created, when this sensitive information is not accessible to everyone. The change consists of reading this information in sudo to bypass this security restriction in this specific context.
Currently translated at 100.0% (37 of 37 strings) Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings) Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings) Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/es/
Currently translated at 100.0% (37 of 37 strings) Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/it/
Before the change, reading the options protocol might not be in sync with the record protocol. This is particularly the case if the record is save in the middle of editing as the value resets, which can be quite confusing.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/
Currently translated at 100.0% (39 of 39 strings) Translation: storage-16.0/storage-16.0-fs_storage Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_storage/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
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/
f918361 to
21d68a5
Compare
Contributor
Author
|
Superseded by #403 |
This file contains hidden or 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
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.
Based on #390