mirror of
https://gitlab.com/flectra-community/partner-contact.git
synced 2024-11-15 10:42:06 +00:00
79 lines
2.7 KiB
XML
79 lines
2.7 KiB
XML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<flectra>
|
||
|
|
||
|
<record model="ir.ui.view" id="better_zip_form">
|
||
|
<field name="name">res.better.zip.form</field>
|
||
|
<field name="model">res.better.zip</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<form string="City">
|
||
|
<group col="4">
|
||
|
<group>
|
||
|
<field name="name"/>
|
||
|
<field name="city_id"
|
||
|
attrs="{'invisible': [('enforce_cities', '=', False)],'required': [('enforce_cities', '=', True)]}"/>
|
||
|
<field name="city"
|
||
|
attrs="{'invisible': [('enforce_cities', '=', True)]}"/>
|
||
|
<field name="country_id"/>
|
||
|
<field name="enforce_cities" invisible="1"/>
|
||
|
</group>
|
||
|
<group>
|
||
|
<field name="code"/>
|
||
|
<field name="state_id"
|
||
|
attrs="{'invisible': [('enforce_cities', '=', True)]}"/>
|
||
|
</group>
|
||
|
</group>
|
||
|
</form>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record model="ir.ui.view" id="better_zip_tree">
|
||
|
<field name="name">res.better.zip.tree</field>
|
||
|
<field name="model">res.better.zip</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<tree string="Cities">
|
||
|
<field name="name"/>
|
||
|
<field name="code"/>
|
||
|
<field name="city"/>
|
||
|
<field name="state_id"/>
|
||
|
<field name="country_id"/>
|
||
|
</tree>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="view_better_zip_filter" model="ir.ui.view">
|
||
|
<field name="name">res.better.zip.select</field>
|
||
|
<field name="model">res.better.zip</field>
|
||
|
<field name="arch" type="xml">
|
||
|
<search string="Search city">
|
||
|
<field name="name"/>
|
||
|
<field name="code"/>
|
||
|
<field name="city"/>
|
||
|
<field name="state_id"/>
|
||
|
<field name="country_id"/>
|
||
|
</search>
|
||
|
</field>
|
||
|
</record>
|
||
|
|
||
|
<record id="action_zip_tree" model="ir.actions.act_window">
|
||
|
<field name="name">Locations</field>
|
||
|
<field name="res_model">res.better.zip</field>
|
||
|
<field name="view_mode">tree,form</field>
|
||
|
<field ref="better_zip_tree" name="view_id"/>
|
||
|
<field name="search_view_id" ref="view_better_zip_filter"/>
|
||
|
</record>
|
||
|
|
||
|
<menuitem
|
||
|
name="Locations Management"
|
||
|
id="locations_root_menu"
|
||
|
parent="base.menu_custom"
|
||
|
/>
|
||
|
|
||
|
<menuitem
|
||
|
name="Locations"
|
||
|
id="locations_menu"
|
||
|
parent="locations_root_menu"
|
||
|
action="action_zip_tree"
|
||
|
/>
|
||
|
|
||
|
</flectra>
|