Skip to content

[17.0][IMP] fs_storage: Allow setting check_connection_method in configuration file #442

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

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from

Conversation

vincent-hatakeyama
Copy link
Contributor

No description provided.

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making this change will loose the data from the instance, as the system will drop the column check_connection_method.

At least we need a migration script

@vincent-hatakeyama
Copy link
Contributor Author

I’ve checked : the column is not dropped.

The value is lost thought, as server_environment looks for the value elsewhere.

I’m trying to find a way to migrate the value.

@vincent-hatakeyama vincent-hatakeyama force-pushed the feature/17.0/fs_storage/allow_setting_check_connection_method_server_env branch from 6c197a1 to 7fcad05 Compare July 3, 2025 08:52
@vincent-hatakeyama
Copy link
Contributor Author

vincent-hatakeyama commented Jul 3, 2025

Migration script added.

@etobella
Copy link
Member

etobella commented Jul 3, 2025

Have you checked on a database?

@vincent-hatakeyama
Copy link
Contributor Author

vincent-hatakeyama commented Jul 3, 2025

I’ve done the test on 18. The value is migrated correctly.

Before:

template_odoo_18=# select * from fs_storage;
-[ RECORD 1 ]-----------+-------------------------------------
id                      | 1
create_uid              | 1
write_uid               | 2
name                    | Odoo Filesystem Backend
code                    | odoofs
check_connection_method | ls
server_env_defaults     | {"x_protocol_env_default": "odoofs"}
create_date             | 2025-07-02 08:53:43.386356
write_date              | 2025-07-02 09:07:24.933916

After migration:

template_odoo_18=# select * from fs_storage;
-[ RECORD 1 ]-------+------------------------------------------------------------------------------------
id                  | 1
create_uid          | 1
write_uid           | 2
name                | Odoo Filesystem Backend
code                | odoofs
server_env_defaults | {"x_protocol_env_default": "odoofs", "x_check_connection_method_env_default": "ls"}
create_date         | 2025-07-02 08:53:43.386356
write_date          | 2025-07-02 09:07:24.933916

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants