Slink/sos_inventory/report/sos_brr_report.xml

164 lines
5.6 KiB
XML
Executable File

<odoo>
<record id="action_report_brr" model="ir.actions.report">
<field name="name">BRR Form</field>
<field name="model">sos_fir_brr</field>
<field name="report_type">qweb-pdf</field>
<field name="report_name">sos_inventory.report_brr</field>
<field name="report_file">sos_inventory.report_brr</field>
<field name="print_report_name">"Report _ %s" % object.fir_no</field>
<field name="binding_model_id" eval="False"/>
<field name="binding_type">report</field>
</record>
<template id="report_brr">
<t t-call="web.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="web.external_layout">
<link rel="stylesheet" href="/sos_inventory/static/src/css/style.css" />
<div class="page">
<h2 style="text-align:center">Batch Release Report</h2>
<br></br>
<!-- HTML Table -->
<table class="table table-bordered">
<tbody>
<tr>
<td class="column">FIR No</td><td><t t-esc="o.fir_no"/></td>
<td class="column">FIR Date</td><td><t t-esc="o.fir_date"/></td>
</tr>
<tr>
<td class="column">FG Name</td><td><t t-esc="o.fg_name.name"/></td>
<td class="column">Batch No</td><td><t t-esc="o.batch_No"/></td>
</tr>
<tr>
<td class="column">Customer Name</td><td><t t-esc="o.customer_name"/></td>
<td class="column">Manufacturing Date</td><td><t t-esc="o.mfg_date"/></td>
</tr>
</tbody>
</table>
<br></br>
<!-- <table class="table table-bordered">
<tbody>
<tr style="background-color:#ccc"><td colspan="7" class="column"><h5>Summary Report</h5></td></tr>
<tr class="column">
<td>Sampled Quantity</td>
<td>Approved Quantity</td>
<td>Rejected Quantity</td>
<td>Rejection Percentage</td>
</tr>
<tr>
<td><t t-esc="o.sampling_size"/></td>
<td><t t-esc="o.approved_qty"/></td>
<td><t t-esc="o.rejected_qty"/></td>
<td><t t-esc="o.rejection_percentage_display"/></td>
</tr>
</tbody>
</table>
<br></br> -->
<table class="table table-bordered">
<tbody>
<tr style="background-color:#ccc"><td colspan="7" class="column"><h5>Monitoring &amp; Measuring Equipment Details</h5></td></tr>
<tr class="column">
<td>S.No</td>
<td>Equipment Name</td>
<td>Identification No</td>
<td>Certification No</td>
<td>Calibrated On</td>
<td>Calibrated Due</td>
</tr>
<t t-foreach="o.calibration_line_ids" t-as="line_items">
<tr>
<td><t t-esc="line_items_index + 1"/></td>
<td><t t-esc="line_items.calibration_device.name"/></td>
<td><t t-esc="line_items.identification_No"/></td>
<td><t t-esc="line_items.certification_No"/></td>
<td><t t-esc="line_items.calibrated_date"/></td>
<td><t t-esc="line_items.due_date"/></td>
</tr>
</t>
</tbody>
</table>
<br></br>
<table class="table table-bordered">
<tbody>
<tr style="background-color:#ccc"><td colspan="8" class="column"><h5>Inspection Details</h5></td></tr>
<tr class="column">
<td>S.No</td>
<td>Testing parameter</td>
<td>Specification</td>
<td>Results</td>
<td>Inspection Remarks</td>
</tr>
<t t-foreach="o.testing_parameter_line_ids" t-as="line_items">
<tr>
<td><t t-esc="line_items_index + 1"/></td>
<td><t t-esc="line_items.testing_parameter.name"/></td>
<td><t t-esc="line_items.specification"/></td>
<td> <t t-if="line_items.results and isinstance(line_items.results, str)">
<t t-foreach="line_items.results.split('\n')" t-as="part">
<t t-esc="part"/><br/>
</t>
</t></td>
<td><t t-esc="line_items.inspection_decision"/></td>
</tr>
</t>
</tbody>
</table>
<div style="page-break-after: always;">
</div>
<div style="width: 100%; display: flex; justify-content: space-between; margin-top: 50px;">
<table class="table table-bordered">
<tr style="background-color:#ccc">
<td style="padding: 8px;" class="column"><b>Department </b></td>
<td style="padding: 8px;" class="column"><b>Authorized Signatory </b></td>
<td style="padding: 8px;" class="column"><b>Authorized On</b></td>
<td style="padding: 8px;" class="column"><b>Authorized By</b></td>
</tr>
<tr>
<td>QC</td>
<td><img style="height:80px;width:100px" t-if="o.qc_by_image" t-att-src="'data:image/png;base64,%s' % (o.qc_by_image.decode())" alt="Tested By"/></td>
<td><t t-esc="o.qc_tested_on"/></td>
<td><t t-esc="o.qc_by_name.name"/></td>
</tr>
<tr>
<td>QA</td>
<td><img style="height:80px;width:100px" t-if="o.qa_by_image" t-att-src="'data:image/png;base64,%s' % (o.qa_by_image.decode())" alt="Tested By"/></td>
<td><t t-esc="o.qa_tested_on"/></td>
<td><t t-esc="o.qa_by_name.name"/></td>
</tr>
</table>
</div>
</div>
</t>
</t>
</t>
</template>
</odoo>