forked from Yaltik/golem
[REF]GOLEM Activity report : template code refactoring
This commit is contained in:
parent
5175f03f4f
commit
3171e3c42d
@ -44,71 +44,87 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12 bg-info" style="margin-top: 40px;" >
|
<div class="col-xs-12" style="margin-top: 40px;" >
|
||||||
<div class="col-xs-4" id="activity_info_left"><h4>General Information</h4></div>
|
<div class="col-xs-4" id="activity_info_left">
|
||||||
<div class="col-xs-4" id="activity_info_middle"><h4>Type</h4></div>
|
<h4 style="font-weight: bold;">General Information</h4>
|
||||||
<div class="col-xs-4" id="activity_info_right"><h4>Session</h4></div>
|
</div>
|
||||||
|
<div class="col-xs-4" id="activity_info_middle">
|
||||||
|
<h4 style="font-weight: bold;">Type</h4>
|
||||||
|
</div>
|
||||||
|
<div class="col-xs-4" id="activity_info_right">
|
||||||
|
<h4 style="font-weight: bold;">Session</h4>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="activity_info" class="col-xs-12" >
|
<div id="activity_info" class="col-xs-12" >
|
||||||
<div class="col-xs-4" id="activity_info_left">
|
<div class="col-xs-4" id="activity_info_left">
|
||||||
<t t-if="activity.season_id">
|
<div t-if="activity.season_id">
|
||||||
<div><b>Season : </b><span t-field="activity.season_id"/></div>
|
<strong>Season : </strong>>
|
||||||
</t>
|
<span t-field="activity.season_id"/>
|
||||||
<t t-if="activity.animator_id">
|
</div>
|
||||||
<div><b>Animator : </b><span t-field="activity.animator_id"/></div>
|
<div t-if="activity.animator_id">
|
||||||
</t>
|
<strong>Animator : </strong>>
|
||||||
<t t-if="activity.list_price">
|
<span t-field="activity.animator_id"/>
|
||||||
<div><b>Price : </b><span t-field="activity.list_price"/></div>
|
</div>
|
||||||
</t>
|
<div t-if="activity.list_price">
|
||||||
<t t-if="activity.default_code">
|
<strong>Price : </strong>>
|
||||||
<div><b>Reference : </b><span t-field="activity.default_code"/></div>
|
<span t-field="activity.list_price"/>
|
||||||
</t>
|
</div>
|
||||||
|
<div t-if="activity.default_code">
|
||||||
|
<strong>Reference : </strong>>
|
||||||
|
<span t-field="activity.default_code"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4" id="activity_info_middle">
|
<div class="col-xs-4" id="activity_info_middle">
|
||||||
<t t-if="activity.type_id">
|
<div t-if="activity.type_id">
|
||||||
<div><b>Type : </b><span t-field="activity.type_id"/></div>
|
<strong>Type : </strong><span t-field="activity.type_id"/>
|
||||||
</t>
|
</div>
|
||||||
<t t-if="activity.categ_id">
|
<div t-if="activity.categ_id">
|
||||||
<div><b>Category : </b><span t-field="activity.categ_id"/></div>
|
<strong>Category : </strong><span t-field="activity.categ_id"/>
|
||||||
</t>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-4" id="activity_info_right">
|
<div class="col-xs-4" id="activity_info_right">
|
||||||
<t t-if="activity.places">
|
<div t-if="activity.places">
|
||||||
<div><b>Places : </b><span t-field="activity.places"/></div>
|
<strong>Places : </strong><span t-field="activity.places"/>
|
||||||
</t>
|
</div>
|
||||||
<t t-if="activity.is_recurrent">
|
<t t-if="activity.is_recurrent">
|
||||||
<div><b>Is Recurrent : </b><span t-field="activity.is_recurrent"/></div>
|
<div>
|
||||||
|
<strong>Is Recurrent : </strong>
|
||||||
|
<span t-field="activity.is_recurrent"/>
|
||||||
|
</div>
|
||||||
<t t-if="activity.is_fullseason">
|
<t t-if="activity.is_fullseason">
|
||||||
<div><b>Is Full Season : </b><span t-field="activity.is_fullseason"/></div>
|
<div><strong>Is Full Season : </strong>
|
||||||
<t t-if="activity.weekday">
|
<span t-field="activity.is_fullseason"/></div>
|
||||||
<div><b>Weekday : </b><span t-field="activity.weekday"/></div>
|
<div t-if="activity.weekday">
|
||||||
</t>
|
<strong>Weekday : </strong>
|
||||||
</t>
|
<span t-field="activity.weekday"/>
|
||||||
<t t-else="">
|
|
||||||
<t t-if="activity.date_start">
|
|
||||||
<div><b>Date Start : </b><span t-field="activity.date_start"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.date_stop">
|
|
||||||
<div><b>Date Stop : </b><span t-field="activity.date_stop"/></div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.hour_start">
|
|
||||||
<div><b>Start Hour : </b>
|
|
||||||
<t t-esc="'%02d:%02d' % (int(activity.hour_start), round(activity.hour_start % 1 * 60))" />
|
|
||||||
</div>
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-if="activity.hour_stop">
|
<t t-else="">
|
||||||
<div><b>Stop Hour : </b>
|
<div t-if="activity.date_start">
|
||||||
<t t-esc="'%02d:%02d' % (int(activity.hour_stop), round(activity.hour_stop % 1 * 60))" /></div>
|
<strong>Date Start : </strong><span t-field="activity.date_start"/>
|
||||||
|
</div>
|
||||||
|
<div t-if="activity.date_stop">
|
||||||
|
<strong>Date Stop : </strong><span t-field="activity.date_stop"/>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
|
<div t-if="activity.hour_start">
|
||||||
|
<strong>Start Hour : </strong>>
|
||||||
|
<span t-esc="'%02d:%02d' % (int(activity.hour_start), round(activity.hour_start % 1 * 60))" />
|
||||||
|
</div>
|
||||||
|
<div t-if="activity.hour_stop">
|
||||||
|
<strong>Stop Hour : </strong>>
|
||||||
|
<span t-esc="'%02d:%02d' % (int(activity.hour_stop), round(activity.hour_stop % 1 * 60))" />
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
<t t-else="">
|
<t t-else="">
|
||||||
<t t-if="activity.date_start">
|
<div t-if="activity.date_start">
|
||||||
<div><b>Date Start : </b><span t-field="activity.date_start"/></div>
|
<strong>Date Start : </strong>
|
||||||
</t>
|
<span t-field="activity.date_start"/>
|
||||||
<t t-if="activity.date_stop">
|
</div>
|
||||||
<div><b>Date Stop : </b><span t-field="activity.date_stop"/></div>
|
<div t-if="activity.date_stop">
|
||||||
</t>
|
<strong>Date Stop : </strong>
|
||||||
|
<span t-field="activity.date_stop"/>
|
||||||
|
</div>
|
||||||
</t>
|
</t>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -117,4 +133,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
</t>
|
</t>
|
||||||
</t>
|
</t>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
@ -21,10 +21,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
|
|
||||||
<template id="golem_activity_report_template_inherited_golem_activity_registration"
|
<template id="golem_activity_report_template_inherited_golem_activity_registration"
|
||||||
inherit_id="golem_activity.golem_activity_report_template">
|
inherit_id="golem_activity.golem_activity_report_template">
|
||||||
<xpath expr="//div[@id='page_report_activity']/div[3]" position="after">
|
<xpath expr="//div[@id='page_report_activity']" position="inside">
|
||||||
<div class="col-xs-4 text-left" style="margin-top: 80px;" >
|
<div class="col-xs-4 text-left" style="margin-top: 50px;" >
|
||||||
<u><h4> Enroled members : <span t-field="activity.places_used" /></h4></u>
|
<h4 style="text-decoration: underline;">
|
||||||
<br/></div>
|
Enroled members : <span t-field="activity.places_used" />
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
<table class="table table-striped" id="members_table">
|
<table class="table table-striped" id="members_table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
@ -39,106 +41,24 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
<tr id="activity_registration_line"
|
<tr id="activity_registration_line"
|
||||||
t-foreach="activity.activity_registration_ids" t-as="reg">
|
t-foreach="activity.activity_registration_ids" t-as="reg">
|
||||||
<td class="col-xs-2">
|
<td class="col-xs-2">
|
||||||
<span t-esc="reg.member_id.lastname" />
|
<span t-field="reg.member_id.lastname" />
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-2">
|
<td class="col-xs-2">
|
||||||
<span t-esc="reg.member_id.firstname" />
|
<span t-field="reg.member_id.firstname" />
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-3">
|
<td class="col-xs-3">
|
||||||
<span t-esc="reg.member_id.phone" />
|
<span t-field="reg.member_id.phone" />
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-3">
|
<td class="col-xs-3">
|
||||||
<span t-esc="reg.member_id.email" />
|
<span t-field="reg.member_id.email" />
|
||||||
</td>
|
</td>
|
||||||
<td class="col-xs-2">
|
<td class="col-xs-2">
|
||||||
<span t-esc="reg.member_id.city" />
|
<span t-field="reg.member_id.city" />
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</xpath>
|
</xpath>
|
||||||
|
|
||||||
<!--<t t-call="report.html_container">
|
|
||||||
<t t-set="season" t-value="docs._default_season()" />
|
|
||||||
<t t-foreach="docs" t-as="activity" id="foreach_activity">
|
|
||||||
<t t-call="report.external_layout">
|
|
||||||
<div id='page_report_activity' class="page">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12" id="activity_title">
|
|
||||||
<h2 class="golem_report_title">
|
|
||||||
Activity : <span t-field="activity.name" />
|
|
||||||
</h2>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12 bg-info" style="margin-top: 40px;" >
|
|
||||||
<div class="col-xs-4" id="activity_info_left"><h4>General Information</h4></div>
|
|
||||||
<div class="col-xs-4" id="activity_info_middle"><h4>Type</h4></div>
|
|
||||||
<div class="col-xs-4" id="activity_info_right"><h4>Session</h4></div>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-12" id="activity_info">
|
|
||||||
<div class="col-xs-4" id="activity_info_left">
|
|
||||||
<t t-if="activity.season_id">
|
|
||||||
<div><b>Season : </b><span t-field="activity.season_id"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.animator_id">
|
|
||||||
<div><b>Animator : </b><span t-field="activity.animator_id"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.list_price">
|
|
||||||
<div><b>Price : </b><span t-field="activity.list_price"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.default_code">
|
|
||||||
<div><b>Reference : </b><span t-field="activity.default_code"/></div>
|
|
||||||
</t>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-4" id="activity_info_middle">
|
|
||||||
<t t-if="activity.type_id">
|
|
||||||
<div><b>Type : </b><span t-field="activity.type_id"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.categ_id">
|
|
||||||
<div><b>Category : </b><span t-field="activity.categ_id"/></div>
|
|
||||||
</t>
|
|
||||||
</div>
|
|
||||||
<div class="col-xs-4" id="activity_info_right">
|
|
||||||
<t t-if="activity.places">
|
|
||||||
<div><b>Places : </b><span t-field="activity.places"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.is_recurrent">
|
|
||||||
<div><b>Is Recurrent : </b><span t-field="activity.is_recurrent"/></div>
|
|
||||||
<t t-if="activity.is_fullseason">
|
|
||||||
<t t-if="activity.weekday">
|
|
||||||
<div><b>Weekday : </b><span t-field="activity.weekday"/></div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
<t t-else="">
|
|
||||||
<t t-if="activity.date_start">
|
|
||||||
<div><b>Date Start : </b><span t-field="activity.date_start"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.date_stop">
|
|
||||||
<div><b>Date Stop : </b><span t-field="activity.date_stop"/></div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.hour_start">
|
|
||||||
<div><b>Start Hour : </b><span t-field="activity.hour_start" /></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.hour_stop">
|
|
||||||
<div><b>Stop Hour : </b><span t-field="activity.hour_stop"/></div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
<t t-else="">
|
|
||||||
<t t-if="activity.date_start">
|
|
||||||
<div><b>Date Start : </b><span t-field="activity.date_start"/></div>
|
|
||||||
</t>
|
|
||||||
<t t-if="activity.date_stop">
|
|
||||||
<div><b>Date Stop : </b><span t-field="activity.date_stop"/></div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</t>
|
|
||||||
</t>
|
|
||||||
</t>-->
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</odoo>
|
</odoo>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user