<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <!-- Inherit Form res.partner View to add account Type -->
        <record id="res_partner_data" model="ir.ui.view">
            <field name="name">res.partner.account.type</field>
            <field name="model">res.partner</field>
            <field name="inherit_id" ref="base.view_partner_form"/>
            <field name="arch" type="xml">
               <xpath expr="//div/h1" position="after">
                    <!-- Add your fields or attributes here -->
                   <group>
                        <!-- <field name="account_type" groups="odex_benefit.group_benefit_info"/> -->
                        <field name="code" groups="odex_benefit.group_benefit_info"/>
                        <field name="activation_mode" invisible="1"/>
                        <field name="user_type" invisible="1"/>
                   </group>
                </xpath>
                <xpath expr="//notebook" position="inside">
                    <page string="Account Type" id="account_type_page">
                        <group>
                            <group>
                                <field name="is_family" readonly="1"/>
                                <field name="is_sponsor_portal" readonly="1"/>
                                <field name="is_benefit" readonly="1"/>
                            </group>
                            <group>
                                <field name="is_vendor" readonly="1"/>
                                <field name="is_donor" readonly="1"/>
                            </group>
                        </group>
                    </page>
                </xpath>
            </field>
        </record>
        <record id="view_res_city_tree" model="ir.ui.view">
            <field name="name">Odex - City tree</field>
            <field name="model">res.country.city</field>
            <field name="arch" type="xml">
                <tree string="Cities">
                    <field name="code"/>
                    <field name="name"/>
                    <field name="state_id"/>
                    <field name="country_id"/>
                </tree>
            </field>
        </record>

        <record id="view_res_city_form" model="ir.ui.view">
            <field name="name">Odex - City form</field>
            <field name="model">res.country.city</field>
            <field name="arch" type="xml">
                <form string="City">
                    <sheet>
                        <group>
                            <group>
                                <field name="code" required="True"/>
                                <field name="state_id" domain="[('country_id', '=', country_id)]"
                                       required="True"/>

                            </group>
                            <group>
                                <field name="name" required="True"/>
                                <field name="country_id"/>
                            </group>
                        </group>
                    </sheet>
                </form>
            </field>
        </record>
    </data>
</odoo>
