l10n_ec_ote/views/res_partner.xml
<?xml version="1.0"?>
<odoo>
<data>
<record id="partner_form_view_ec" model="ir.ui.view">
<field name="name">OTE view_partner_form inherit</field>
<field name="model">res.partner</field>
<field name="priority">1000</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<!-- partner view -->
<field name='country_id' position="replace">
<field name="city" placeholder="City" class="o_address_city"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</field>
<field name="city" position="replace">
<field name="country_id" placeholder="Country" class="o_address_country"
options='{"no_open": True, "no_create": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</field>
<field name="state_id" position="replace">
<field name="state_id" placeholder="State" options='{"no_open": True}'
domain="[('country_id', '=', country_id)]"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
context="{'country_id': country_id, 'zip': zip}"/>
<field name="canton_id" placeholder="Canton"
domain="[('state_id', '=', state_id)]"
context="{'state_id': state_id}" options='{"no_open": True, "no_create": True}'/>
<field name="parish_id" class="o_address_state" placeholder="Parish"
domain="[('canton_id', '=', canton_id)]"
context="{'canton_id': canton_id}" options='{"no_open": True, "no_create": True}'/>
</field>
<!-- contact view -->
<xpath expr="//div[@name='div_address']" position="replace">
<div class="o_address_format" name="div_address">
<field name="street" placeholder="Street..." class="o_address_street"/>
<field name="street2" placeholder="Street 2..." class="o_address_street"/>
<field name="country_id" placeholder="Country" class="o_address_country"
options='{"no_open": True, "no_create": True}'/>
<field name="state_id" placeholder="State" options='{"no_open": True}'
domain="[('country_id', '=', country_id)]"
context="{'country_id': country_id, 'zip': zip}"/>
<field name="canton_id" placeholder="Canton"
domain="[('state_id', '=', state_id)]"
context="{'state_id': state_id}" options='{"no_open": True, "no_create": True}'/>
<field name="parish_id" class="o_address_state" placeholder="Parish"
domain="[('canton_id', '=', canton_id)]"
context="{'canton_id': canton_id}" options='{"no_open": True, "no_create": True}'/>
<field name="zip" placeholder="ZIP" class="o_address_zip"/>
<field name="city" placeholder="City" class="o_address_city"/>
</div>
</xpath>
</field>
</record>
<record id="partner_address_form_view_ec" model="ir.ui.view">
<field name="name">OTE view_partner_address_form inherit</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_address_form"/>
<field name="arch" type="xml">
<field name='country_id' position="replace">
<field name="city" placeholder="City" class="o_address_city"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</field>
<field name="city" position="replace">
<field name="country_id" placeholder="Country" class="o_address_country"
options='{"no_open": True, "no_create": True}'
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"/>
</field>
<field name="state_id" position="replace">
<field name="state_id" placeholder="State" options='{"no_open": True}'
domain="[('country_id', '=', country_id)]"
attrs="{'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}"
context="{'country_id': country_id, 'zip': zip}"/>
<field name="canton_id" placeholder="Canton"
domain="[('state_id', '=', state_id)]"
context="{'state_id': state_id}" options='{"no_open": True, "no_create": True}'/>
<field name="parish_id" class="o_address_state" placeholder="Parish"
domain="[('canton_id', '=', canton_id)]"
context="{'canton_id': canton_id}" options='{"no_open": True, "no_create": True}'/>
</field>
</field>
</record>
</data>
</odoo>