golem/golem_activity_registration/report/golem_activity_report_templ...

73 lines
2.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Youssef El Ouahby <youssef@yaltik.com>
Copyright 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>
<template id="golem_activity_report_template_inherited_golem_activity_registration"
inherit_id="golem_activity.golem_activity_report_template">
<xpath expr="//div[@id='page_report_activity']" position="inside">
<div class="col-xs-4 text-left" style="margin-top: 50px;" >
<h4 style="text-decoration: underline;">
Enroled members : <span t-field="activity.places_used" />
</h4>
</div>
<table class="table table-striped" id="members_table">
<thead>
<tr>
<th class="col-xs-3"><i class="fa fa-user" /> Name</th>
<th class="col-xs-3"><i class="fa fa-phone" /> Phone</th>
<th class="col-xs-3"><i class="fa fa-envelope" /> Email</th>
<th class="col-xs-3"><i class="fa fa-university" />City</th>
</tr>
</thead>
<tbody>
<tr id="activity_registration_line"
t-foreach="activity.activity_registration_ids" t-as="reg">
<td class="col-xs-3">
<span t-field="reg.member_id.name" />
</td>
<td class="col-xs-3">
<t t-set="two_phones" t-value="reg.member_id.phone and reg.member_id.mobile" />
<t t-if="reg.member_id.phone">
<t t-if="two_phones">
Landline :
</t>
<span t-field="reg.member_id.phone" />
</t>
<t t-if="reg.member_id.mobile">
<t t-if="two_phones">
<br />Mobile :
</t>
<span t-field="reg.member_id.mobile" />
</t>
</td>
<td class="col-xs-3">
<span t-field="reg.member_id.email" />
</td>
<td class="col-xs-3">
<span t-field="reg.member_id.city" />
</td>
</tr>
</tbody>
</table>
</xpath>
</template>
</odoo>