<?xml version="1.0" encoding="UTF-8"?>
<odoo>
 <record id="action_tc_form_list" model="ir.actions.act_window">
    <field name="name">Transfer Challan</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sos_transfer_challan</field>
    <field name="view_mode">tree,form,kanban</field>
     <field name="context">{'group_by': 'plan_ref_no'}</field>
<field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                No Data
            </p>
        </field>
</record>
    <record id="sos_transfer_challan_view_tree" model="ir.ui.view">
        <field name="name">sos_transfer_challan.view.tree</field>
        <field name="model">sos_transfer_challan</field>
        <field name="arch" type="xml">
            <tree>
                
                <field name="tc_no"/>
                 <field name="plan_ref_no"/>
                 <field name="product_name"/>
                 <field name="fg_name"/>
                 <field name="planned_qty"/>
                


            </tree>
        </field>
    </record>
       <record id="sos_transfer_challan_form_view" model="ir.ui.view">
      <field name="name">Form</field>
        <field name="model">sos_transfer_challan</field>
        <field name="arch" type="xml">
  <form string="Model Form">
                              <header>
                    <button class="btn btn-primary" type="object"
                            name="action_report_tc_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;">Transfer Challan</h2><hr></hr><br></br>  
<table class="table table_custom" style="box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;">
<tr>
<td><group><field name="sfg_option"/></group></td>
<td><group><field name="fg_option"/></group></td></tr>

</table>
<br></br>
                        <!-- Topmost Group -->
<group>
    <!-- First Column -->
    <group>
        <field name="tc_no"/>
        <field name="plan_ref_no"/>
    
    </group>

    <!-- Second Column -->
    <group>
         <field name="sfg_option" invisible="1"/>
      <field name="fg_option"  invisible="1"/>
       <field name="product_name" invisible="sfg_option"/>
        <field name="fg_name" invisible="sfg_option"/>
        <field name="sfg_name" invisible="fg_option"/>
         <field name="planned_qty"/>
    </group>
</group>

                        
                
<notebook>
<page string="Production to QC"  invisible="sfg_option">
<field name="line_ids">
<tree editable="bottom" >
<field name="production_to_qc_transfer_on" string="Transfered On"/>
<field name="batch_no"/>
<field invisible="show_serial == False" name="serial_no" widget="text" style="height: 100px; overflow-y: auto;" placeholder="Enter serial numbers one per line. 
Use 'to' for ranges (e.g., SOSMC250W2304BO1-000 to SOSMC250W2304BO1-100). 
If no 'to' is used, values will be stored as entered."/>
<field name="show_serial" column_invisible="1"/>
<button name="toggle_serial" type="object" string="Show/Hide Serial No's"/>
<field name="remarks"/>
<field name="production_to_qc_transfer_qty"/>
<field name="production_to_qc_transfer_by" column_invisible="1"/>
<button name="send_to_qc_btn" invisible="production_to_qc_transfer_by" string="Move to QC" type="object" class="oe_highlight" style="margin-right: 20px;"/>

</tree>

</field>

</page>
<page string="Production to QC"  invisible="fg_option">
<field name="line_ids">
<tree editable="bottom" >
<field name="production_to_qc_transfer_on"/>

<field name="batch_no"/>
<field name="serial_no"/>
<field name="production_to_qc_transfer_qty"/>
<field name="production_to_qc_transfer_by" column_invisible="1"/>
<button name="send_to_qc_btn" invisible="production_to_qc_transfer_by" string="Move to QC" type="object" class="oe_highlight"/>

</tree>

</field>


</page>
<page string="Quality Inspection"  invisible="sfg_option">
<field name="line_ids">
<tree editable="bottom">
<field name="qc_report" string="QC Report"/>
<field name="batch_no"/>
<field invisible="show_serial == False" name="serial_no" widget="text" style="height: 100px; overflow-y: auto;" placeholder="Enter serial numbers one per line. 
Use 'to' for ranges (e.g., SOSMC250W2304BO1-000 to SOSMC250W2304BO1-100). 
If no 'to' is used, values will be stored as entered."/>
<field name="show_serial" column_invisible="1"/>
<button name="toggle_serial" type="object" string="Show/Hide Serial No's"/>
<field name="production_to_qc_transfer_qty" string="Received Qty"/>
<field name="qc_to_stores_transfer_qty"/>
<field name="qc_to_stores_rejected_qty"/>
</tree>
</field>

