-
-
Notifications
You must be signed in to change notification settings - Fork 167
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_file #445
Open
rousseldenis
wants to merge
40
commits into
OCA:18.0
Choose a base branch
from
acsone:18.0-mig-fs-file-dro
base: 18.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[18.0][MIG] fs_file #445
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
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
This was referenced Feb 20, 2025
/ocabot migration fs_file |
lmignon
approved these changes
Feb 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM (Code review + diff with 16.0 and functional via #449)
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.