This question has been flagged
1 Reply
3308 Views

The dialog is accessible from 'Customers/ state field / create and edit...

It shows 3 fields. What's the name of this xml file and how can i access it?

Avatar
Discard
Author

Kindly help please

Best Answer

In Customer window, the field 'state_id' depicts State and 'country_id' as Country. And these fields corresponds to objects 'res.country.state' and 'res.country' that are defined in BASE module.

        <record id="view_country_state_tree" model="ir.ui.view">
            <field name="name">res.country.state.tree</field>
            <field name="model">res.country.state</field>
            <field name="arch" type="xml">
                <tree string="State">
                    <field name="name"/>
                    <field name="code"/>
                    <field name="country_id"/>
                </tree>
            </field>
        </record>

        <record id="view_country_state_form" model="ir.ui.view">
            <field name="name">res.country.state.form</field>
            <field name="model">res.country.state</field>
            <field name="arch" type="xml">
                <form string="State" version="7.0">
                    <group>
                        <field name="name"/>
                        <field name="code"/>
                        <field name="country_id" options='{"no_open": True}'/>
                    </group>
                </form>
            </field>
        </record>

To make changes in Web-interface:
       - Enable Technical settings in user window.
       - Go to Settings --> Technical --> User Interface --> Views and search for your respective form name

Avatar
Discard
Author

Thank you.