odoo/addons/account_budget/views/report_budget.xml

78 lines
4.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_budget">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.internal_layout">
<div class="page">
<h2>Budget</h2>
<div class="row mt32">
<div class="col-xs-3">
<strong>Currency:</strong>
<p t-esc="res_company.currency_id.name"/>
</div>
<div class="col-xs-3">
<strong>Printed at:</strong>
<p><span t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/> at
<span t-esc="time.strftime('%H:%M:%S')"/></p>
</div>
<div class="col-xs-3">
<strong>Analysis from:</strong>
<p><span t-esc="formatLang(data['form']['date_from'], date=True)"/> to
<span t-esc="formatLang(data['form']['date_to'], date=True)"/></p>
</div>
<div class="col-xs-3">
<strong>Budget:</strong>
<p t-field="o.name"/>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Description</th>
<th class="text-right">Theoretical Amount</th>
<th class="text-right">Planned Amount</th>
<th class="text-right">Practical Amount</th>
<th class="text-right">Perc(%)</th>
</tr>
</thead>
<tbody>
<t t-foreach="funct(o, data['form'])" t-as="line">
<t t-if="line['status'] == 1">
<tr>
<td><strong t-esc="line['name']"/></td>
<td class="text-right">
<strong t-esc="formatLang(line['theo'], dp='Account', currency_obj = res_company.currency_id)"/>
</td>
<td class="text-right"><strong t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><strong t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><strong t-esc="formatLang(line['perc'],digits=2)"/> %</td>
</tr>
</t>
<tr t-if="line['status'] != 1">
<td><span style="color: white;" t-esc="'.....'*(line['status'] - 1)"/><span t-esc="line['name']"/></td>
<td class="text-right"><span t-esc="formatLang(line['theo'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><span t-esc="formatLang(line['pln'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><span t-esc="formatLang(line['prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><span t-esc="formatLang(line['perc'],digits=2)"/> % </td>
</tr>
</t>
<tr t-foreach="funct_total(data['form'])" t-as="tot">
<td><strong>Total:</strong></td>
<td class="text-right"><strong t-esc="formatLang(tot['tot_theo'], dp='Account', currency_obj = res_company.currency_id)"/></td>
<td class="text-right"><strong t-esc="formatLang(tot['tot_pln'], dp='Account', currency_obj = res_company.currency_id)"/></td>
<td class="text-right"><strong t-esc="formatLang(tot['tot_prac'], dp='Account', currency_obj=res_company.currency_id)"/></td>
<td class="text-right"><strong t-esc="formatLang(tot['tot_perc'], digits=2)"/> %</td>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
</data>
</openerp>