[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 40 additions and 32 deletions
Showing only changes of commit 0228a3535b - Show all commits

View File

@ -21,38 +21,46 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<odoo>
<template id="activity" inherit_id="golem_member.report_golem_member_template">
<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">
<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">
<td>
<span t-field="t.state" />
</td>
<td>
<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>
<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>
</tr>
</xpath>
<xpath expr="//table[@id='table_activity_ref']" position="after">
<table class="table table-striped">
<t t-foreach="docs" t-as="o">
<tr t-foreach="o.activity_registration_ids" t-as="l">
<td>
<span t-field="t.state" />
<spam t-field="l.invoice_id.number" />
</td>
<td>
<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>
<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>
</tr>
</xpath>
</tr>
</t>
</table>
</xpath>
</template>
</odoo>

View File

@ -79,7 +79,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</tr>
</t>
</table>
<table class="table table-striped">
<table id="table_activity_ref" class="table table-striped">
<tr>
<th>Activity</th>
<th>Animator</th>
@ -114,7 +114,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</td>
<tr id="activity_inherit_sum"></tr>
</tr>
<tfoot style="text-align:right" id="activity_inherit_total"></tfoot>
<tfoot id="activity_inherit_total"></tfoot>
</t>
</table>