</page>
<page string="Quality Inspection"  invisible="fg_option">
<field name="line_ids">
<tree editable="bottom">
<field name="sfg_qc_report" string="QC Report"/>
<field name="batch_no"/>
<field invisible="show_serial == False" name="serial_no" widget="text" style="height: 100px; overflow-y: auto;" placeholder="Enter serial numbers one per line. 
Use 'to' for ranges (e.g., SOSMC250W2304BO1-000 to SOSMC250W2304BO1-100). 
If no 'to' is used, values will be stored as entered."/>
<field name="show_serial" column_invisible="1"/>
<button name="toggle_serial" type="object" string="Show/Hide Serial No's"/>
<field name="production_to_qc_transfer_qty" string="Received Qty"/>
<field name="sfg_qc_to_stores_transfer_qty"/>
<field name="sfg_qc_to_stores_rejected_qty"/>

</tree>

</field>

</page>
<page string="Stores Received" invisible="sfg_option">
<field name="line_ids">
<tree editable="bottom">
<field name="batch_no"/>
<field invisible="show_serial == False" name="serial_no" widget="text" style="height: 100px; overflow-y: auto;" placeholder="Enter serial numbers one per line. 
Use 'to' for ranges (e.g., SOSMC250W2304BO1-000 to SOSMC250W2304BO1-100). 
If no 'to' is used, values will be stored as entered."/>
<field name="show_serial" column_invisible="1"/>
<button name="toggle_serial" type="object" string="Show/Hide Serial No's"/>
<field name="qc_to_stores_transfer_qty" string="Received Qty"/>

<field name="stores_received_by"/>
<field name="stores_received_on"/>

</tree>

</field>


</page>  
<page string="Stores Received" invisible="fg_option">
<field name="line_ids">
<tree editable="bottom">
<field name="batch_no"/>
<field invisible="show_serial == False" name="serial_no" widget="text" style="height: 100px; overflow-y: auto;" placeholder="Enter serial numbers one per line. 
Use 'to' for ranges (e.g., SOSMC250W2304BO1-000 to SOSMC250W2304BO1-100). 
If no 'to' is used, values will be stored as entered."/>
<field name="show_serial" column_invisible="1"/>
<button name="toggle_serial" type="object" string="Show/Hide Serial No's"/>
<field name="sfg_qc_to_stores_transfer_qty" string="Received Qty"/>

<field name="sfg_stores_received_by"/>
<field name="sfg_stores_received_on"/>

</tree>

</field>


</page> 
<page string="Transaction Summary" invisible="sfg_option">
<field name="line_ids">
<tree editable="bottom">
 <field name="production_to_qc_transfer_qty" string="Production to QC Qty" decoration-info="True"/>
    <field name="production_to_qc_transfer_by" string="Transferred By" decoration-info="True"/>
    <field name="production_to_qc_transfer_on" string="Transferred On" decoration-info="True"/>

<field name="qc_to_stores_transfer_qty" string="QC to Stores Qty"  decoration-primary="True"/>
<field name="qc_to_stores_transfer_by"  string="Transfered By" decoration-primary="True"/>
<field name="qc_to_stores_transfer_on"  string="Transfered On" decoration-primary="True"/>

<field name="stores_received_by" string="Stores Received By" decoration-success="True"/>
<field name="stores_received_on" string="Received On" decoration-success="True"/>



</tree>

</field>
</page>  
<page string="Transaction Summary" invisible="fg_option">
<field name="line_ids">
<tree editable="bottom">
 <field name="production_to_qc_transfer_qty" string="Production to QC Qty" decoration-info="True"/>
    <field name="production_to_qc_transfer_by" string="Transferred By" decoration-info="True"/>
    <field name="production_to_qc_transfer_on" string="Transferred On" decoration-info="True"/>

<field name="sfg_qc_to_stores_transfer_qty" string="QC to Stores Qty"  decoration-primary="True"/>
<field name="sfg_qc_to_stores_transfer_by"  string="Transfered By" decoration-primary="True"/>
<field name="sfg_qc_to_stores_transfer_on"  string="Transfered On" decoration-primary="True"/>

<field name="sfg_stores_received_by" string="Stores Received By" decoration-success="True"/>
<field name="sfg_stores_received_on" string="Received On" decoration-success="True"/>



</tree>

</field>
</page>   
<page string="Specifications">
<field name="specification_line_ids">
<tree editable="bottom">
 <field name="specification"/>
 <field name="specification_value"/>
</tree>
</field>


</page>

        </notebook>


                    </sheet>
                </form>
        </field>
    </record>
<menuitem id="tc_menu"
              name="Transfer Challan (Indent)"
              parent="production_forms_menu_root" action="action_tc_form_list" groups="sos_inventory.sos_scg_group_manager,sos_inventory.sos_scg_group_user,sos_inventory.sos_production_user,sos_inventory.sos_qc_user,sos_inventory.sos_management_user"/>
              

</odoo>
