golem/golem_member/views/res_partner_views.xml

108 lines
4.5 KiB
XML
Raw Normal View History

<?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>
<!-- Forms -->
<record model="ir.ui.view" id="res_partner_form_inherit_golem_member">
<field name="name">Add information on linked member or member creation into main form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form" />
<field name="arch" type="xml">
<div name="button_box" position="before">
<div colspan="2"
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Contact form</div>
</div>
<h1 position="after">
<field name="is_service_user" invisible="1" />
<label for="member_id"
attrs="{'invisible': ['|', ('is_company', '=', True), ('is_service_user', '=', False)]}" />
<field name="member_id" invisible="1" />
<button name="view_member" string="Go to service user form" type="object"
class="oe_link"
attrs="{'invisible': ['|', ('is_company', '=', True),
('is_service_user', '=', False)]}" />
<button type="object" name="create_golem_member"
string="Create a service user from this contact"
attrs="{'invisible': ['|', ('is_company', '=', True),
('is_service_user', '!=', False)]}" />
</h1>
</field>
</record>
<!-- Kanban -->
<record model="ir.ui.view" id="res_partner_kanban_inherit_golem_member">
<field name="name">Partner Kanban adaptations</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.res_partner_kanban_view" />
<field name="arch" type="xml">
<field name="type" position="after">
<field name="is_service_user" />
</field>
<xpath expr="//div[@class='oe_kanban_global_click o_res_partner_kanban']"
position="inside">
<hr style="clear: both; background-color: #ecffe2; height: 10%; margin: 2% 0 0 0;"
title="Is service user" t-if="!!record.is_service_user.raw_value" />
</xpath>
</field>
</record>
<!-- Trees -->
<record model="ir.ui.view" id="res_partner_tree_inherit_golem_member">
<field name="name">Add member number to tree</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_tree" />
<field name="arch" type="xml">
<field name="display_name" position="before">
<field name="member_number"
attrs="{'invisible': [('member_number', '=', False)]}" />
</field>
</field>
</record>
<!-- Searches -->
<record model="ir.ui.view" id="res_partner_search_inherit_golem_member">
<field name="name">Partner GOLEM Member Number search</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter" />
<field name="arch" type="xml">
<field name="name" position="after">
<field name="member_number" />
</field>
<filter name="filter_my_partners" position="before">
<filter name="is_subscriber" string="Is Subscriber"
domain="[('membership_state', '!=', 'none')]" />
<filter name="has_contributed" string="Has contributed"
domain="[('membership_state', 'in', ['invoiced', 'paid'])]" />
<filter name="old_member" string="Is Old Member"
domain="[('membership_state', 'in', ['old', 'cancel'])]" />
<filter name="is_free_member" string="Is Free Member"
domain="[('free_member', '=', True)]" />
<separator />
<filter name="is_service_user" string="Is Service User"
domain="[('member_id', '!=', False)]" />
<separator />
</filter>
</field>
</record>
</data>
</odoo>