Skip to content

[MIG] fs_attachment: Migration to 18.0#391

Closed
qgroulard wants to merge 116 commits intoOCA:17.0from
acsone:18.0-mig-fs_attachment
Closed

[MIG] fs_attachment: Migration to 18.0#391
qgroulard wants to merge 116 commits intoOCA:17.0from
acsone:18.0-mig-fs_attachment

Conversation

@qgroulard
Copy link
Contributor

Based on #390

@OCA-git-bot
Copy link
Contributor

Hi @lmignon,
some modules you are maintaining are being modified, check this out!

OCA-git-bot and others added 29 commits October 7, 2024 09:02
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/
lmignon and others added 27 commits October 7, 2024 15:25
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/
@qgroulard qgroulard closed this Oct 7, 2024
@qgroulard qgroulard force-pushed the 18.0-mig-fs_attachment branch from f918361 to 21d68a5 Compare October 7, 2024 13:30
@qgroulard
Copy link
Contributor Author

Superseded by #403

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.

Comments