GOLEM/golem_member/views/golem_partner_area_views.xml

87 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<odoo>
<data>
<!-- Tree -->
<record model="ir.ui.view" id="golem_partner_area_view_tree">
<field name="name">GOLEM Partner Area Tree</field>
<field name="model">golem.partner.area</field>
<field name="arch" type="xml">
<tree>
<field name="sequence" widget="handle" />
<field name="name" />
<field name="parent_id"/>
</tree>
</field>
</record>
<!-- Form -->
<record model="ir.ui.view" id="golem_partner_area_view_form">
<field name="name">GOLEM Partner Area Form</field>
<field name="model">golem.partner.area</field>
<field name="arch" type="xml">
<form>
<group>
<group>
<field name="name"/>
<field name="area_street_ids">
<tree editable="bottom">
<field name="name"/>
</tree>
</field>
</group>
<group>
<field name="parent_id"/>
<field name="sub_territorie_ids" widget="many2many_tags"/>
</group>
</group>
</form>
</field>
</record>
<!-- Search -->
<record id="golem_partner_area_view_search" model="ir.ui.view">
<field name="name">GOLEM Partner Area Search</field>
<field name="model">golem.partner.area</field>
<field name="arch" type="xml">
<search>
<field name="name"/>
<field name="parent_id"/>
<filter name="sub_territories" string="Sub Territories"
domain="[('parent_id', '!=', False)]"/>
<filter name="parent_territories" string="Parent Territories"
domain="[('sub_territorie_ids', '!=', False)]"/>
</search>
</field>
</record>
<!-- Actions -->
<act_window id="golem_partner_area_action"
name="Areas" res_model="golem.partner.area"
view_mode="tree,form" />
<!-- Menus -->
<menuitem id="golem_partner_area_menu" name="Areas"
parent="golem_membership.menu_config_association" sequence="20"
action="golem_partner_area_action" />
</data>
</odoo>