odoo/addons/mrp/report/mrp_production_templates.xml

124 lines
6.5 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<template id="report_mrporder">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.internal_layout">
<div class="page">
<div class="oe_structure"/>
<div class="row">
<div class="col-xs-7">
<h2>Production Order # : <span t-field="o.name"/></h2>
</div>
<div class="col-xs-5">
<span class="text-right">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 100)" style="width:350px;height:60px"/>
</span>
</div>
</div>
<div class="row mt32 mb32">
<div class="col-xs-3">
<strong>Source Document:</strong><br/>
<span t-field="o.origin"/>
</div>
<div class="col-xs-3">
<strong>Product:</strong><br/>
<span t-field="o.product_id"/>
</div>
<div class="col-xs-3">
<strong>Quantity:</strong><br/>
<span t-field="o.product_qty"/>
<span t-field="o.product_uom_id.name" groups="product.group_uom"/>
</div>
</div>
<div class="row mt32 mb32">
<div class="col-xs-3">
<strong>Scheduled Date:</strong><br/>
<span t-field="o.date_planned_start"/><span t-if="o.date_planned_finished"> - <span t-field="o.date_planned_finished"/></span>
</div>
<div class="col-xs-3">
<strong>Printing date:</strong><br/>
<span t-esc="time.strftime('%Y-%m-%d')"
t-options='{"widget": "date"}'/>
</div>
<div class="col-xs-3" t-if="'sale_ref' in o">
<strong>Partner Ref:</strong><br/>
<span t-esc="'sale_ref' in o and o.sale_ref"/>
</div>
<div class="col-xs-3" t-if="'sale_name' in o">
<strong>SO Number:</strong><br/>
<span t-esc="'sale_name' in o and o.sale_name"/>
</div>
</div>
<div t-if="o.workorder_ids">
<strong>Work Orders</strong>
<table class="table table-condensed">
<tr>
<td class="text-center"><strong>Name</strong></td>
<td class="text-center"><strong>WorkCenter</strong></td>
<td class="text-center"><strong>No. Of Minutes</strong></td>
</tr>
<tr t-foreach="o.workorder_ids" t-as="line2">
<td class="text-center"><span t-field="line2.name"/></td>
<td class="text-center"><span t-field="line2.workcenter_id.name"/></td>
<td class="text-center"><span t-field="line2.duration_expected"/></td>
</tr>
</table>
</div>
<h3 t-if="o.move_raw_ids">Bill Of Material</h3>
<table class="table table-condensed" t-if="o.move_raw_ids">
<thead>
<tr>
<th><strong>Product</strong></th>
<th class="text-right"><strong>Quantity</strong></th>
<th class="text-center" groups="stock.group_stock_multi_locations">
<strong>Source Location</strong>
</th>
<th class="text-center" groups="stock.group_stock_multi_locations">
<strong>Destination Location</strong>
</th>
<th class="text-center">
<strong>Barcode</strong>
</th>
</tr>
</thead>
<tbody>
<t t-if="o.move_raw_ids">
<tr>
<td colspan="4"><strong>Products to Consume</strong></td>
</tr>
<tr t-foreach="o.move_raw_ids" t-as="line">
<td>
<span t-field="line.product_id"/>
</td>
<td class="text-right">
<span t-field="line.product_uom_qty"/>
<span t-field="line.product_uom.name" groups="product.group_uom"/>
</td>
<td class="text-center" groups="stock.group_stock_multi_locations">
<span t-field="line.location_id.name"/>
</td>
<td class="text-center" groups="stock.group_stock_multi_locations">
<span t-field="line.location_dest_id.name"/>
</td>
<td class="text-center">
<span t-if="line.product_id.barcode">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', line.product_id.barcode, 600, 100)" style="width:300px;height:50px"/>
</span>
</td>
</tr>
</t>
</tbody>
</table>
<div class="oe_structure"/>
</div>
</t>
</t>
</t>
</template>
</odoo>