GOLEM/golem_activity_registration.../report/golem_member_report.xml

123 lines
4.6 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2017 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>
2018-02-19 16:22:29 +01:00
<template id="activity" inherit_id="golem_member.report_golem_member_template">
2018-02-20 11:44:48 +01:00
<xpath expr="//th[@id='activity_inherit_th']" position="after">
<th>State</th>
<th>Price</th>
</xpath>
<xpath expr="//td[@id='activity_inherit_td']" position="after">
2018-02-22 18:08:38 +01:00
<td class="col-xs-2">
2018-02-20 11:44:48 +01:00
<span t-field="t.state" />
</td>
2018-02-22 18:08:38 +01:00
<td class="col-xs-2">
2018-02-20 11:44:48 +01:00
<span t-field="t.activity_price" t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</xpath>
<xpath expr="//tr[@id='activity_inherit_price_sum']" position="before">
<t t-set="price_sum" t-value="0"/>
</xpath>
2018-02-22 12:23:13 +01:00
<xpath expr="//tr[@id='activity_inherit_price_sum']" position="inside">
2018-02-20 11:44:48 +01:00
<t t-set="price_sum" t-value="price_sum + t.activity_price"/>
</xpath>
2018-02-21 15:52:10 +01:00
<xpath expr="//tr[@id='activity_inherit_total']" position="replace">
<tfoot>
<tr>
<td><td><td><td><td><td><td>
2018-02-27 11:54:33 +01:00
<td>
<strong>
TOTAL
</strong>
</td>
<td>
<t t-esc="price_sum"
t-esc-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
2018-02-21 15:52:10 +01:00
</td>
2018-02-26 11:14:57 +01:00
</td></td></td></td></td></td></td>
</tr>
</tfoot>
2018-02-20 11:44:48 +01:00
</xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table table-striped">
2018-02-21 15:52:10 +01:00
<thead>
<strong>Invoices</strong>
<tr>
<th>Activity</th>
2018-02-22 18:08:38 +01:00
<th>Date</th>
2018-02-21 15:52:10 +01:00
<th>State</th>
2018-02-22 18:08:38 +01:00
<th>Amount</th>
2018-02-20 11:44:48 +01:00
</tr>
2018-02-21 15:52:10 +01:00
</thead>
<tbody>
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
2018-02-22 18:08:38 +01:00
<td class="col-xs-3">
2018-02-21 15:52:10 +01:00
<spam t-field="l.invoice_line_id.product_id" />
</td>
2018-02-22 18:08:38 +01:00
<td class="col-xs-3">
<spam t-field="l.invoice_id.date_invoice" />
2018-02-21 15:52:10 +01:00
</td>
2018-02-22 18:08:38 +01:00
<td class="col-xs-3">
2018-02-21 15:52:10 +01:00
<spam t-field="l.invoice_id.state" />
</td>
2018-02-22 18:08:38 +01:00
<td class="col-xs-3">
<spam t-field="l.invoice_line_id.price_subtotal"
2018-02-21 15:52:10 +01:00
t-field-options="{'widget': 'monetary',
'display_currency': o.currency_id}"/>
</td>
</tr>
</t>
</tbody>
</table>
<table class="table table-striped" >
2018-02-27 11:54:33 +01:00
<thead>
<strong>Payments</strong>
<tr>
2018-02-27 11:54:33 +01:00
<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">
<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>
2018-02-27 11:54:33 +01:00
</p>
</td>
</tr>
</t>
</tbody>
</table>
2018-02-20 11:44:48 +01:00
</xpath>
</template>
</odoo>