PORT v12 mrp_usability
This commit is contained in:
39
mrp_usability/report/mrp_report.xml
Normal file
39
mrp_usability/report/mrp_report.xml
Normal file
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
|
||||
<template id="report_mrporder" inherit_id="mrp.report_mrporder">
|
||||
<xpath expr="//div[@class='oe_structure'][2]" position="after">
|
||||
<t t-set="has_product_unavailable"
|
||||
t-value="any(o.move_raw_ids.filtered(lambda x: not x.reserved_availability))"/>
|
||||
<h4 if="has_product_unavailable">
|
||||
These products were unavailable while edition of this Manufacturing Order
|
||||
</h4>
|
||||
<table class="table table-sm" t-if="o.move_raw_ids and has_product_unavailable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Product</th>
|
||||
<th>Quantity</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<t t-set="lines"
|
||||
t-value="o.move_raw_ids.filtered(lambda x: not x.reserved_availability)"/>
|
||||
<t t-foreach="lines" t-as="ml">
|
||||
<tr>
|
||||
<td>
|
||||
<span t-field="ml.product_id"/>
|
||||
</td>
|
||||
<td>
|
||||
<span t-esc="ml.product_uom_qty" t-if="ml.state !='done'"/>
|
||||
<span t-esc="ml.qty_done" t-if="ml.state =='done'"/>
|
||||
<span t-field="ml.product_uom" groups="uom.group_uom"/>
|
||||
</td>
|
||||
</tr>
|
||||
</t>
|
||||
</tbody>
|
||||
</table>
|
||||
</xpath>
|
||||
|
||||
</template>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user