You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
128 lines
8.2 KiB
128 lines
8.2 KiB
<?xml version="1.0" encoding="utf-8"?>
|
|
<openerp>
|
|
<data>
|
|
<template id="report_fleet">
|
|
<t t-call="report.html_container">
|
|
<div class="page">
|
|
<t t-call="report.external_layout">
|
|
<!--<t t-call="report.external_layout">-->
|
|
<t t-foreach="docs" t-as="doc">
|
|
<t t-set="doc2" t-value="contract_details(doc.id)"/>
|
|
<t t-set="doc3" t-value="cost_details(doc.id)"/>
|
|
<t t-set="doc4" t-value="odoometer_details(doc.id)"/>
|
|
|
|
|
|
<div class="header" style="text-align:left;"><strong><h1><a>Vehicle:</a><a t-field="doc.name"/></h1></strong></div>
|
|
<div style="text-align:left;"><strong><h3><a>Driver:</a><a t-field="doc.driver_id.name"/></h3></strong></div>
|
|
<div style="text-align:left;"><strong><h3><a>Location:</a><a t-field="doc.location"/></h3></strong></div>
|
|
<t t-if="doc2">
|
|
<div style="text-align:left;"><strong><h2>Contracts</h2></strong></div>
|
|
<br/>
|
|
<br/>
|
|
<table class="table table-condensed" style="page-break-inside: avoid;">
|
|
<thead>
|
|
<tr style="page-break-inside: avoid;" >
|
|
<th style="background-color:#9b9da0 !important;">Start Date </th>
|
|
<th style="background-color:#9b9da0 !important;">End Date </th>
|
|
<th style="background-color:#9b9da0 !important;">Type </th>
|
|
<th style="background-color:#9b9da0 !important;">Vendor </th>
|
|
<th style="background-color:#9b9da0 !important;">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-if="doc2">
|
|
<t t-foreach="doc2" t-as="d">
|
|
<tr style="page-break-inside: avoid;">
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['date']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['date_closed']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['type']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['vendor']"/>
|
|
</td>
|
|
<td>
|
|
<t t-if ="d['state'] =='open'">In Progress</t>
|
|
<t t-if ="d['state'] =='toclose'">To Close</t>
|
|
<t t-if ="d['state'] =='closed'">Terminated</t>
|
|
</td>
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</t>
|
|
<t t-if="doc3">
|
|
<div style="text-align:left;"><strong><h2>Costs Details</h2></strong></div>
|
|
|
|
<table class="table table-condensed" style="page-break-inside: avoid;">
|
|
<thead>
|
|
<tr style="page-break-inside: avoid;">
|
|
<th style="background-color:#9b9da0 !important;">Type </th>
|
|
<th style="background-color:#9b9da0 !important;">Total Price </th>
|
|
<th style="background-color:#9b9da0 !important;">Date </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-if="doc3">
|
|
<t t-foreach="doc3" t-as="d">
|
|
<tr style="page-break-inside: avoid;">
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['type']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['price']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['date']"/>
|
|
</td>
|
|
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</t>
|
|
<t t-if="doc4">
|
|
<div style="text-align:left;"><strong><h2>Odometer details</h2></strong></div>
|
|
<table class="table table-condensed">
|
|
<thead>
|
|
<tr >
|
|
<th style="background-color:#9b9da0 !important;">Date </th>
|
|
<th style="background-color:#9b9da0 !important;">Value </th>
|
|
<th style="background-color:#9b9da0 !important;">Unit </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<t t-if="doc4">
|
|
<t t-foreach="doc4" t-as="d">
|
|
<tr style="page-break-inside:avoid;">
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['date']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['value']"/>
|
|
</td>
|
|
<td>
|
|
<span t-att-style="style" t-esc="d['unit']"/>
|
|
</td>
|
|
|
|
</tr>
|
|
</t>
|
|
</t>
|
|
</tbody>
|
|
</table>
|
|
</t>
|
|
</t>
|
|
|
|
<!--</t>-->
|
|
</t>
|
|
</div>
|
|
</t>
|
|
</template>
|
|
</data>
|
|
</openerp>
|