0

I am trying to inherit res.settings.config view of account module and add some custom fields.

Here is what I did:

*.xml

        <record id="res_config_settings_view_form" model="ir.ui.view">
        <field name="name">res.config.settings.view.form.commission.journal</field>
        <field name="model">res.config.settings</field>

        <field name="inherit_id" ref="account.res_config_settings_view_form" />
        <field name="arch" type="xml">
        <!--                <xpath expr="//div[hasclass('settings')]" position="inside">-->
        <!--                    <div class="app_settings_block" data-string="Invoicing" string="Invoicing" data-key="account" groups="account.group_account_manager">-->
            <div data-key="account" position="inside">
                      <h2>Wallet Journal Settings</h2>
                    <!-- <div class="row mt16 o_settings_container" id="o_res_settings"> -->
                    <div class="row mt16 o_settings_container" id="default_journal_and_coa_config" name="default_journal_and_coa_config">
                        <div class="col-12 col-lg-6 o_setting_box" id="default_journal_coa">
                            <div class="o_setting_right_pane">
                                <div>
                                    <div class="text-muted">
                                       Wallet Journal
                                    </div>
                                    <div class="content-group mt16">
                                         <field name="wallet_journal_id"  colspan="4"/>

                                    </div>
                                       <div class="text-muted">
                                       Franchise Commssion
                                    </div>
                                    <div class="content-group mt16">
                                        <field name="commision_account_id"  colspan="4"/>
                                    </div>
                                    <div class="text-muted">
                                       Expense to Bofast
                                    </div>
                                    <div class="content-group mt16">
                                        <field name="bofast_expense_account_id"  colspan="4"/>
                                    </div>


                                </div>
                            </div>
                        </div>
                    </div>

        </div>

        </field>
        </record>

There is no error or warning, but showing nothing in the accounts section or anywhere.

NOTE: I also added new settings section with a new menu item and action after the above-mentioned code in the same file. it's working fine.

How can I resolve this?

KbiR
  • 4,047
  • 6
  • 37
  • 103
  • I tried your code above, and it works as expected. A new section appears at the bottom of the `Invoicing` config page. There is no issue with the code – Kenly Jun 29 '22 at 14:38

1 Answers1

0

Try this xpath, have seen this used in oca modules

<xpath expr="//div[@data-key='account']" position="inside">
NinjaBat
  • 370
  • 4
  • 20