This commit is contained in:
michel 2018-02-21 15:52:10 +01:00
parent d2d752992c
commit d5af8e87f6
2 changed files with 93 additions and 46 deletions

View File

@ -26,10 +26,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<th>Price</th> <th>Price</th>
</xpath> </xpath>
<xpath expr="//td[@id='activity_inherit_td']" position="after"> <xpath expr="//td[@id='activity_inherit_td']" position="after">
<td> <td class="col-xs-6">
<span t-field="t.state" /> <span t-field="t.state" />
</td> </td>
<td> <td class="col-xs-6">
<span t-field="t.activity_price" t-field-options="{'widget': 'monetary', <span t-field="t.activity_price" t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/> 'display_currency': o.currency_id}"/>
</td> </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"> <xpath expr="//tr[@id='activity_inherit_sum']" position="inside">
<t t-set="price_sum" t-value="price_sum + t.activity_price"/> <t t-set="price_sum" t-value="price_sum + t.activity_price"/>
</xpath> </xpath>
<xpath expr="//tfoot[@id='activity_inherit_total']" position="inside"> <xpath expr="//tr[@id='activity_inherit_total']" position="replace">
<tr> <tfoot>
<td> <tr>
<strong>TOTAL=<t t-esc="price_sum" <td><td><td><td><td><td><td>
t-esc-options="{'widget': 'monetary', <td class="col-xs-6">
'display_currency': o.currency_id}" /></strong> <strong>
</td> 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> </tr>
</tfoot>
</xpath> </xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after"> <xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table table-striped"> <table class="table table-striped">
<thead><h1>Invoices</h1></thead> <thead>
<tr> <strong>Invoices</strong>
<th>Date</th> <tr>
<th>Number</th> <th>Date</th>
<th>Activity</th> <th>Number</th>
<th>Amount</th> <th>Activity</th>
<th>State</th> <th>Amount</th>
</tr> <th>State</th>
<t t-foreach="docs" t-as="o"> <th>Residual</th>
<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>
</tr> </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> </table>
</xpath> </xpath>
</template> </template>

View File

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