<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>

        <record model="ir.ui.view" id="view_bid_opening_search">
            <field name="name">bid.opening.search</field>
            <field name="model">bid.opening</field>
            <field name="arch" type="xml">
                <search string="Search Bid Opening">
                    <field name="competitor_id"/>
                    <field name="sale_order_id"/>

                    <group expand="0" string="Group By">
                        <filter name="competitor_id" string="Competitor" domain="[]" context="{'group_by': 'competitor_id'}"/>
                        <filter name="sale_order_id" string="Proposal" domain="[]" context="{'group_by': 'sale_order_id'}"/>
                    </group>

               </search>
            </field>
        </record>

        <record model="ir.ui.view" id="view_bid_opening_pivot">
            <field name="name">bid.opening.pivot</field>
            <field name="model">bid.opening</field>
            <field name="arch" type="xml">
                <pivot string="Sales Orders" sample="1">
                    <field name="competitor_id" type="row"/>
                    <field name="amount" type="measure"/>
                </pivot>
            </field>
        </record>


        <record model="ir.ui.view" id="view_bid_opening_graph">
            <field name="name">bid.opening.graph</field>
            <field name="model">bid.opening</field>
            <field name="arch" type="xml">
                <graph string="Sales Orders" sample="1">
                    <field name="competitor_id"/>
                    <field name="amount" type="measure"/>
                </graph>
            </field>
        </record>


        <record id="bid_opening_wiz_action" model="ir.actions.act_window">
            <field name="name">Bid Opening</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">bid.opening</field>
            <!-- <field name="view_id" ref="view_bid_opening_graph"/> -->
            <field name="view_mode">graph,pivot</field>
        </record>

        <menuitem
                id="bid_opening_report_menu"
                name="Bid Opening"
                parent="proposal_report_common_menu"
                sequence="0"
                action="bid_opening_wiz_action"
        />

    </data>
</odoo>