Skip to content

Conversation

@rven
Copy link

@rven rven commented Jun 23, 2025

When a system parameter doesn't exist on the production environment, the parameter is created with the environment value that is defined on the production system.

When this DB is exported to a local or other environment, where the environment value is NOT defined on the system, the DB uses the one that has been saved in the production DB.
It is totally unnecessary to store them in the DB, because the get_param function always gets them from the environment, when defined.
Also when you define them in a data file with following values:

    <record model="ir.config_parameter" id="ir_config_parameter_test">
        <field name="key">test</field>
        <field name="value">PLACEHOLDER</field>
    </record>

and the key is defined in the environment that one will also be used to create the system parameter, instead of the one defined in the data file.

There is logic in place that protects server environment defined fields from being updated at all, see #227

There is no need at all to store these values in the DB!

Everything also works fine when the system parameter is not defined at all.
It will not appear in the list view of the system parameters, but is viewable with the "Server Environment" action.

@rven rven force-pushed the 18.0-fix_server_env_get_param branch from 95d0cff to aa4738f Compare June 23, 2025 09:49
@github-actions
Copy link

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 26, 2025
@sbidoul sbidoul removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Oct 26, 2025
@rven
Copy link
Author

rven commented Oct 27, 2025

no stale

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.

2 participants