<odoo>
    <!-- Form View for SOS Quote Generation Line -->
    <record id="view_sos_sfg_quote_generation_form" model="ir.ui.view">
        <field name="name">sos.sfg.quote.generation.form</field>
        <field name="model">sos_sfg_quote_generation</field>
        <field name="arch" type="xml">
            <form string="Quote Generation">
            <!-- <header>
                <button name="action_generate_quotation" type="object" string="Generate Quotation" class="btn-primary"/>
            </header> -->
                <sheet>
                  <div style="font-size: 22px;pointer-events: none;color: #793595;">
        <field name="plan_ref_no" nolabel="1" />
    </div>
                   <notebook>
    <page string="SFG Procurement Plan"  id="page1">
    <div style="float: right;margin-bottom:25px" >
     <button name="action_generate_quotation" type="object" string="Generate Quotation" class="btn-primary"/>
</div>
    <field name="line_ids">
        <tree editable="bottom"  create="false">
                        <field name="material_name"/>
                        <!-- <field name="purchase_type"/> -->
                        <field name="suppliers_ids" column_invisible="True"/>
                        <field name="supplier_name" widget="many2many_tags"/>
                        <field name="required_qty"/>
                        <field name="inprogress_qty"/>
                         <field name="status" widget="badge" decoration-success="status == 'close'" decoration-danger="status == 'open'"/>
    <field name="status" string="Change Status" groups="sos_inventory.sos_scg_group_manager"/>

                        </tree>
                    </field>
                    </page>
                      <page string="Quote Comparison">
    <field name="line_ids">
        <tree editable="bottom" create="false">
                        <field name="material_name"/>
                        <field name="supplier1_name" string="Provider 1"/>
                        <field name="supplier1_qty"/>
                        <field name="supplier1_quoted_price"/>
                        <field name="supplier2_name" string="Provider 2"/>
                        <field name="supplier2_qty"/>
                        <field name="supplier2_quoted_price"/>
                        <field name="supplier3_name" string="Provider 3"/>
                        <field name="supplier3_qty"/>
                        <field name="supplier3_quoted_price"/>
                   <field name="best_supplier" decoration-success="best_supplier"/>
                        </tree>
                    </field>
                    
                    </page>
                    <page string="WO Generation">
    <div style="float: right;margin-bottom:25px" >
     <button name="action_generate_wo" type="object" string="Generate WO" class="btn-primary"/>
</div>
    <field name="line_ids">
        <tree editable="bottom" create="false">
                        <field name="material_name"/>
                        <field name="available_suppliers" column_invisible="1"/>
                        <field name="final_supplier1_name" domain="[('id', 'in', available_suppliers)]" string="Service Provider Name"/>
                        <field name="final_supplier1_qty"/>
                        <field name="final_supplier1_quoted_price"/>
                        <!-- <field name="final_supplier2_name"/>
                        <field name="final_supplier2_qty"/>
                        <field name="final_supplier2_quoted_price"/> -->
     
                   
                        </tree>
                    </field>
                    </page>
                    </notebook>
                </sheet>
            </form>
        </field>
    </record>

    <!-- Tree View for SOS Quote Generation Line -->
    <record id="view_sos_sfg_quote_generation_tree" model="ir.ui.view">
        <field name="name">sos.sfg.quote.generation.tree</field>
        <field name="model">sos_sfg_quote_generation</field>
        <field name="arch" type="xml">
             <tree>
                <field name="plan_ref_no"/>
               
            </tree>
        </field>
    </record>

    <!-- Action for SOS Quote Generation Line -->
    <record id="action_sos_sfg_quote_generation" model="ir.actions.act_window">
        <field name="name">SFG Procurement Plan</field>
        <field name="res_model">sos_sfg_quote_generation</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="view_sos_sfg_quote_generation_tree"/>
    </record>

    <!-- Menu Item for SOS Quote Generation Line -->
    <menuitem id="menu_sos_sfg_quote_generation" name="SFG Procurement Plan" parent="scg_menu_root" action="action_sos_sfg_quote_generation"/>
</odoo>

