GOLEM/golem_member_minor/views/golem_member_views.xml

69 lines
2.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 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>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_form_inherit_minor">
<field name="name">Add Minor Page/Tab</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<field name="pictures_agreement" position="replace" />
<page name="contact_details" position="after">
<page name="minor_page" string="Minor"
attrs="{'invisible': [('is_minor', '=', False)]}">
<group name="minor_group">
<field name="activities_participation"/>
<field name="partner_id" invisible="True" required="False" />
<field name="is_minor" invisible="True" />
<field name="legal_guardian_ids">
<tree name="legal_guardian_ids_tree">
<field name="name" />
<field name="contact_address" />
<field name="phone" />
<field name="mobile" />
<field name="email" widget="email" />
</tree>
</field>
</group>
</page>
</page>
</field>
</record>
<!-- Search -->
<record model="ir.ui.view" id="golem_member_search_inherit_minor">
<field name="name">Add Minor/Adult filters</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_search" />
<field name="arch" type="xml">
<filter name="season_default" position="after">
<filter name="filter_is_minor" string="Is minor"
domain="[('is_minor', '=', True)]"/>
<filter name="filter_is_adult" string="Is adult"
domain="[('is_minor', '!=', True)]"/>
</filter>
</field>
</record>
</data>
</odoo>