[TMP] Report golem_member and golem_membership PDF style ok

This commit is contained in:
michel 2018-02-27 10:05:14 +01:00
parent e2fe375869
commit f02a2eb912
3 changed files with 68 additions and 58 deletions

View File

@ -60,9 +60,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table">
<table class="table table-striped">
<thead>
<strong>Invoices</strong>
<br></br>
<tr>
<th>Activity</th>
<th>Date</th>
@ -91,33 +92,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</t>
</tbody>
</table>
<table class="table table-striped">
<thead>
<strong>Payments</strong>
<tr>
<th>Invoice number</th>
<th>State</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<tr>
<td class="col-xs-6">
<spam t-field="l.invoice_id.number" />
</td>
<td class="col-xs-6">
<p t-foreach = "l.invoice_id.payment_ids" t-as = "i" >
<t t-if = "i.state not in ['draft']">
<span t-esc = "i.state" />
</t>
</p>
</td>
</tr>
<table class="table table-striped" >
<thead>
<strong>Payments</strong>
<br></br>
<tr>
<th>Invoice number</th>
<th>State</th>
</tr>
</t>
</tbody>
</table>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<tr>
<td class="col-xs-6">
<spam t-field="l.invoice_id.number" />
</td>
<td class="col-xs-6">
<p t-foreach="l.invoice_id.payment_ids" t-as = "i" >
<t t-if="i.state not in ['draft']">
<span t-esc="i.state" />
</t>
</p>
</td>
</tr>
</tr>
</t>
</tbody>
</table>
</xpath>
</template>

View File

@ -22,17 +22,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<record id="paperformat_euro_landscape"
model="report.paperformat">
<field name="name">European A4 Landscape</field>
<field name="name">European A4 Portrait</field>
<field name="default" eval="True" />
<field name="format">A4</field>
<field name="page_height">0</field>
<field name="page_width">0</field>
<field name="orientation">Landscape</field>
<field name="orientation">Portrait</field>
<field name="margin_top">40</field>
<field name="margin_bottom">23</field>
<field name="margin_left">7</field>
<field name="margin_right">7</field>
<field name="header_line" eval="False" />
<field name="header_line" eval="True" />
<field name="header_spacing">35</field>
<field name="dpi">90</field>
</record>
@ -40,7 +40,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<report id="golem_member_report"
string="Golem member report"
model="golem.member"
report_type="qweb-html"
report_type="qweb-pdf"
name="golem_member.report_golem_member_template" />
<template id="report_golem_member_template">
@ -68,6 +68,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<span t-field="o.season_ids[0].date_start" />
-
<span t-field="o.season_ids[0].date_end" />
<br></br>
<br></br>
</div>
</div>
</t>
@ -75,6 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<table id="table_activity_ref" class="table table-striped">
<thead>
<strong>Activity</strong>
<br></br>
<tr>
<th>Name</th>
<th>Animator</th>

View File

@ -22,35 +22,40 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<template id="membership" inherit_id="golem_member.report_golem_member_template">
<xpath expr="//div[@id='page_report_member']" position="after">
<div class="page">
<table class="table">
<thead>
<strong>Membership</strong>
<tr>
<th>Season</th>
<th>Date</th>
<th>State</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<t t-call="report.external_layout">
<div class="page">
<table class="table table-striped">
<thead>
<strong>Membership</strong>
<tr>
<td class="col-xs-4">
<spam t-field="o.member_lines.date" />
</td>
<td class="col-xs-4">
<spam t-field="o.member_lines.membership_id" />
</td>
<td class="col-xs-4">
<spam t-field="o.member_lines.state" />
</td>
<th>Season date</th>
<th>Registration</th>
<th>Registration type</th>
<th>State</th>
</tr>
</t>
</tbody>
</table>
</div>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr>
<td class="col-xs-3">
<spam t-field="o.membership_start" />
<spam t-field="o.membership_stop" />
</td>
<td class="col-xs-3">
<spam t-field="o.member_lines.date" />
</td>
<td class="col-xs-3">
<spam t-field="o.member_lines.membership_id" />
</td>
<td class="col-xs-3">
<spam t-field="o.membership_state" />
</td>
</tr>
</t>
</tbody>
</table>
</div>
</t>
</xpath>
</template>