<odoo>
    <data>
 <record id="action_sos_inhouse_validation_reports" model="ir.actions.act_window">
    <field name="name">Inhouse Validation Report</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sos_inhouse_validation_reports</field>
    <field name="view_mode">tree,form,kanban</field>
</record>
<record id="action_sos_inhouse_validation_reports_tree" model="ir.ui.view">
        <field name="name">sos_inhouse_validation_reports.view.tree</field>
        <field name="model">sos_inhouse_validation_reports</field>
        <field name="arch" type="xml">
            <tree> 
                <field name="ihvr_no"/>
                <field name="validation_date"/>
                <field name="master_equipment_name"/>
                <field name="write_uid" string="Last Edited By" optional="hide"/>
                <field name="write_date" string="Last Edited On" optional="hide"/>
            </tree>
        </field>
    </record>
        <!-- Main Form View -->
        <record id="view_sos_inhouse_validation_reports_form" model="ir.ui.view">
            <field name="name">sos_inhouse_validation_reports_line.form</field>
            <field name="model">sos_inhouse_validation_reports</field>
            <field name="arch" type="xml">
                <form string="In-House Validation Report">
                    <sheet>
                    <group>
                        <group>
                            <field name="ihvr_no"/>
                            </group>
                            <group>
                            <field name="validation_date"/>
                        </group>
                        </group>
                        <h3 style="text-transform: uppercase;
    text-decoration: underline;">Master Equipment Details</h3>
      <group>
                        <group>
                            <field name="master_equipment_name"/>
                            <field name="master_equipment_make"/>
                             <field name="master_equipment_calibrated_date"/>
                             <field name="opreating_range"/>
                            </group>
                            <group>
                            <field name="master_equipment_id"/>
                            <field name="calibration_report_no"/>
                             <field name="master_equipment_validation_upto"/>
                             <field name="measuring_tolerance"/>
                        </group>
                        </group>
                          <h3 style="text-transform: uppercase;
    text-decoration: underline;">Monitoring and Measuring Equipment Details for Validation</h3>
      <group>
                        <group>
                            <field name="equipment_name"/>
                            <field name="equipment_make"/>
                             <field name="eqp_validation_opreating_range"/>
                            </group>
                            <group>
                            <field name="equipment_id"/>
                            <field name="validation_procedure_no"/>
                             <field name="eqp_measuring_tolerance"/>
                        </group>
                        </group>
    <notebook>
    <page string="Observation">
    <field name="line_ids">
    <tree editable="bottom">
    <field name="validation_points"/>
        <field name="standard_values"/>
    <field name="observed_values"/>

    <field name="error_observed"/>

    <field name="error_percentage"/>

    <field name="result"/>

    </tree>
    </field>
    </page>
    </notebook>
    <templates>
<table class="table_custom">
<tr><td class="column">In-House Validation Conclusion</td><td><field name="conclusion"/></td><td class="column">In-House Validation Valid till</td><td><field name="validity"/></td><td class="column">Validation Sticker Affixed on MME</td><td><field name="sticker_affix"/></td></tr>

</table>
<br></br>
<div class="row">
<div class="col-6">
    <!-- First Table -->
   <table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>QC In-Charge</b>
            <br></br><br></br>
                <button string="Approve" invisible="qc_approval_image" class="btn-primary custom_btn" type="object" name="action_qc_esign_btn"></button>
            </td>
            <td><field name="qc_approval_image" widget="image"/></td>
        </tr>
        <tr invisible="qc_approval_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="qc_approved_on" readonly="1"/></td>
        </tr>
        <tr invisible="qc_approval_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="qc_name" readonly="1"/></td>
        </tr>
    </table>
    </div>

<div class="col-6">
<table class="table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;background-color: #fff;border: solid 4px #9689c1;">

        <tr style="border-bottom: solid 1px #ccc;">
            <td style="padding: 8px;" class="column"><b>QA In-Charge</b>
            <br></br><br></br>
                <button string="Approve" invisible="qa_approval_image" class="btn-primary custom_btn" type="object" name="action_qa_esign_btn"></button>
            </td>
            <td><field name="qa_approval_image" widget="image"/></td>
        </tr>
        <tr invisible="qa_approval_image == False">
            <td style="padding: 8px;" class="column"><b>Approved On</b></td>
            <td><field name="qa_approved_on" readonly="1"/></td>
        </tr>
        <tr invisible="qa_approval_image == False">
            <td style="padding: 8px;" class="column"><b>Approved By</b></td>
            <td><field name="qa_name" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
                    </sheet>
                </form>
            </field>
        </record>

  


        <!-- Menuitem -->
        <menuitem id="menu_sos_inhouse_validation_reports"  name="Inhouse Validation Report" parent="mme_forms_menu_root" groups="sos_inventory.sos_healthcare_user,sos_inventory.sos_scg_group_manager,sos_inventory.sos_scg_group_user,sos_inventory.sos_qc_user,sos_inventory.sos_qa_user,sos_inventory.sos_management_user" action="action_sos_inhouse_validation_reports"/>

    </data>
</odoo>
