golem/golem_member/views/report_golem_member.xml

104 lines
4.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2018 Fabien Bourgeois <fabien@yaltik.com>
Copyright 2018 Michel Dessenne <michel@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>
<report id="golem_member_report_pdf" string="Golem member report [PDF]"
model="golem.member" report_type="qweb-pdf"
name="golem_member.golem_member_card_template" />
<report id="golem_member_report_html" string="Golem member report [HTML]"
model="golem.member" report_type="qweb-html"
name="golem_member.golem_member_card_template" />
<template id="golem_member_card_template">
<t t-call="report.html_container">
<t t-call="report.external_layout">
<div id='page_report_member' class="page">
<t t-foreach="docs" t-as="o">
<div class="row" style="margin: 3% 0 3% 0;">
<div class="col-xs-8">
<h2><span t-field="o.name" /> - <span t-field="o.number" /></h2>
</div>
<div class="col-xs-4">
<strong>Season :</strong>
<span t-field="o.season_ids[0].name" />
<br />
<strong>Date :</strong>
<span t-field="o.season_ids[0].date_start" />
-
<span t-field="o.season_ids[0].date_end" />
</div>
</div>
</t>
<p><strong>Activities</strong> for this season</p>
<table id="table_activity_ref" class="table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Animator</th>
<th>Day</th>
<th>Hour start</th>
<th>Hour stop</th>
<th>Date start</th>
<th id="activity_inherit_th">Date stop</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr id="activity_inherit_price_sum" t-foreach="o.activity_registration_ids" t-as="t">
<td class="col-xs-2">
<span t-esc="t.activity_id.name" />
</td>
<td class="col-xs-2">
<span t-esc="t.activity_id.type_id.name" />
</td>
<td class="col-xs-2">
<span t-field="t.activity_id.animator_id" />
</td>
<td class="col-xs-2">
<span t-field="t.activity_id.weekday" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(t.activity_id.hour_start), round(t.activity_id.hour_start % 1 * 60))" />
</td>
<td class="col-xs-1">
<t t-esc="'%02d:%02d' % (int(t.activity_id.hour_stop), round(t.activity_id.hour_stop % 1 * 60))" />
</td>
<td class="col-xs-2">
<span t-if="t.activity_id.is_fullseason" t-field="o.season_ids[0].date_start" />
<span t-else="" t-field="t.activity_id.date_start" />
</td>
<td id="activity_inherit_td">
<span t-if="t.activity_id.is_fullseason" t-field="o.season_ids[0].date_end" />
<span t-else="" t-field="t.activity_id.date_stop" />
</td>
</tr>
<tr id="activity_inherit_total"></tr>
</t>
</tbody>
</table>
</div>
</t>
</t>
</template>
</odoo>