2018-01-16 06:58:15 +01:00
<?xml version="1.0" encoding="utf-8"?>
2018-01-16 11:34:37 +01:00
<flectra >
2018-01-16 06:58:15 +01:00
<template id= "mrp_bom_cost_report" >
<t t-call= "web.html_container" >
<t t-foreach= "lines" t-as= "line" >
<t t-call= "web.internal_layout" >
<div class= "page" >
<t t-set= "currency" t-value= "line['currency']" />
<h1 > <t t-esc= "line['name']" /> </h1> <br />
<b > <t t-esc= "line['product_uom_qty']" /> <t t-esc= "line['product_uom'].name" /> </b>
<table >
<tbody >
<tr t-foreach= "line['attributes']" t-as= "attrib" >
<td > <span t-esc= "attrib[0]" /> </td>
<td > <span t-esc= "attrib[1]" /> </td>
</tr>
</tbody>
</table>
<h2 > Cost Structure</h2>
<table class= "table table-condensed" >
<thead >
<tr >
<th > Reference</th>
<th colspan= "3" > Raw Materials</th>
<th class= "col-sm-2 text-right" > Quantity</th>
<th class= "col-sm-2 text-right" > Unit Cost</th>
<th class= "col-sm-2 text-right" > Total Cost</th>
</tr>
</thead>
<tbody >
<tr t-foreach= "line['lines']" t-as= "bom_line" >
<td >
<span t-field= "bom_line['product_id'].default_code" />
</td>
<td colspan= "3" >
<span t-att-res-id= "bom_line['product_id'].id" res-model= "product.product" view-type= "form" t-esc= "bom_line['product_id'].name" />
</td>
<td class= "text-right" >
2018-07-09 14:37:58 +02:00
<span t-esc= "bom_line['product_uom_qty']" t-esc-options= '{"widget": "float", "decimal_precision": "Product Unit of Measure"}' /> <span t-esc= "bom_line['product_uom'].name" groups= "product.group_uom" />
2018-01-16 06:58:15 +01:00
</td>
<td class= "text-right" >
<span t-esc= "bom_line['price_unit']" t-options= '{"widget": "monetary", "display_currency": currency}' />
</td>
<td class= "text-right" >
<span t-esc= "bom_line['total_price']" t-options= '{"widget": "monetary", "display_currency": currency}' />
</td>
</tr>
<tr >
<th colspan= "6" class= "text-right" > Total Cost of Components</th>
<th class= "text-right" >
<span t-esc= "line['total']" t-options= '{"widget": "monetary", "display_currency": currency}' />
</th>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</template>
2018-01-16 11:34:37 +01:00
</flectra>