There is a special model in Odoo for specifying configuration/system parameters. The technical name is ir.config_parameter
. You can simply create one of these parameters in an xml file as a record.
Below is an example:
<record id="google_maps_view_api_key" model="ir.config_parameter">
<field name="key">google_maps_view_api_key</field>
<field name="value">my value here</field>
</record>
You can access the above parameter in code with the following:
self.env['ir.config_parameter'].get_param('google_maps_view_api_key')
It works on a key, value pair methodology. The key is the parameter, value is the value of that parameter.
Alternatively, if you'd like to create them manually through the Odoo front end, you can navigate to "Settings -> Technical -> System Parameters" and create the record there.