[FIX] sale_layout: use t-esc-options to format subtotals

bzr revid: sle@openerp.com-20140407133425-gfl5bqq0x2j5tq5w
This commit is contained in:
Simon Lejeune 2014-04-07 15:34:25 +02:00
parent d908d26c7c
commit 26058183e1
1 changed files with 38 additions and 37 deletions

View File

@ -1,42 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="category_template">
<!-- Category name -->
<t t-if="p['category']">
<tr>
<td colspan="100" class="active" style="font-weight: bold; border-bottom: 1px solid black;">&amp;bull;
<t t-if="p['category'].name">
<t t-esc="p['category'].name"></t>
</t>
<t t-if="not p['category'].name">
Uncategorized
</t>
</td>
</tr>
</t>
</template>
<template id="subtotal_template">
<!-- Subtotal -->
<t t-if="'subtotal' in p['category'] and p['category'].subtotal is True">
<tr class="text-right">
<td colspan="100">
<strong>Subtotal: </strong>
<t t-esc="p['subtotal']"></t>
</td>
</tr>
<data>
<template id="category_template">
<!-- Category name -->
<t t-if="p['category']">
<tr>
<td colspan="100" class="active" style="font-weight: bold; border-bottom: 1px solid black;">&amp;bull;
<t t-if="p['category'].name">
<t t-esc="p['category'].name"></t>
</t>
</template>
<template id="separator_template">
<!-- Separator -->
<t t-if="'separator' in p['category'] and p['category'].separator is True">
<tr class="text-center">
<td colspan="100" class="active">
***
</td>
</tr>
<t t-if="not p['category'].name">
Uncategorized
</t>
</template>
</data>
</openerp>
</td>
</tr>
</t>
</template>
<template id="subtotal_template">
<!-- Subtotal -->
<t t-if="'subtotal' in p['category'] and p['category'].subtotal is True">
<tr class="text-right">
<td colspan="100">
<strong>Subtotal: </strong>
<span t-esc="p['subtotal']" t-esc-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
</td>
</tr>
</t>
</template>
<template id="separator_template">
<!-- Separator -->
<t t-if="'separator' in p['category'] and p['category'].separator is True">
<tr class="text-center">
<td colspan="100">
***
</td>
</tr>
</t>
</template>
</data>
</openerp>