golem/golem_family/views/golem_member_views.xml
Fabien BOURGEOIS 893bfcd79b [IMP][REF]GOLEM Family : enhancements
* Allow partner selection from family members tab ;
* Allow family linking from new sevrice user, without mandatory save ;
* Fix UI for family tab ;
* Create a family from sevrice user through button on header.
2018-08-01 18:20:10 +02:00

101 lines
3.9 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">
<header position="inside">
<button type="object" name="create_family" string="Create a new family"
attrs="{'invisible': ['|', ('id', '=', False), ('family_id', '!=', False)]}" />
</header>
<field name="lastname" position="before">
<field name="id" invisible="1" />
<field name="partner_id" invisible="1" required="0" />
<field name="family_id"
options="{'no_create': True}" />
<field name="family_role" />
</field>
<page name="membership" position="before">
<page string="Family"
attrs="{'invisible': ['|', ('id', '=', False), ('family_id', '=', False)]}">
<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 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" widget="many2many"
context="{'default_family_id': active_id}">
<tree delete="false" create="true" edit="true">
<field name="name" />
<field name="family_role" />
<field name="phone" />
<field name="mobile" />
<field name="email" widget="email" />
</tree>
</field>
</group>
</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>