<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="res_config_settings_view_form" model="ir.ui.view">
            <field name="name">res.config.settings.view.form.inherit.inter.company.rules</field>
            <field name="model">res.config.settings</field>
            <field name="inherit_id" ref="base_setup.res_config_settings_view_form"/>
            <field name="arch" type="xml">
                <xpath expr="//div[@id='inter_companies_rules']" position='replace'>
                     <div class="mt16">
                        <div class="content-group" name="module_odex30_account_inter_company_rules_company_id" >
                            <div class="row">
                                <field name="intercompany_generate_bills_refund" class="oe_inline o_light_label"/>
                                <label string="Generate Bills and Refunds" for="intercompany_generate_bills_refund" class="col-lg-6 o_light_label"/>
                            </div>
                        </div>
                        <div class="content-group" name="module_inter_company_rules_set_so_po"
                             >
                            <div class="row ml16">
                                <label for="intercompany_user_id" class="col-4 col-lg-5 o_light_label"/>
                                <field name="intercompany_user_id" options="{'no_create_edit': True}"/>

                                <label for="intercompany_purchase_journal_id" class="col-4 col-lg-5 o_light_label" invisible="not intercompany_generate_bills_refund"/>
                                <field name="intercompany_purchase_journal_id" options="{'no_create_edit': True}" invisible="not intercompany_generate_bills_refund" required="intercompany_generate_bills_refund"/>

                                <label for="intercompany_document_state" class="col-4 col-lg-5 o_light_label"/>
                                <field name="intercompany_document_state" widget="radio"/>
                            </div>
                        </div>
                    </div>
                </xpath>
            </field>
        </record>
    </data>
</odoo>
