Conversation
Uses the FilUploader component to manage the file selection and save the file content at same time as the model. Prior to this change, the content was saved as soon as it was selected which is not possible on new records
* Defines extension hooks to use to specify the object type to use as field value and the value to pass when updating the attachment. * Fixes onchange
Store your image into an external filesystem
The *url_path*, *url* and *internal_url* properties on the *FSFileValue* object return *None* if the information is not available (instead of *False*).
To avoid 'Duplicate explicit target name' error in the rst files where 2 links reference the same url, we must use the double underscores __ to make the reference anonymous
The mimetype property of FSFileValue is computed as follow: * If an attachment is set, the mimetype is taken from the attachment. * If no attachment is set, the mimetype is guessed from the name of the file. * If the mimetype cannot be guessed from the name, the mimetype is guessed from the content of the file.
When a new value is assigned to a stored FSFile field, the cache must be invalidated and not contain the given value. This is required since when you access a stored FSFile field, teh FSFileValue returned must be linked to the attachment used to store the file in the storage
Currently translated at 66.6% (2 of 3 strings) Translation: storage-16.0/storage-16.0-fs_file Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_file/it/
Currently translated at 100.0% (3 of 3 strings) Translation: storage-16.0/storage-16.0-fs_file Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_file/it/
Currently translated at 100.0% (3 of 3 strings) Translation: storage-16.0/storage-16.0-fs_file Translate-URL: https://translation.odoo-community.org/projects/storage-16-0/storage-16-0-fs_file/es/
Before this change the creation of empty file was not supported. The issue was mainly due to the fact that at create of a FSFileValue instance with a name but without content, the name was no preserved. As result, the insert of the attachement into the DB failed since the name is a required field. If a FSFileValue instance is now created without content but with a name, the name is now preserved on an empty buffer.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: storage-17.0/storage-17.0-fs_file Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_file/
Currently translated at 100.0% (3 of 3 strings) Translation: storage-17.0/storage-17.0-fs_file Translate-URL: https://translation.odoo-community.org/projects/storage-17-0/storage-17-0-fs_file/it/
6d11c04 to
086a16c
Compare
Closed
Contributor
Author
This was referenced Feb 20, 2025
Contributor
|
/ocabot migration fs_file |
Contributor
|
/ocabot merge nobump |
Contributor
|
What a great day to merge this nice PR. Let's do it! |
Contributor
|
Congratulations, your PR was merged at 885efe2. Thanks a lot for contributing to OCA. ❤️ |
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.
No description provided.