2017-05-01 19:17:53 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<!--
|
2018-07-18 11:18:28 +02:00
|
|
|
Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
|
2018-10-26 13:06:31 +02:00
|
|
|
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
|
2017-05-01 19:17:53 +02:00
|
|
|
|
|
|
|
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">
|
2017-06-04 18:03:42 +02:00
|
|
|
<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>
|
2017-05-01 19:17:53 +02:00
|
|
|
<h1 position="after">
|
2018-08-01 10:43:59 +02:00
|
|
|
<field name="is_service_user" invisible="1" />
|
2017-05-01 19:17:53 +02:00
|
|
|
<label for="member_id"
|
2018-08-01 10:43:59 +02:00
|
|
|
attrs="{'invisible': ['|', ('is_company', '=', True), ('is_service_user', '=', False)]}" />
|
2017-06-20 16:38:24 +02:00
|
|
|
<field name="member_id" invisible="1" />
|
2018-08-01 10:43:59 +02:00
|
|
|
<button name="view_member" string="Go to service user form" type="object"
|
2017-06-20 16:38:24 +02:00
|
|
|
class="oe_link"
|
2017-05-01 19:17:53 +02:00
|
|
|
attrs="{'invisible': ['|', ('is_company', '=', True),
|
2018-08-01 10:43:59 +02:00
|
|
|
('is_service_user', '=', False)]}" />
|
2017-05-01 19:17:53 +02:00
|
|
|
<button type="object" name="create_golem_member"
|
2018-07-31 19:59:56 +02:00
|
|
|
string="Create a service user from this contact"
|
2017-05-01 19:17:53 +02:00
|
|
|
attrs="{'invisible': ['|', ('is_company', '=', True),
|
2018-08-01 10:43:59 +02:00
|
|
|
('is_service_user', '!=', False)]}" />
|
2017-05-01 19:17:53 +02:00
|
|
|
</h1>
|
2018-08-04 01:06:06 +02:00
|
|
|
<xpath expr="//div[@class='o_address_format'][1]/field[@name='street2']"
|
|
|
|
position="after">
|
|
|
|
<field name="area_id" placeholder="Area, quarter..."
|
|
|
|
options="{'no_create': true}" />
|
|
|
|
</xpath>
|
2017-05-01 19:17:53 +02:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-06-04 19:03:34 +02:00
|
|
|
<!-- 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">
|
2018-08-01 10:43:59 +02:00
|
|
|
<field name="is_service_user" />
|
2017-06-04 19:03:34 +02:00
|
|
|
</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;"
|
2018-08-01 10:43:59 +02:00
|
|
|
title="Is service user" t-if="!!record.is_service_user.raw_value" />
|
2017-06-04 19:03:34 +02:00
|
|
|
</xpath>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-05-01 19:17:53 +02:00
|
|
|
<!-- 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">
|
2018-08-01 10:43:59 +02:00
|
|
|
<field name="member_number"
|
|
|
|
attrs="{'invisible': [('member_number', '=', False)]}" />
|
2017-05-01 19:17:53 +02:00
|
|
|
</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" />
|
2018-11-01 16:20:38 +01:00
|
|
|
<field name="age" />
|
|
|
|
<field name="area_id" />
|
2017-05-01 19:17:53 +02:00
|
|
|
</field>
|
2018-07-20 17:04:23 +02:00
|
|
|
<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)]" />
|
2018-11-01 16:20:38 +01:00
|
|
|
<filter name="is_animator" string="Is Animator"
|
|
|
|
domain="[('animator_activity_ids', '!=', False)]" />
|
2018-07-20 17:04:23 +02:00
|
|
|
<separator />
|
|
|
|
</filter>
|
2017-05-01 19:17:53 +02:00
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2018-11-01 16:20:38 +01:00
|
|
|
<record model="ir.ui.view" id="l10n_fr_department_filter_inherit_golem_member">
|
|
|
|
<field name="name">Partner search adaptations</field>
|
|
|
|
<field name="model">res.partner</field>
|
|
|
|
<field name="inherit_id" ref="l10n_fr_department.view_res_partner_filter" />
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<filter name="department_groupby" position="before">
|
|
|
|
<filter name="group_area" string="By Area"
|
|
|
|
context="{'group_by': 'area_id'}" />
|
|
|
|
</filter>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-05-01 19:17:53 +02:00
|
|
|
</data>
|
|
|
|
</odoo>
|