<?xml version="1.0" encoding="UTF-8"?>
<odoo>
 <record id="action_ccrf_list" model="ir.actions.act_window">
    <field name="name">Customer Complaint Register</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sos_ccrf</field>
    <field name="view_mode">tree,form,kanban</field>
</record>
    <record id="sos_ccrf_view_tree" model="ir.ui.view">
        <field name="name">sos_ccrf.view.tree</field>
        <field name="model">sos_ccrf</field>
        <field name="arch" type="xml">
            <tree>
                
                <field name="ccrf_no"/>
                 <field name="complaint_received_on"/>
                 <field name="complaint_received_mode"/>
                 <field name="fg_name"/>
                 <field name="customer_name"/>
<field name="write_uid" string="Last Edited By" optional="hide"/>
                <field name="write_date" string="Last Edited On" optional="hide"/>
            </tree>
        </field>
    </record>
       <record id="sos_ccrf_form_view" model="ir.ui.view">
      <field name="name">Form</field>
        <field name="model">sos_ccrf</field>
        <field name="arch" type="xml">
  <form string="Model Form">
   <header>
                    <button class="btn btn-primary" type="object"
                            name="action_report_ccrf_btn"><i class="fa fa-print"></i> Print</button>
                            
                </header>
                    <sheet>
 <h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Customer Complaint Register</h2><hr></hr><br></br>  
          <!-- Topmost Group -->

<!-- First Column -->

<group string="General Info">
<group>
<field name="ccrf_no"/>

<field name="complaint_received_mode"/>
<field name="complaint_received_on"/>
</group>
</group>
<group>
<!-- Second Column -->
<group string="Customer Details">
<field name="customer_name"/>
<field name="customer_address"/>
<field name="customer_phone_number"/>
<field name="customer_email"/>
</group>
<group string="Product Details">
<field name="fg_name"/>
<field name="helper_field" invisible="1"/>
<field name="sub_fg_name" domain="[('id', 'in', helper_field)]"/>
<field name="batch_no"/>

</group>

</group>

<notebook> 
<page string="Data Collection">
<group>
<group>
<field name="invoice_no"/>
<field name="batch_release_date"/>
<field name="quantity_dispatched"/>
</group>
<group>
<field name="brcoa_no"/>
<field name="brcoa_date"/>
<field name="other_complaints"/>
</group>
</group>
<br></br>
<templates>
<div class="row">
<div class="col-6"></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>Data Collected By Sign</b>
                <button string="Approve" invisible="data_collected_image" class="btn-primary custom_btn" type="object" name="action_data_esign_btn"></button>
            </td>
            <td><field name="data_collected_image" widget="image"/></td>
        </tr>
        <tr invisible="data_collected_image == False">
            <td style="padding: 8px;" class="column"><b>Data Collected On</b></td>
            <td><field name="data_collected_on" readonly="1"/></td>
        </tr>
        <tr invisible="data_collected_image == False">
            <td style="padding: 8px;" class="column"><b>Data Collected By</b></td>
            <td><field name="data_collected_by" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
</page>    
<page string="Investigation Details"> 
<group>
<group>
<field name="device_failed_to_meet_specification"/>
<field name="labelling_error"/>
<field name="ifu"/>
<field name="interin_containment_actions"/>
</group>
<group>
<field name="packaging_details"/>
<field name="processing"/>
<field name="raw_materials"/>

</group>
</group>
<templates>
<div class="row">
<div class="col-6"></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>Investigation Carried Out By Sign</b>
                <button string="Approve" invisible="investigation_carriedout_image" class="btn-primary custom_btn" type="object" name="action_investigation_esign_btn"></button>
            </td>
            <td><field name="investigation_carriedout_image" widget="image"/></td>
        </tr>
        <tr invisible="investigation_carriedout_image == False">
            <td style="padding: 8px;" class="column"><b>Investigation Carried Out On</b></td>
            <td><field name="investigation_carriedout_on" readonly="1"/></td>
        </tr>
        <tr invisible="investigation_carriedout_image == False">
            <td style="padding: 8px;" class="column"><b>Investigation Carried Out By</b></td>
            <td><field name="investigation_carriedout_by" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
