<odoo>
  <record id="action_report_mon_items_btn" model="ir.actions.report">
        <field name="name">MON Form</field>
        <field name="model">sos_mon</field>
        <field name="report_type">qweb-pdf</field>
        <field name="report_name">sos_inventory.report_mon_items</field>
        <field name="report_file">sos_inventory.report_mon_items</field>
        <field name="binding_model_id" eval="False"/>
        <field name="binding_type">report</field>
    </record>

<template id="report_mon_items">
    <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">

                    <h3 style="text-align:center">ORDER NOTE</h3>
                    <br></br>
                               <table class="table">
           <tr>
            <t t-if="o.material_option == True"> 
           <td>
             <input type="checkbox" id="material" checked="checked"/>
                <label for="vehicle1"> MATERIAL</label>
           </td>
           </t>
            <t t-if="o.material_option == False"> 
           <td>
             <input type="checkbox" id="material"/>
                <label for="vehicle1"> MATERIAL</label>
           </td>
           </t>

             <t t-if="o.sfg_option == True"> 
           <td>
             <input type="checkbox" id="material" checked="checked"/>
                <label for="vehicle2"> SEMI FINISHED GOODS</label>
           </td>
           </t>
            <t t-if="o.sfg_option == False"> 
           <td>
             <input type="checkbox" id="sfg"/>
                <label for="vehicle2"> SEMI FINISHED GOODS</label>
           </td>
           </t>

             <t t-if="o.fg_option == True"> 
           <td>
             <input type="checkbox" id="fg" checked="checked"/>
                <label for="vehicle3"> FINISHED GOOS</label>
           </td>
           </t>
            <t t-if="o.fg_option == False"> 
           <td>
             <input type="checkbox" id="fg"/>
                <label for="vehicle3">  FINISHED GOOS</label>
           </td>
           </t>
          </tr>
           </table>
                    <table class="table">
                    <tr><td class="column">MON/SON/FON No</td><td><t t-esc="o.mon_no"/></td><td class="column">MON/SON/FON Date</td><td><t t-esc="o.mon_date"/></td></tr>
                    <tr><td class="column">Filled By</td><td><t t-esc="o.filled_by.name"/></td><td class="column">Department</td><td><t t-esc="o.dept.name"/></td>
                    </tr>
                    <tr><td class="column">Purpose</td><td><t t-esc="o.purpose"/></td><td class="column">Material/Product Name/No</td><td><t t-esc="o.product_name.name"/></td></tr>
                    <tr><td class="column">SFG Name</td><td colspan="3" ><t t-esc="o.auto_load_sfg_items.name"/></td></tr>

                    </table>
                     <br></br>
                      <table class="table table-bordered">
                <tbody>    
 <t t-if="o.material_option == True">  
 <tr style="background-color:#ccc"><td class="column" colspan="6">Materials</td></tr>
             <tr class="column">
             <td>S.No</td>
             <td class="column">Material Code</td>
    <td class="column">Name</td>
    <td class="column">In-Hand Quantity</td>
    <td class="column">Requested Quantity</td>
    <td class="column">Given Quantity</td>

</tr>  

<t t-foreach="o.line_ids_material" t-as="line_items">
<tr>
<td><t t-esc="line_items.s_no"/></td>
 <t t-if="line_items.com_type == 'exits'">  
 <td><t t-esc="line_items.component_id.material_code"/></td>
<td><t t-esc="line_items.component_id.part_no"/></td>
</t>
 <t t-if="line_items.com_type == 'new'"> 
 <td></td> 
<td><t t-esc="line_items.new_component_id"/></td>
</t>
<t t-if="line_items.com_type == 'exits'"> 
<td><t t-esc="line_items.inhand_stock_qty"/></td>
</t>
 <t t-if="line_items.com_type == 'new'"> 
<td></td>
</t>
<td><t t-esc="line_items.quantity"/></td>
<td></td>

</tr>
</t>
</t>
 <t t-if="o.sfg_option == True">  

 <tr style="background-color:#ccc"><td class="column" colspan="4">Semi-Finished Goods</td></tr>
              <tr class="column">
    <td class="column">Name</td>
    <td class="column">UOM</td>
    <td class="column">Specifications</td>
    <td class="column">Quantity</td>

</tr>  
<t t-foreach="o.line_ids_sfg" t-as="line_items">
<tr>
<td><t t-esc="line_items.component_id.name"/></td>
<td><t t-esc="line_items.uom"/></td>
<td><t t-esc="line_items.specifications"/></td>
<td><t t-esc="line_items.quantity"/></td>
</tr>
</t>
</t>
 <t t-if="o.fg_option == True">  

<tr style="background-color:#ccc"><td class="column" colspan="4">Finished Goods</td></tr>
             <tr class="column">
    <td class="column">Name</td>
    <td class="column">UOM</td>
    <td class="column">Specifications</td>
    <td class="column">Quantity</td>

</tr>  
<t t-foreach="o.line_ids_fg" t-as="line_items">
<tr>
<td><t t-esc="line_items.component_id.name"/></td>
<td><t t-esc="line_items.uom"/></td>
<td><t t-esc="line_items.specifications"/></td>
<td><t t-esc="line_items.quantity"/></td>
</tr>
</t>
</t>
</tbody>
</table>
 <br></br>
                       

                </div>
            </t>
        </t>
    </t>
</template>

</odoo>
