title: How Odoo store `res.config.settings`? It looks it saved but not presented in `res.config.settings` and `ir.config_parameter`
body: <p><a href="https://www.odoo.com/forum/help-1/question/12-0-enable-features-in-the-res-config-settings-149566" rel="nofollow noreferrer">https://www.odoo.com/forum/help-1/question/12-0-enable-features-in-the-res-config-settings-149566</a></p>
  
  <p>I have created my setting data file as the followings mentioned by <code>Alexander</code> inside the page above:</p>
  
  <p><code>res_config_data.xml</code></p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;odoo&gt;
      &lt;record id="my_config_settings" model="res.config.settings"&gt;
          &lt;field name="company_id" ref="base.main_company"/&gt;
          &lt;field name="group_multi_currency" eval="True"/&gt;
          &lt;field name="group_product_variant" eval="True"/&gt;
          &lt;field name="group_stock_multi_warehouses" eval="True"/&gt;
          &lt;field name="group_stock_multi_locations" eval="True"/&gt;
          &lt;!-- Delivery Packages --&gt;
          &lt;field name="group_stock_tracking_lot" eval="True" /&gt;
          &lt;field name="module_stock_picking_batch" eval="True" /&gt;
          &lt;!-- Display Lots &amp; Serial Numbers: Lots &amp; Serial numbers will appear on the delivery slip --&gt;
          &lt;field name="group_lot_on_delivery_slip" eval="True" /&gt;
          &lt;!-- Multi-Step Routes: Use your own routes and putaway strategies --&gt;
          &lt;field name="group_stock_adv_location" eval="True" /&gt;
          &lt;field name="po_order_approval" eval="True" /&gt;
          &lt;!-- Quantities billed by vendors --&gt;
          &lt;field name="default_purchase_method"&gt;purchase&lt;/field&gt;
          &lt;field name="multi_sales_price" eval="True" /&gt;
          &lt;!-- Multiple prices per product --&gt;
          &lt;field name="multi_sales_price_method"&gt;percentage&lt;/field&gt;
          &lt;field name="group_analytic_tags" eval="True" /&gt;
          &lt;field name="group_analytic_accounting" eval="True" /&gt;
          &lt;!-- Set specific billing and shipping addresses --&gt;
          &lt;field name="group_sale_delivery_address" eval="True" /&gt;
          &lt;!-- Consignment --&gt;
          &lt;field name="group_stock_tracking_owner" eval="True" /&gt;
          &lt;!-- Prepayment --&gt;
          &lt;field name="prepayment_account_id" ref="my_chart_of_account.my_account_prepayments" /&gt;
          &lt;!-- Multi-company--&gt;
          &lt;field name="group_multi_company" eval="False" /&gt;
      &lt;/record&gt;
      &lt;function model="res.config.settings" name="execute"&gt;
          &lt;value model="res.config.settings"
                 search="[('id', '=', ref('my_config_settings'))]"/&gt;
      &lt;/function&gt;
  &lt;/odoo&gt;
  </code></pre>
  
  <hr>
  
  <p><code>__manifest__.py</code></p>
  
  <pre><code>    'data': [
          'data/res_config_data.xml',
       ],
  </code></pre>
  
  <p>It works if I apply it once only. But when I try to reinstall this setting module, it will not work.</p>
  
  <hr>
  
  <p>It somehow fails to recognize what fields are the supported.</p>
  
  <pre><code>2020-06-11 02:26:48,117 52288 WARNING odoo_dev odoo.models: res.config.settings.create() with unknown fields: company_id, default_purchase_method, group_analytic_accounting, group_analytic_tags, group_lot_on_delivery_slip, group_multi_company, group_multi_currency, group_product_variant, group_sale_delivery_address, group_stock_adv_location, group_stock_multi_locations, group_stock_multi_warehouses, group_stock_tracking_lot, group_stock_tracking_owner, module_stock_picking_batch, multi_sales_price, multi_sales_price_method, po_order_approval, prepayment_account_id 
  </code></pre>
  
  <p>Odoo discarded these unrecognized fields and insert the plain object into DB</p>
  
  <pre><code>2020-06-11 02:26:48,118 52288 ERROR odoo_dev odoo.sql_db: bad query: b'INSERT INTO "res_config_settings" ("id", "create_uid", "create_date", "write_uid", "write_date") VALUES (nextval(\'res_config_settings_id_seq\'), 1, (now() at time zone \'UTC\'), 1, (now() at time zone \'UTC\')) RETURNING id'
  ERROR: null value in column "company_id" violates not-null constraint
  DETAIL:  Failing row contains (10, 1, 2020-06-11 02:26:47.302998, 1, 2020-06-11 02:26:47.302998, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).
  </code></pre>
  
  <pre><code>psycopg2.IntegrityError: null value in column "company_id" violates not-null constraint
  DETAIL:  Failing row contains (10, 1, 2020-06-11 02:26:47.302998, 1, 2020-06-11 02:26:47.302998, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null).
  </code></pre>
  
  <hr>
  
  <p>When I installed this setting module with a brand new Odoo database, and I go to general setting page, I can see the settings are installed. But when I check <code>res.config.settings</code> and <code>ir.config_parameter</code> tables, I don't see any settings record stored. I want to understand how this setting data file being proceeded and stored in where.</p>