-
-
Notifications
You must be signed in to change notification settings - Fork 163
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][IMP] fs_storage: replace {db_name} in directory_path #379
base: 17.0
Are you sure you want to change the base?
[17.0][IMP] fs_storage: replace {db_name} in directory_path #379
Conversation
@vincent-hatakeyama you should use one backend by database. IMO this change is useless. |
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.
The use case is unclear to me and this could indeed be solved with a different backend configuration per database.
I can imagine this could facilitate the automatic creation of that backend.
This would need a test, and an update of the help text of the field to reveal the feature to users.
# replace {db_name} with the dbname | ||
if field_name == "directory_path": | ||
value = value.format(db_name=self.env.cr.dbname) | ||
return value |
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.
This is also probably not the best place to implement this, as if we do this, it should not behave differently when the value is entered manually or via server environment.
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
In multi database mode, there was no way to avoid filename collisions
9dc2fa7
to
4509bd6
Compare
In multi database mode, there was no way to avoid filename collisions.
In multi database mode, without using that feature in fs_attachment, as the created filename does not contain the database name, it is possible to overwrite files from another database if obfuscation is off and the file have the same name and the same id or cause deletion of files if the checksum is used as the name and the same file is copied over several database and unlinked in one of them.
I would have prefer for the name of the file to always include the database name but I think it would have been a major change considered too breaking. Allowing to use the database name seemed more compatible.