flectra/addons/purchase_indent/report/purchase_indent_template.xml
2018-01-29 11:35:08 +00:00

135 lines
6.0 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<flectra>
<template id="report_purchaseindent_document">
<t t-call="web.external_layout">
<style>
.bg {
background-color: grey;
color: white;
}
</style>
<t t-set="o" t-value="o.with_context({'lang':o.partner_id.lang})"/>
<div class="page">
<div class="oe_structure" style="font-size:13px;"/>
<br/>
<div class="row" style="font-size:13px;">
<div class="col-xs-6">
<strong>Shipping address:</strong>
<div t-if="o.dest_address_id">
<div t-field="o.dest_address_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
</div>
<div t-if="not o.dest_address_id and o.picking_type_id and o.picking_type_id.warehouse_id">
<span t-field="o.picking_type_id.warehouse_id.name"/>
<div t-field="o.picking_type_id.warehouse_id.partner_id"
t-options='{"widget": "contact", "fields": ["address", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-field="o.partner_id"
t-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": True, "phone_icons": True}'/>
<p t-if="o.partner_id.vat">VAT:
<span t-field="o.partner_id.vat"/>
</p>
</div>
</div>
<br/>
<center>
<h4>
<b>Purchase Indent</b>
</h4>
</center>
<hr style="margin-top: 10px; margin-bottom: 5px;"/>
<center>
<h4 style="color:blue" t-field="o.name"/>
</center>
<div class="row mt32 mb32" style="font-size:13px;">
<div class="col-xs-3">
<strong>Indent Date:</strong>
<p t-field="o.request_date"/>
</div>
<div class="col-xs-3">
<strong>Category:</strong>
<p t-field="o.category_id.name"/>
</div>
<div t-if="o.branch_id" class="col-xs-3">
<strong>Branch:</strong>
<p t-field="o.branch_id.name"/>
</div>
</div>
<table width="100%" class="table table-striped table-bordered"
border="1">
<thead style="border-bottom: 1px solid #3A89FF;font-size:13px;">
<th class="text-center bg" width="5%">Sr</th>
<th class="bg" width="20%">Product</th>
<th class="bg" width="21%">Description</th>
<th class="text-center bg" width="8%">Unit</th>
<th class="text-center bg" width="14%">Expected Date
</th>
<th class="text-center bg" width="10%">Request
Quantity
</th>
<th class="text-center bg" width="10%">Requisition
Quantity
</th>
<th class="text-center bg" width="10%">Remaining
Quantity
</th>
</thead>
<tbody>
<tr t-foreach="o.indent_line" t-as="line"
style="font-size:13px;">
<td class="text-center">
<t t-esc="line_index + 1"/>
.
</td>
<td>
<span t-field="line.product_id.name"/>
</td>
<td>
<span t-field="line.name"/>
</td>
<td class="text-right">
<span t-field="line.product_uom.name"
groups="product.group_uom"/>
</td>
<td class="text-center">
<span t-field="line.expected_date"/>
</td>
<td class="text-right">
<span t-field="line.product_qty"/>
</td>
<td class="text-right">
<span t-field="line.requisition_qty"/>
</td>
<td class="text-right">
<span t-field="line.remaining_qty"/>
</td>
</tr>
</tbody>
</table>
<table width="50%">
<tr style="font-size:13px;">
<th width="15%">Requested By:</th>
<td class="text-left" width="35%">
<span t-esc="o.user_id.name"/>
</td>
</tr>
</table>
</div>
</t>
</template>
<template id="report_purchaseindent">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="purchase_indent.report_purchaseindent_document"
t-lang="o.partner_id.lang"/>
</t>
</t>
</template>
</flectra>