GOLEM/golem_family/views/golem_member_views.xml

105 lines
4.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017-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>
<!-- Form -->
<record model="ir.ui.view" id="golem_member_form_inherit_golem_family">
<field name="name">Member form adaptations</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_form" />
<field name="arch" type="xml">
<field name="lastname" position="before">
<field name="id" invisible="1" />
<field name="partner_id" invisible="1" required="0" />
<p class="oe_grey" colspan="2"
attrs="{'invisible': [('id', '!=', False)]}">
Please save new member before assigning a family.
</p>
<field name="family_id"
attrs="{'readonly': [('id', '=', False)]}"
context="{'default_member_ids': [(4, partner_id, False)]}" />
<field name="family_role"
attrs="{'readonly': [('id', '=', False)]}" />
</field>
<page name="other_page" position="before">
<page string="Family"
attrs="{'invisible': [('family_id', '=', False)]}">
<group>
<group string="Address">
<group>
<field name="family_street" placeholder="Street..." />
<field name="family_street2" />
<field name="family_zip" placeholder="ZIP" />
<field name="family_city" placeholder="City" />
</group>
<group>
<field name="family_state_id" class="oe_no_button"
placeholder="State" />
<field name="family_country_id" placeholder="Country"
class="oe_no_button" />
</group>
</group>
</group>
<group>
<group string="Communication">
<group>
<field name="family_phone" placeholder="0000000000"
widget="phonefr" />
<field name="family_mobile" placeholder="0000000000"
widget="phonefr" />
</group>
<group>
<field name="family_email" widget="email"
placeholder="name@example.org" />
<field name="family_website" widget="url"
placeholder="e.g. www.odoo.com"/>
</group>
</group>
</group>
<field name="family_member_ids"
context="{'default_family_id': active_id}">
<tree delete="false">
<field name="name" />
<field name="family_role" />
<field name="phone" />
<field name="mobile" />
<field name="email" widget="email" />
</tree>
</field>
</page>
</page>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="golem_member_search_inherit_golem_family">
<field name="name">GOLEM Member search adaptations</field>
<field name="model">golem.member</field>
<field name="inherit_id" ref="golem_member.golem_member_search" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="family_id" />
</field>
</field>
</record>
</data>
</odoo>