System parameters in Odoo 17 serve as a robust tool for configuring and controlling various aspects of your system's operation. They play a crucial role in managing settings related to user login, email configurations, regional preferences, and more. This guide will help you understand how to efficiently set up and utilize system parameters in Odoo 17.
In Odoo, system parameters are stored as key-value pairs within the ir.config_parameter model. They enable dynamic configuration, allowing adjustments without altering the core codebase.
Creating System Parameters in Odoo 17
System parameters can be added either via the user interface or by defining them within a custom module.
Creating via the User Interface
1. Activate Developer Mode
Go to Settings and enable Developer Mode (alternatively, append ?debug=1 to the URL).
2. Access System Parameters
Navigate to Settings > Technical > Parameters > System Parameters to access the system parameter settings.

3. To Create a New System Parameter
- Click NEW.
- Fill in:
- Key: A unique identifier for your specific parameter.
- Value: The configuration value is stored as a string.

Creating Through a Custom Module
To include parameters in your module's data, define them in an XML file as shown below:
<odoo>
<data noupdate="0">
<record id="your_parameter_id" model="ir.con
fig_parameter">
<field name="key">YourParameter</field>
<field name="value">Your Value</field>
</record>
</data>
</odoo>
This will create a new system parameter.
Using System Parameters in Odoo 17
System Parameters allow for flexible configuration of your Odoo instance without modifying code. Here’s how they’re commonly used:
- Centralized Configuration: Manage key settings from one place for easier control and visibility.
- No Code Changes Required: Adjust system behavior without modifying the source code.
- Secure Storage: Store sensitive information like API keys and secrets safely.
- Reusable Across Modules: Set once and use across multiple modules or environments.
Accessing Parameters in Python Code
You can use the get_param method to access the value of a parameter:
def get_system_parameter(self):
value = self.env['ir.config_parameter'].get_param(
'your_system_parameter_key')
return value
Note: get_param returns values as strings, so you may need to cast them to int, bool, or float.
Modifying Parameters in Python
Use set_param to create a new parameter or update an existing one:
def update_system_parameter(self):
new_value = 10
self.env['ir.config_parameter'].set_param('your_system_parameter_key',
new_value)
return False
Managing Multiple URLs
When your instance is reachable through several domains (such as example1.com and example2.com), the web.base.url may automatically change depending on the admin’s login.
To stabilize the URL:
- Make sure Odoo is accessed through one primary canonical domain.
- Set the following system parameter:
Key: web.base.url.freeze
Value: True
This prevents Odoo from changing web.base.url automat+ically.
Conclusion
In Odoo 17, system parameters offer a powerful method to tailor and optimize your setup. From defining default currency symbols and configuring email servers to implementing security rules, these settings allow you to manage everything without modifying the underlying code.
By utilizing the UI alongside the Python API, you can customize your Odoo instance to align more closely with your business requirements.
To read more about How to Set Up & Use System Parameters in Odoo 18, refer to our blog How to Set Up & Use System Parameters in Odoo 18.