<odoo>
    <!-- Form View for FG Production Plan -->
    <record id="view_fg_production_plan_form" model="ir.ui.view">
        <field name="name">sos.indent.production.plan.form</field>
        <field name="model">sos_indent_production_plan</field>
        <field name="arch" type="xml">
            <form string="FG Production Plan">
                <sheet>
                    <div style="font-size: 22px; pointer-events: none; color: #793595;">
                        <field name="plan_ref_no" nolabel="1"/>
                    </div>

                            <notebook>
                                <page string="Week 1">
                                    <field name="line_ids">
                                        <tree editable="bottom">
                                            <field name="fg_name"/>
                                            <field name="qp_no"/>
                                            <field name="required_qty"/>
                                            <field name="target_date"/>
                                            <field name="planned_week_1"/>
                                            <field name="actual_week_1"/>
                                            <field name="qc_week_1"/>
                                        </tree>
                                    </field>
                                </page>
                                <page string="Week 2">
                                    <field name="line_ids">
                                        <tree editable="bottom">
                                        <field name="fg_name"/>
                                            <field name="qp_no"/>
                                            <field name="required_qty"/>
                                            <field name="target_date"/>
                                            <field name="planned_week_2"/>
                                            <field name="actual_week_2"/>
                                            <field name="qc_week_2"/>
                                        </tree>
                                    </field>
                                </page>
                                <page string="Week 3">
                                    <field name="line_ids">
                                        <tree editable="bottom">
                                        <field name="fg_name"/>
                                            <field name="qp_no"/>
                                            <field name="required_qty"/>
                                            <field name="target_date"/>
                                            <field name="planned_week_3"/>
                                            <field name="actual_week_3"/>
                                            <field name="qc_week_3"/>
                                        </tree>
                                    </field>
                                </page>
                                <page string="Week 4">
                                    <field name="line_ids">
                                        <tree editable="bottom">
                                        <field name="fg_name"/>
                                            <field name="qp_no"/>
                                            <field name="required_qty"/>
                                            <field name="target_date"/>
                                            <field name="planned_week_4"/>
                                            <field name="actual_week_4"/>
                                            <field name="qc_week_4"/>
                                        </tree>
                                    </field>
                                </page>
                                <page string="Week 5">
                                    <field name="line_ids">
                                        <tree editable="bottom">
                                        <field name="fg_name"/>
                                            <field name="qp_no"/>
                                            <field name="required_qty"/>
                                            <field name="target_date"/>
                                            <field name="planned_week_5"/>
                                            <field name="actual_week_5"/>
                                            <field name="qc_week_5"/>
                                        </tree>
                                    </field>
                                </page>
                            </notebook>
                     
                </sheet>
            </form>
        </field>
    </record>

    <!-- Tree View for FG Production Plan -->
    <record id="view_fg_production_plan_tree" model="ir.ui.view">
        <field name="name">sos_indent_production_plan.tree</field>
        <field name="model">sos_indent_production_plan</field>
        <field name="arch" type="xml">
            <tree string="FG Production Plan">
                <field name="plan_ref_no"/>
            </tree>
        </field>
    </record>

    <!-- Action for FG Production Plan -->
    <record id="action_fg_production_plan" model="ir.actions.act_window">
        <field name="name">Production Plan</field>
        <field name="type">ir.actions.act_window</field>
        <field name="res_model">sos_indent_production_plan</field>
        <field name="view_mode">tree,form</field>
        <field name="view_id" ref="view_fg_production_plan_tree"/>
        <field name="help" type="html">
            <p class="o_view_nocontent_smiling_face">
                No Plan Found
            </p>
        </field>
    </record>

    <!-- Menu Item for FG Production Plan -->
    <menuitem id="production_fg_plan_menu"
              name="Production Plan"
              parent="production_menu_root"
              action="action_fg_production_plan"/>
</odoo>