</page> 
<page string="Root Cause">
<field name="root_cause"/>
<templates>
<div class="row">
<div class="col-4">
<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>Carried Out By Sign</b>
                <button string="Approve" invisible="rootcause_carriedout_image" class="btn-primary custom_btn" type="object" name="action_rootcause_esign_btn"></button>
            </td>
            <td><field name="rootcause_carriedout_image" widget="image"/></td>
        </tr>
        <tr invisible="rootcause_carriedout_image == False">
            <td style="padding: 8px;" class="column"><b>Root Cause Carried Out On</b></td>
            <td><field name="rootcause_carriedout_on" readonly="1"/></td>
        </tr>
        <tr invisible="rootcause_carriedout_image == False">
            <td style="padding: 8px;" class="column"><b>Root Cause Carried Out By</b></td>
            <td><field name="rootcause_carriedout_by" readonly="1"/></td>
        </tr>
    </table>
</div>
<div class="col-4"></div>
<div class="col-4">
<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>Verified By Sign</b>
                <button string="Approve" invisible="rootcause_verifiedout_image" class="btn-primary custom_btn" type="object" name="action_rootcause_verify_btn"></button>
            </td>
            <td><field name="rootcause_verifiedout_image" widget="image"/></td>
        </tr>
        <tr invisible="rootcause_verifiedout_image == False">
            <td style="padding: 8px;" class="column"><b>Root Cause Verified On</b></td>
            <td><field name="rootcause_verifiedout_on" readonly="1"/></td>
        </tr>
        <tr invisible="rootcause_verifiedout_image == False">
            <td style="padding: 8px;" class="column"><b>Root Cause Verified Out By</b></td>
            <td><field name="rootcause_verifiedout_by" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
</page>    
<page string="CAPA">
<group>
<group>
<field name="corrective_action"/>
</group>
<group>
<field name="preventive_action"/>
</group>
<group>
<field name="capa_status"/>
</group>
</group>
<templates>
<div class="row">
<div class="col-6"></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>Status Reviewed By Sign</b>
                <button string="Approve" invisible="status_reviewed_image" class="btn-primary custom_btn" type="object" name="action_capa_esign_btn"></button>
            </td>
            <td><field name="status_reviewed_image" widget="image"/></td>
        </tr>
        <tr invisible="status_reviewed_image == False">
            <td style="padding: 8px;" class="column"><b>Status Reviewed On</b></td>
            <td><field name="status_reviewed_on" readonly="1"/></td>
        </tr>
        <tr invisible="status_reviewed_image == False">
            <td style="padding: 8px;" class="column"><b>Status Reviewed By</b></td>
            <td><field name="status_reviewed_by" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
</page> 
<page string="Response">
<group>
<group>
<field name="response_sent_date"/>
</group>
<group>
<field name="customer_feedback_on_response"/>
</group>
<group>
<field name="qa_comments"/>
</group>
</group>
<templates>
<div class="row">
<div class="col-6"></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 Sign</b>
                <button string="Approve" invisible="qa_sign" class="btn-primary custom_btn" type="object" name="action_qa_esign_btn"></button>
            </td>
            <td><field name="qa_sign" widget="image"/></td>
        </tr>
        <tr invisible="qa_sign == False">
            <td style="padding: 8px;" class="column"><b>QA Reviewed On</b></td>
            <td><field name="qa_closed_on" readonly="1"/></td>
        </tr>
        <tr invisible="qa_sign == False">
            <td style="padding: 8px;" class="column"><b>QA Reviewed By</b></td>
            <td><field name="qa_by" readonly="1"/></td>
        </tr>
    </table>
</div>
</div>
</templates>
</page>
</notebook>
                   

    <br></br>
    <templates>
       <div style="width: 100%; display: flex; justify-content: space-between; margin-top: 50px;">
   
   </div>
    </templates>
                    </sheet>
                </form>
        </field>
    </record>
<menuitem id="ccrf_menu"
              name="Customer Complaint Registration Form(CCRF)"
              parent="ce_forms_menu_root" action="action_ccrf_list"  groups="sos_inventory.sos_production_user,sos_inventory.sos_rd_user,sos_inventory.sos_healthcare_user,sos_inventory.sos_qa_user,sos_inventory.sos_qc_user,sos_inventory.sos_ce_user,sos_inventory.sos_scg_group_user,sos_inventory.sos_management_user,sos_inventory.sos_sales_user"/>
              

</odoo>
