odoo/addons/point_of_sale/views/report_usersproduct.xml

80 lines
3.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="report_usersproduct">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.internal_layout">
<div class="page">
<h2>User's Product</h2>
<div class="row mb32">
<div class="col-xs-3">
<strong>User</strong>:<br/>
<span t-esc="', '.join(get_user(docs))"/>
</div>
<div class="col-xs-3">
<strong>Company</strong>:<br/>
<span t-field="res_company.name"/>
</div>
<div class="col-xs-3">
<strong>Print Date</strong>:<br/>
<span t-esc="formatLang(time.strftime('%Y-%m-%d'), date=True)"/>
</div>
<div class="col-xs-3">
<strong>Starting Date</strong>:<br/>
<span t-esc="formatLang(o.date, date=True)"/>
</div>
</div>
<div class="row mb32" t-if="o.closing_date">
<div class="col-xs-3">
<strong>Ending Date</strong>:<br/>
<span t-esc="formatLang(o.closing_date, date=True)"/>
</div>
</div>
<table class="table table-condensed">
<thead>
<tr>
<th>Product</th>
<th class="text-right">Qty</th>
<th class="text-right">Amount</th>
</tr>
</thead>
<tbody>
<tr t-foreach="get_data(o)" t-as="line_ids">
<td><t t-if="line_ids['code']">
[<t t-esc="line_ids['code']" />]
</t>
<t t-esc="line_ids['name']" />
</td>
<td class="text-right">
<span t-esc="formatLang(line_ids['qty'])" />
<span t-esc="line_ids['uom']"/>
</td>
<td class="text-right">
<t t-esc="formatLang(line_ids['amt'], currency_obj=res_company.currency_id)"/>
</td>
</tr>
</tbody>
</table>
<div class="row">
<div class="col-xs-4 pull-right">
<table class="table table-condensed">
<tr class="border-black">
<td><strong>Total</strong></td>
<td class="text-right"><span t-esc="formatLang(get_total(o), currency_obj=res_company.currency_id)"/></td>
</tr>
</table>
</div>
</div>
</div>
</t>
</t>
</t>
</template>
</data>
</openerp>