[TMP] Report Golem_member #9
@ -20,22 +20,103 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
<odoo>
|
||||
|
||||
<report id="golem_activity_registration_report"
|
||||
string="golem_activity_registration report"
|
||||
model="golem.activity_registration"
|
||||
report_type="qweb-html"
|
||||
name="golem_activity.report_golem_member_template" />
|
||||
|
||||
<template id="activity" inherit_id="golem_member.report_golem_member_template">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<table>
|
||||
<tr t-foreach="o.member_id" t-as="t">
|
||||
<xpath expr="//strong" position="replace">
|
||||
<span t-field="t.name" />
|
||||
</xpath>
|
||||
</tr>
|
||||
<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 class="col-xs-2">
|
||||
<span t-field="t.state" />
|
||||
</td>
|
||||
<td class="col-xs-2">
|
||||
<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_price_sum']" position="inside">
|
||||
<t t-set="price_sum" t-value="price_sum + t.activity_price"/>
|
||||
</xpath>
|
||||
<xpath expr="//tr[@id='activity_inherit_total']" position="replace">
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td><td><td><td><td><td><td>
|
||||
<td>
|
||||
<strong>
|
||||
TOTAL
|
||||
</strong>
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
<strong>Invoices</strong>
|
||||
<tr>
|
||||
<th>Activity</th>
|
||||
<th>Date</th>
|
||||
<th>State</th>
|
||||
<th>Amount</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-3">
|
||||
<spam t-field="l.invoice_line_id.product_id" />
|
||||
</td>
|
||||
<td class="col-xs-3">
|
||||
<spam t-field="l.invoice_id.date_invoice" />
|
||||
</td>
|
||||
<td class="col-xs-3">
|
||||
<spam t-field="l.invoice_id.state" />
|
||||
</td>
|
||||
<td class="col-xs-3">
|
||||
<spam t-field="l.invoice_line_id.price_subtotal"
|
||||
t-field-options="{'widget': 'monetary',
|
||||
'display_currency': o.currency_id}"/>
|
||||
</td>
|
||||
</tr>
|
||||
</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">
|
||||
<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>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</t>
|
||||
</xpath>
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
|
@ -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,85 +40,84 @@ 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" />
|
||||
<!-- 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">
|
||||
<div id='page_report_member' class="page">
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<div class="oe_structure"/>
|
||||
<div class="row">
|
||||
<div class="col-xs-4">
|
||||
<strong>Member</strong>
|
||||
<div t-field="o.partner_id"
|
||||
t-options='{"widget": "contact", "fields":
|
||||
["address", "name", "street", "street2", "phone", "fax"],
|
||||
"no_marker": True, "phone_icons": True}'/>
|
||||
</div>
|
||||
<div class="oe_structure"/>
|
||||
<div class="col-xs-4">
|
||||
<strong>Season :</strong>
|
||||
<span t-field="o.season_ids[0].name" />
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<strong>Date :</strong>
|
||||
<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>
|
||||
<table id="table_activity_ref" class="table table-striped">
|
||||
<thead>
|
||||
<strong>Activity</strong>
|
||||
<br></br>
|
||||
<tr>
|
||||
<th>Member</th>
|
||||
<th>Season</th>
|
||||
<th>Date of season</th>
|
||||
</tr>
|
||||
<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>
|
||||
<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>
|
||||
<t t-if="o.state_id">
|
||||
<span t-field="o.state_id" /><br></br>
|
||||
</t>
|
||||
<span t-field="o.country_id" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<span t-field="o.season_ids[0].name" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<span t-field="o.season_ids[0].date_start" /><br></br>
|
||||
<span t-field="o.season_ids[0].date_end" /><br></br>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</table>
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<th>Activity</th>
|
||||
<th>Name</th>
|
||||
<th>Animator</th>
|
||||
<th>Day</th>
|
||||
<th>Hour start</th>
|
||||
<th>Hour stop</th>
|
||||
<th>Date start</th>
|
||||
<th>Date stop</th>
|
||||
<th id="activity_inherit_th">Date stop</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-foreach="docs" t-as="o">
|
||||
<tr t-foreach="o.activity_registration_ids" t-as="t">
|
||||
<td class="col-xs-6">
|
||||
<span t-esc="t.activity_id.name" /><br></br>
|
||||
<tr id="activity_inherit_price_sum" t-foreach="o.activity_registration_ids" t-as="t">
|
||||
<td class="col-xs-2">
|
||||
<span t-esc="t.activity_id.name" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td class="col-xs-2">
|
||||
<span t-field="t.activity_id.animator_id" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td class="col-xs-2">
|
||||
<span t-field="t.activity_id.weekday" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td class="col-xs-2">
|
||||
<span t-field="t.activity_id.hour_start" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td class="col-xs-2">
|
||||
<span t-field="t.activity_id.hour_stop" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td class="col-xs-2">
|
||||
<span t-field="t.activity_id.date_start" /><br></br>
|
||||
</td>
|
||||
<td class="col-xs-6">
|
||||
<td id="activity_inherit_td">
|
||||
<span t-field="t.activity_id.date_stop" /><br></br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr id="activity_inherit_total"></tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</t>
|
||||
</t>
|
||||
</template>
|
||||
|
||||
|
||||
</odoo>
|
||||
|
@ -26,5 +26,6 @@
|
||||
'installable': True,
|
||||
'depends': ['golem_member', 'account', 'decimal_precision'],
|
||||
'data': ['views/golem_membership_invoice.xml',
|
||||
'views/golem_member_view.xml']
|
||||
'views/golem_member_view.xml',
|
||||
'report/golem_member_report.xml']
|
||||
}
|
||||
|
19
golem_membership/report/__init__.py
Normal file
19
golem_membership/report/__init__.py
Normal file
@ -0,0 +1,19 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Copyright 2016 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/>.
|
||||
|
||||
from . import golem_membership
|
63
golem_membership/report/golem_member_report.xml
Normal file
63
golem_membership/report/golem_member_report.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?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>
|
||||
|
||||
<template id="membership" inherit_id="golem_member.report_golem_member_template">
|
||||
<xpath expr="//div[@id='page_report_member']" position="after">
|
||||
<t t-call="report.external_layout">
|
||||
<div class="page">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<strong>Membership</strong>
|
||||
<tr>
|
||||
<th>Season date</th>
|
||||
<th>Registration</th>
|
||||
<th>Registration type</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
</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>
|
||||
|
||||
</odoo>
|
Loading…
Reference in New Issue
Block a user