<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<record id="sos_sfg_outsourcing_return_register_view_panel" model="ir.ui.view">
<field name="name">sos_sfg_outsourcing_return_register.search</field>
<field name="model">sos_sfg_outsourcing_return_register</field>
<field name="arch" type="xml">
<search position="inside">

 <field name="iqi_no" string="IQI No"/>
</search>
</field>
</record>
    <record id="sos_sfg_outsourcing_return_register_view_tree" model="ir.ui.view">
        <field name="name">sos_sfg_outsourcing_return_register.view.tree</field>
        <field name="model">sos_sfg_outsourcing_return_register</field>
        <field name="arch" type="xml">

            <tree>
                   <field name="iqi_no"/>
                    <field name="iqi_date"/>
                    <field name="goods_type"/>
                    <field name="returned_qty"/>
                    <field name="remarks"/>
                    <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="action_rerurn_form_list" model="ir.actions.act_window">
    <field name="name">Return Register</field>
    <field name="type">ir.actions.act_window</field>
    <field name="res_model">sos_sfg_outsourcing_return_register</field>
    <field name="view_mode">tree,form,kanban</field>
    <field name="view_id" ref="sos_sfg_outsourcing_return_register_view_tree"/>
</record>
       <record id="sos_sfg_outsourcing_return_register_form_view" model="ir.ui.view">
      <field name="name">Form</field>
        <field name="model">sos_sfg_outsourcing_return_register</field>
        <field name="arch" type="xml">
            <form>
            <sheet>
                <h2 style="text-align: center;text-transform: uppercase;text-shadow: 1px 1p 1px #140718;color: #65407c;padding:5px;">Return Register</h2><hr></hr><br></br>
        <group>
        <group>
        <field name="orr_no"/>
        <field name="iqi_no"/>
         <field name="goods_type"/>
        <field name="service_provider_name" invisible="goods_type != 'SFG'"/>
        <field name="supplier_name" invisible="goods_type != 'Materials'"/>
        <field name="returned_qty"/>
        </group>
        <group>
        <field name="iqi_date"/>
        <field name="sfg_name" invisible="goods_type != 'SFG'"/>
        <field name="material_name" invisible="goods_type != 'Materials'"/>
        <field name="remarks"/>
        </group>
        </group>
                </sheet>
            </form>
        </field>
    </record>

  <menuitem id="return_register_menu"
              name="Material / SFG Rework Register"
              parent="scg_forms_menu_root" action="action_rerurn_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>
