| 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
<odoo> |
| 3 |
|
| 4 |
<template id="mrp_account.report_wip"> |
| 5 |
<t t-call="web.html_container"> |
| 6 |
<t t-call="web.external_layout"> |
| 7 |
<div class="page"> |
| 8 |
<div class="oe_structure"/> |
| 9 |
<div class="row mt8"> |
| 10 |
<div class="col-lg-12"> |
| 11 |
<h2> |
| 12 |
<span>WIP Report for |
| 13 |
<t t-out="', '.join(docs.account_id.mapped('name'))">Acme Corp.</t> |
| 14 |
</span> |
| 15 |
</h2> |
| 16 |
</div> |
| 17 |
</div> |
| 18 |
<div class="oe_structure"/> |
| 19 |
<div class="row mt8"> |
| 20 |
<div class="col-12"> |
| 21 |
<table class="table table-borderless"> |
| 22 |
<thead> |
| 23 |
<tr> |
| 24 |
<th class="text-start align-middle"><span>Date</span></th> |
| 25 |
<th class="text-start align-middle"><span>Ref.</span></th> |
| 26 |
<th class="text-start align-middle"><span>Product</span></th> |
| 27 |
<th class="text-start align-middle"><span>Quantity</span></th> |
| 28 |
<th class="text-start align-middle"><span>Unit of Measure</span></th> |
| 29 |
<th class="text-end"><span>Amount</span></th> |
| 30 |
</tr> |
| 31 |
</thead> |
| 32 |
<tbody> |
| 33 |
<tr t-foreach="docs" t-as="line" t-att-style="'background-color: #F1F1F1;' if line_index % 2 == 0 else ''"> |
| 34 |
<td class="align-middle"> |
| 35 |
<span t-field="line.date">2023-08-15</span> |
| 36 |
</td> |
| 37 |
<td class="align-middle"> |
| 38 |
<span t-field="line.ref">REF123</span> |
| 39 |
</td> |
| 40 |
<td class="align-middle"> |
| 41 |
<span t-field="line.product_id">Laptop</span> |
| 42 |
</td> |
| 43 |
<td class="align-middle"> |
| 44 |
<span t-field="line.unit_amount">5</span> |
| 45 |
</td> |
| 46 |
<td class="align-middle"> |
| 47 |
<span t-field="line.product_uom_id">Units</span> |
| 48 |
</td> |
| 49 |
<td class="text-end align-middle"> |
| 50 |
<span t-field="line.amount">$1000</span> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<td class="text-end" t-attf-colspan="6"> |
| 55 |
<strong> |
| 56 |
<span style="margin-right: 15px;">Total</span> |
| 57 |
<span t-out="sum(docs.mapped('amount'))">$5000</span> |
| 58 |
</strong> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
</tbody> |
| 62 |
</table> |
| 63 |
</div> |
| 64 |
</div> |
| 65 |
<div class="oe_structure"/> |
| 66 |
</div> |
| 67 |
</t> |
| 68 |
</t> |
| 69 |
</template> |
| 70 |
|
| 71 |
<record id="wip_report" model="ir.actions.report"> |
| 72 |
<field name="name">WIP report</field> |
| 73 |
<field name="model">account.analytic.line</field> |
| 74 |
<field name="report_type">qweb-pdf</field> |
| 75 |
<field name="report_name">mrp_account.report_wip</field> |
| 76 |
<field name="report_file">report_wip</field> |
| 77 |
<field name="binding_model_id" ref="model_account_analytic_line"/> |
| 78 |
<field name="binding_type">report</field> |
| 79 |
</record> |
| 80 |
</odoo> |