2016-06-25 18:06:40 +02:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
|
|
|
|
<!--
|
2018-07-17 12:34:40 +02:00
|
|
|
Copyright 2017-2018 Fabien Bourgeois <fabien@yaltik.com>
|
2016-06-25 18:06:40 +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/>.
|
|
|
|
-->
|
|
|
|
|
2017-04-29 09:16:41 +02:00
|
|
|
<odoo>
|
2016-06-25 18:06:40 +02:00
|
|
|
<data>
|
2018-07-20 11:19:08 +02:00
|
|
|
|
|
|
|
<!-- Actions -->
|
2018-07-20 16:23:56 +02:00
|
|
|
<act_window id="golem_member_action" name="Subscribers"
|
|
|
|
res_model="res.partner" view_mode="kanban,tree,form,graph"
|
2018-08-21 11:08:57 +02:00
|
|
|
domain="[('membership_state', 'not in', ['none', 'canceled'])]" />
|
2018-07-20 16:23:56 +02:00
|
|
|
<act_window id="golem_member_user_action" name="Service Users"
|
|
|
|
res_model="golem.member" view_mode="kanban,tree,form,graph" />
|
2018-07-20 11:19:08 +02:00
|
|
|
<act_window id="res_partner_category_action" name="GOLEM Members Tags"
|
|
|
|
res_model="res.partner.category" view_mode="tree,form" />
|
|
|
|
<record id="golem_membership_invoice_action" model="ir.actions.act_window">
|
|
|
|
<field name="name">Join Membership</field>
|
|
|
|
<field name="res_model">golem.membership.invoice</field>
|
|
|
|
<field name="src_model">golem.member</field>
|
|
|
|
<field name="view_type">form</field>
|
|
|
|
<field name="view_mode">tree,form</field>
|
|
|
|
<field name="view_id" ref="golem_membership.golem_membership_invoice_form"/>
|
|
|
|
<field name="target">new</field>
|
|
|
|
</record>
|
|
|
|
|
2016-06-25 18:06:40 +02:00
|
|
|
<!-- Forms -->
|
2017-05-01 19:17:53 +02:00
|
|
|
<record id="golem_member_form" model="ir.ui.view">
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="name">GOLEM Member Form</field>
|
|
|
|
<field name="model">golem.member</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form>
|
2018-08-01 12:13:22 +02:00
|
|
|
<header></header>
|
2016-06-25 18:06:40 +02:00
|
|
|
<sheet>
|
2018-07-31 19:59:56 +02:00
|
|
|
<div colspan="2" attrs="{'invisible': [('membership_state', '=', 'none')]}"
|
|
|
|
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Service User form</div>
|
|
|
|
<div colspan="2" attrs="{'invisible': [('membership_state', '!=', 'none')]}"
|
2017-06-04 18:03:42 +02:00
|
|
|
style="background-color: #ccc; color: #fff; font-size: 150%; font-weight: bold; padding: 0.5%; text-align: center; margin-bottom: 1%;">Member form</div>
|
2016-06-26 08:51:09 +02:00
|
|
|
<group>
|
|
|
|
<div class="oe_title">
|
|
|
|
<h1>
|
2017-06-05 08:37:16 +02:00
|
|
|
<field name="image" widget="image" class="oe_left oe_avatar"
|
2016-06-26 08:51:09 +02:00
|
|
|
options="{'preview_image': 'image_medium', 'size': [90, 90]}" />
|
2017-06-05 08:46:41 +02:00
|
|
|
<field name="number_name" class="oe_inline" readonly="True"
|
|
|
|
style="margin-left: 2%" />
|
2016-06-26 08:51:09 +02:00
|
|
|
</h1>
|
|
|
|
</div>
|
2016-07-11 20:14:11 +02:00
|
|
|
<div class="oe_right oe_button_box" name="buttons" />
|
2016-07-07 17:16:43 +02:00
|
|
|
<group>
|
2018-08-27 12:24:00 +02:00
|
|
|
<field name="season_ids" widget="many2many_tags"
|
|
|
|
options="{'no_create': True}" />
|
2016-07-11 20:14:11 +02:00
|
|
|
<field name="category_id" widget="many2many_tags"
|
|
|
|
placeholder="Tags..."/>
|
2016-07-07 17:16:43 +02:00
|
|
|
</group>
|
2016-06-26 08:51:09 +02:00
|
|
|
</group>
|
2016-06-25 18:06:40 +02:00
|
|
|
<group string="Personal details">
|
|
|
|
<group>
|
2016-07-08 16:12:12 +02:00
|
|
|
<field name="is_number_manual" invisible="True" />
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="lastname" required="True" />
|
|
|
|
<field name="firstname" required="True" />
|
2016-07-08 16:12:12 +02:00
|
|
|
<field name="number" readonly="True"
|
2018-07-20 12:02:53 +02:00
|
|
|
attrs="{'invisible': ['|', ('membership_state', '=', 'none'), ('is_number_manual', '=', True)]}" />
|
2016-07-08 16:12:12 +02:00
|
|
|
<field name="number_manual"
|
2018-07-20 12:02:53 +02:00
|
|
|
attrs="{'invisible': ['|', ('membership_state', '=', 'none'), ('is_number_manual', '=', False)],
|
|
|
|
'required': [('is_number_manual', '=', True), ('membership_state', '!=', 'none')]}" />
|
2016-06-25 18:06:40 +02:00
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="gender" />
|
|
|
|
<field name="birthdate_date" />
|
|
|
|
<field name="nationality_id" />
|
|
|
|
<field name="function" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<notebook>
|
|
|
|
<page name="contact_details" string="Contact details">
|
|
|
|
<group string="Address">
|
|
|
|
<group>
|
|
|
|
<field name="street" placeholder="Street..." />
|
|
|
|
<field name="street2" />
|
2018-08-04 01:06:06 +02:00
|
|
|
<field name="area_id" placeholder="Area, quarter..."
|
|
|
|
options="{'no_create': true}" />
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="zip" placeholder="ZIP" />
|
|
|
|
<field name="city" placeholder="City" />
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="state_id" class="oe_no_button"
|
|
|
|
placeholder="State" />
|
|
|
|
<field name="country_id" placeholder="Country"
|
|
|
|
class="oe_no_button" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<group string="Communication">
|
|
|
|
<group>
|
|
|
|
<field name="phone" placeholder="0000000000"
|
|
|
|
widget="phonefr" />
|
|
|
|
<field name="mobile" placeholder="0000000000"
|
|
|
|
widget="phonefr" />
|
2017-06-05 10:30:02 +02:00
|
|
|
<field name="opt_out_sms" />
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="email" widget="email"
|
|
|
|
placeholder="name@example.org" />
|
2016-08-02 11:48:14 +02:00
|
|
|
<label for="opt_out" string="Out of mailings?" />
|
|
|
|
<field name="opt_out" nolabel="1" />
|
2017-06-05 10:30:02 +02:00
|
|
|
</group>
|
|
|
|
<group>
|
2018-07-17 09:01:36 +02:00
|
|
|
<field name="electronic_processing_agreement"/>
|
|
|
|
<field name="pictures_agreement"/>
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="website" widget="url"
|
|
|
|
placeholder="e.g. www.odoo.com"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</page>
|
2018-07-20 11:19:08 +02:00
|
|
|
<page name="membership" string="Membership">
|
|
|
|
<group>
|
|
|
|
<group>
|
|
|
|
<field name="free_member"/>
|
|
|
|
<label for="membership_state"/>
|
|
|
|
<div>
|
|
|
|
<field name="partner_id" invisible="True" required="False" />
|
|
|
|
<field name="membership_state"/>
|
|
|
|
<button name="%(golem_membership_invoice_action)d"
|
|
|
|
type="action" string="Buy Membership"
|
|
|
|
attrs="{'invisible':[('free_member','=',True)]}"
|
|
|
|
context="{'default_partner_id': partner_id}"
|
|
|
|
class="oe_link"/>
|
|
|
|
</div>
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="membership_start"
|
|
|
|
attrs="{'invisible':[('membership_start','=',False)]}"/>
|
|
|
|
<field name="membership_stop"
|
|
|
|
attrs="{'invisible':[('membership_stop','=',False)]}"/>
|
|
|
|
<field name="membership_cancel"
|
|
|
|
attrs="{'invisible':[('membership_cancel','=',False)]}"/>
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
<field name="member_lines" nolabel="1" colspan="4" readonly="1">
|
|
|
|
<tree string="Memberships">
|
|
|
|
<field name="date"/>
|
|
|
|
<field name="membership_id"/>
|
|
|
|
<field name="member_price"/>
|
|
|
|
<field name="account_invoice_id"/>
|
|
|
|
<field name="state"/>
|
|
|
|
</tree>
|
|
|
|
<form string="Memberships">
|
|
|
|
<group>
|
|
|
|
<field name="date"/>
|
|
|
|
<field name="member_price"/>
|
|
|
|
<field name="membership_id"/>
|
|
|
|
<field name="account_invoice_id"
|
|
|
|
context="{'form_view_ref': 'account.invoice_form'}"/>
|
|
|
|
<field name="state" colspan="4"/>
|
|
|
|
</group>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</page>
|
2016-06-25 18:06:40 +02:00
|
|
|
<page name="other_page" string="Others">
|
|
|
|
<group>
|
|
|
|
<field name="comment" placeholder="Put an internal note..." />
|
|
|
|
</group>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</sheet>
|
|
|
|
<div class="oe_chatter">
|
|
|
|
<field name="message_follower_ids" widget="mail_followers" />
|
|
|
|
<field name="message_ids" widget="mail_thread" />
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2017-05-01 19:17:53 +02:00
|
|
|
<!-- Kanban -->
|
|
|
|
<record model="ir.ui.view" id="golem_member_kanban">
|
|
|
|
<field name="name">GOLEM Member Kanban view</field>
|
|
|
|
<field name="model">golem.member</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<kanban>
|
2017-06-04 18:14:17 +02:00
|
|
|
<field name="is_company" />
|
|
|
|
<field name="image" />
|
2017-05-01 19:17:53 +02:00
|
|
|
<field name="color" />
|
|
|
|
<field name="display_name" />
|
|
|
|
<field name="title" />
|
|
|
|
<field name="email" />
|
|
|
|
<field name="phone" />
|
|
|
|
<field name="mobile" />
|
|
|
|
<field name="city" />
|
|
|
|
<field name="country_id" />
|
|
|
|
<field name="number" />
|
|
|
|
<field name="season_ids" />
|
|
|
|
<field name="category_id"/>
|
|
|
|
<templates>
|
|
|
|
<t t-name="kanban-box">
|
|
|
|
<div class="oe_kanban_vignette oe_semantic_html_override">
|
2017-06-04 18:14:17 +02:00
|
|
|
<div class="o_kanban_image">
|
|
|
|
<img t-if="record.image.raw_value"
|
|
|
|
t-att-src="'data:image/png;base64,'+ record.image.raw_value"/>
|
|
|
|
<t t-if="!record.image.raw_value">
|
|
|
|
<img t-if="record.is_company.raw_value === true"
|
|
|
|
t-att-src='_s + "/base/static/src/img/company_image.png"'/>
|
|
|
|
<img t-if="record.is_company.raw_value === false"
|
|
|
|
t-att-src='_s + "/base/static/src/img/avatar.png"'/>
|
|
|
|
</t>
|
|
|
|
</div>
|
2017-05-01 19:17:53 +02:00
|
|
|
<div class="oe_kanban_details">
|
|
|
|
<h4 class="oe_partner_heading">
|
|
|
|
<a type="open"><field name="display_name" /></a>
|
2018-07-20 12:02:53 +02:00
|
|
|
<t t-if="record.number.raw_value != ''">(N° <field name="number" />)</t>
|
2017-05-01 19:17:53 +02:00
|
|
|
</h4>
|
|
|
|
<div class="oe_kanban_partner_categories" />
|
|
|
|
<div class="oe_kanban_partner_links" />
|
|
|
|
<field name="season_ids" />
|
|
|
|
<ul>
|
|
|
|
<li t-if="record.city.raw_value and !record.country_id.raw_value">
|
|
|
|
<field name="city" />
|
|
|
|
</li>
|
|
|
|
<li t-if="!record.city.raw_value and record.country_id.raw_value">
|
|
|
|
<field name="country_id" />
|
|
|
|
</li>
|
|
|
|
<li t-if="record.city.raw_value and record.country_id.raw_value">
|
|
|
|
<field name="city" />, <field name="country_id" />
|
|
|
|
</li>
|
|
|
|
<li t-if="record.phone.raw_value or record.mobile.raw_value">
|
|
|
|
<a t-attf-href="tel:#{record.phone.raw_value}">
|
|
|
|
<field name="phone" />
|
|
|
|
</a>
|
|
|
|
<a t-attf-href="tel:#{record.mobile.raw_value}">
|
|
|
|
<field name="mobile" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<li t-if="record.email.raw_value">
|
|
|
|
<a t-attf-href="mailto:#{record.email.raw_value}">
|
|
|
|
<field name="email" />
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</t>
|
|
|
|
</templates>
|
|
|
|
</kanban>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
2016-06-25 18:06:40 +02:00
|
|
|
<!-- Trees -->
|
2017-05-01 19:17:53 +02:00
|
|
|
<record model="ir.ui.view" id="golem_member_tree">
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="name">GOLEM Member Tree/List</field>
|
|
|
|
<field name="model">golem.member</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<tree string="GOLEM Members">
|
2016-07-22 07:29:16 +02:00
|
|
|
<field name="season_ids" options="{'no_create': True}" />
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="number" />
|
|
|
|
<field name="name" />
|
|
|
|
<field name="contact_address" />
|
|
|
|
<field name="phone" />
|
|
|
|
<field name="mobile" />
|
|
|
|
<field name="email" widget="email" />
|
|
|
|
</tree>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Searches -->
|
2017-05-01 19:17:53 +02:00
|
|
|
<record id="golem_member_search" model="ir.ui.view">
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="name">GOLEM Member Filters</field>
|
|
|
|
<field name="model">golem.member</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<search>
|
2016-06-25 21:16:35 +02:00
|
|
|
<field name="number" />
|
|
|
|
<field name="name" />
|
2016-07-07 17:16:43 +02:00
|
|
|
<field name="season_ids" widget="many2one" />
|
2018-08-27 11:21:52 +02:00
|
|
|
<field name="area_id" />
|
2016-06-25 21:16:35 +02:00
|
|
|
<field name="contact_address" />
|
|
|
|
<field name="city" />
|
|
|
|
<field name="phone" />
|
|
|
|
<field name="mobile" />
|
|
|
|
<field name="email" />
|
2016-06-26 06:34:08 +02:00
|
|
|
<field name="category_id" widget="many2one" />
|
2016-07-07 17:16:43 +02:00
|
|
|
<filter name="season_default" string="Default season"
|
2018-07-20 10:09:24 +02:00
|
|
|
domain="[('is_default', '=', True)]" />
|
2018-07-20 11:19:08 +02:00
|
|
|
<separator />
|
2018-07-20 17:04:23 +02:00
|
|
|
<filter name="is_subscriber" string="Is Subscriber"
|
|
|
|
domain="[('membership_state', '!=', 'none')]" />
|
|
|
|
<filter name="is_service_user_only" string="Is Service User Only"
|
|
|
|
domain="[('membership_state', '=', 'none')]" />
|
2016-06-25 18:36:43 +02:00
|
|
|
<group string="Group By">
|
2016-06-27 22:23:41 +02:00
|
|
|
<filter name="group_age" string="By age"
|
|
|
|
context="{'group_by': 'is_minor'}"/>
|
|
|
|
<filter name="group_gender" string="By gender"
|
|
|
|
context="{'group_by': 'gender'}"/>
|
2018-08-27 11:21:52 +02:00
|
|
|
<filter name="group_area" string="By area"
|
|
|
|
context="{'group_by': 'area_id'}"/>
|
2016-06-25 18:36:43 +02:00
|
|
|
<filter name="group_city" string="By city"
|
|
|
|
context="{'group_by': 'city'}"/>
|
|
|
|
</group>
|
2016-06-25 18:06:40 +02:00
|
|
|
</search>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Graphs -->
|
2017-05-01 19:17:53 +02:00
|
|
|
<record model="ir.ui.view" id="golem_member_graph">
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="name">GOLEM Member Graph</field>
|
|
|
|
<field name="model">golem.member</field>
|
|
|
|
<field name="arch" type="xml">
|
2018-08-04 01:06:06 +02:00
|
|
|
<graph string="Service Users" type="pivot">
|
2016-06-25 18:06:40 +02:00
|
|
|
<field name="partner_id" />
|
|
|
|
</graph>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
|
|
|
|
<!-- Menu items -->
|
2017-06-05 17:30:30 +02:00
|
|
|
<!-- Add new menu items -->
|
2018-07-20 16:23:56 +02:00
|
|
|
<menuitem id="golem_member_user_menu" name="Service users"
|
|
|
|
parent="golem_membership.menu_association" sequence="5"
|
|
|
|
action="golem_member_user_action" groups="golem_base.group_golem_user" />
|
|
|
|
<menuitem id="golem_members_menu" name="Subscribers"
|
|
|
|
parent="golem_membership.menu_association" sequence="10"
|
2017-05-01 19:17:53 +02:00
|
|
|
action="golem_member_action" groups="golem_base.group_golem_user" />
|
2018-03-27 15:58:54 +02:00
|
|
|
<menuitem id="golem_member_tool_menu" name="Tools"
|
2018-07-20 16:23:56 +02:00
|
|
|
parent="golem_membership.menu_association" sequence="80"
|
2018-03-27 15:58:54 +02:00
|
|
|
groups="golem_base.group_golem_user" />
|
2018-08-04 01:06:06 +02:00
|
|
|
<menuitem id="res_partner_category_menu" name="Service User Tags"
|
2018-07-20 16:23:56 +02:00
|
|
|
parent="golem_membership.menu_config_association" sequence="15"
|
2017-05-01 19:17:53 +02:00
|
|
|
action="res_partner_category_action"
|
|
|
|
groups="golem_base.group_golem_manager" />
|
2016-06-25 18:06:40 +02:00
|
|
|
</data>
|
2017-04-29 09:16:41 +02:00
|
|
|
</odoo>
|