[TMP] Report Golem_member #9

Manually merged
fabien merged 15 commits from michel/GOLEM:michel_qweb_adherents into master 2018-03-08 16:19:22 +01:00
2 changed files with 93 additions and 46 deletions
Showing only changes of commit d5af8e87f6 - Show all commits

View File

@ -26,10 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Price</th>
</xpath>
<xpath expr="//td[@id='activity_inherit_td']" position="after">
<td>
<td class="col-xs-6">
<span t-field="t.state" />
</td>
<td>
<td class="col-xs-6">
<span t-field="t.activity_price" t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
@ -40,45 +40,85 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<xpath expr="//tr[@id='activity_inherit_sum']" position="inside">
<t t-set="price_sum" t-value="price_sum + t.activity_price"/>
</xpath>
<xpath expr="//tfoot[@id='activity_inherit_total']" position="inside">
<tr>
<td>
<strong>TOTAL=<t t-esc="price_sum"
t-esc-options="{'widget': 'monetary',
'display_currency': o.currency_id}" /></strong>
</td>
<xpath expr="//tr[@id='activity_inherit_total']" position="replace">
<tfoot>
<tr>
<td><td><td><td><td><td><td>
<td class="col-xs-6">
<strong>
TOTAL
</strong>
</td>
<td class="col-xs-6">
<t t-esc="price_sum"
t-esc-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</td></td></td></td></td></td></td>
</tr>
</tfoot>
</xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table table-striped">
<thead><h1>Invoices</h1></thead>
<tr>
<th>Date</th>
<th>Number</th>
<th>Activity</th>
<th>Amount</th>
<th>State</th>
</tr>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<td>
<spam t-field="l.invoice_id.date_invoice" />
</td>
<td>
<spam t-field="l.invoice_id.number" />
</td>
<td>
<spam t-field="l.invoice_line_id.product_id" />
</td>
<td>
<spam t-field="l.invoice_id.amount_total" />
</td>
<td>
<spam t-field="l.invoice_id.state" />
</td>
<thead>
<strong>Invoices</strong>
<tr>
<th>Date</th>
<th>Number</th>
<th>Activity</th>
<th>Amount</th>
<th>State</th>
<th>Residual</th>
</tr>
</t>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<td class="col-xs-6">
<spam t-field="l.invoice_id.date_invoice" />
</td>
<td class="col-xs-6">
<spam t-field="l.invoice_id[0].number" />
</td>
<td class="col-xs-6">
<spam t-field="l.invoice_line_id.product_id" />
</td>
<td class="col-xs-6">
<spam t-field="l.invoice_id.amount_total"
t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
<td class="col-xs-6">
<spam t-field="l.invoice_id.state" />
</td>
<td class="col-xs-6">
<span t-field="l.invoice_id.residual"
t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</tr>
</t>
</tbody>
</table>
<table class="table table-striped">
<thead>
<tr>
<th>payment</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.payment_ids" t-as="l">
<tr>
<td>
<spam t-field="l.name" />
</td>
</tr>
</tr>
</t>
</tbody>
</table>
</xpath>
</template>

View File

@ -42,32 +42,34 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
model="golem.member"
report_type="qweb-html"
name="golem_member.report_golem_member_template" />
<!-- A la Fin remplacer qweb-html par report_type="qweb-pdf" -->
<template id="report_golem_member_template">
<t t-call="report.html_container">
<t t-call="report.external_layout">
<div class="page">
<table class="table table-striped">
<thead>
<tr>
<th>Member</th>
<th>Season</th>
<th>Date of season</th>
</tr>
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr>
<td class="col-xs-6">
<strong><span t-field="o.name" /></strong><br></br>
<span t-field="o.street" /><br></br>
<strong><span t-field="o.name" /></strong><br></br>
<span t-field="o.street" /><br></br>
<t t-if="o.street2">
<span t-field="o.street2" /><br></br>
</t>
<span t-field="o.zip" /><br></br>
<span t-field="o.city" /><br></br>
<span t-field="o.zip" /><br></br>
<span t-field="o.city" /><br></br>
<t t-if="o.state_id">
<span t-field="o.state_id" /><br></br>
</t>
<span t-field="o.country_id" /><br></br>
<span t-field="o.country_id" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="o.season_ids[0].name" /><br></br>
@ -78,10 +80,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</td>
</tr>
</t>
</tbody>
</table>
<table id="table_activity_ref" class="table table-striped">
<thead>
<strong>Activity</strong>
<tr>
<th>Activity</th>
<th>Name</th>
<th>Animator</th>
<th>Day</th>
<th>Hour start</th>
@ -89,10 +94,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<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-6">
<span t-esc="t.activity_id.name" /><br></br>
<span t-esc="t.activity_id.name" /><br></br>
</td>
<td class="col-xs-6">
<span t-field="t.activity_id.animator_id" /><br></br>
@ -109,14 +116,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<td class="col-xs-6">
<span t-field="t.activity_id.date_start" /><br></br>
</td>
<td id="activity_inherit_td" class="col-xs-6">
<td id="activity_inherit_td">
<span t-field="t.activity_id.date_stop" /><br></br>
</td>
<tr id="activity_inherit_sum"></tr>
</tr>
<tfoot id="activity_inherit_total"></tfoot>
<tr id="activity_inherit_total"></tr>
</t>
</tbody>
</table>
</div>
</t>