<?xml version="1.0"?>
<openerp>
<data>
    <menuitem name="Auction" id="auction_menu_root" icon="terp-purchase" sequence="26"
                groups="group_auction_manager,group_auction_user"/>
    <menuitem name="Configuration" parent="auction_menu_root" id="auction_config_menu" sequence="7" groups="group_auction_manager"/>
    <menuitem name="Tools Bar Codes" id="auction_outils_menu" parent="auction_menu_root" sequence="5" />
    <menuitem name="Deliveries Management" action="action_auction_taken" id="menu_wizard_emporte" parent="auction_outils_menu"/>

   <!--  Auction Management/Configuration/artist  -->

    <record model="ir.ui.view" id="view_auction_artist_tree">
        <field name="name">auction.artists.tree</field>
        <field name="model">auction.artists</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Artists">
                <field name="name"/>
                <field name="birth_death_dates"/>
            </tree>
        </field>
    </record>
    <record model="ir.ui.view" id="view_auction_artist_form">
        <field name="name">auction.artists.form</field>
        <field name="model">auction.artists</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Artists">
                <separator string="Author/Artist" colspan="4"/>
                <group colspan="4" col="6">
                    <field name="name" colspan="4" string="Name" select="1"/>
                    <newline/>
                    <field name="pseudo"/>
                    <field name="birth_death_dates"/>
                </group>
                <separator string="Biography" colspan="4"/>
                <field name="biography" nolabel="1" colspan="4"/>
            </form>
        </field>
    </record>
    <record model="ir.actions.act_window" id="action_auction_artist">
        <field name="name">Auction Artists</field>
        <field name="res_model">auction.artists</field>
        <field name="view_type">form</field>
        <field name="view_id" ref="view_auction_artist_tree"/>
    </record>
    <menuitem name="Artists" parent="auction_config_menu" action="action_auction_artist" id="menu_auction_artist"/>


  <!--  Auction Management/Configuration/objectcategories  -->

    <record model="ir.ui.view" id="view_auction_object_categories_tree">
        <field name="name">auction.lot.category.tree</field>
        <field name="model">auction.lot.category</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
           <tree string="Object Categories">
               <field name="name"/>
           </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="view_auction_object_categories_form">
        <field name="name">auction.lot.category.form</field>
        <field name="model">auction.lot.category</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
           <form string="Object Categories">
               <field name="name" colspan="4" select="1"/>
               <newline/>
               <field name="aie_categ" colspan="4"/>
               <field name="priority"/>
               <newline/>
               <field name="active"/>
           </form>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_auction_object_categories">
        <field name="name">Auction object Categories</field>
        <field name="res_model">auction.lot.category</field>
        <field name="view_type">form</field>
        <field name="view_id" ref="view_auction_object_categories_tree"/>
    </record>

    <menuitem name="Object Categories" parent="auction_config_menu" action="action_auction_object_categories"
                id="menu_auction_object_cat" groups="group_auction_manager"/>

   <!--  Auction Management/Auction Dates/New Auction Dates  -->

    <record model="ir.ui.view" id="view_auction_dates_tree">
        <field name="name">Auction dates</field>
        <field name="model">auction.dates</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Auction Dates">
               <field name="auction1" string="Beginning of the auction"/>
               <field name="auction2" string="End of auction"/>
               <field name="name" string="Names"/>
               <field name="state"/>
            </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="view_auction_dates_form">
        <field name="name">Auction dates</field>
        <field name="model">auction.dates</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Auctions">
                <field name="name" colspan="2" select="1"/>
                <notebook colspan="4">
                    <page string="Auction Dates">
                        <group colspan="4" col="4">
                            <group colspan="2" col="2">
                                <separator string="Exposition Dates" colspan="4"/>
                                <field name="expo1"/>
                                <field name="expo2"/>
                            </group>
                            <group colspan="2" col="2">
                                <separator string="Auction Dates" colspan="4"/>
                                <field name="auction1" select="1"/>
                                <field name="auction2" select="1"/>
                            </group>
                        </group>
                        <separator string="" colspan="4"/>
                        <field name="state"/>
                        <button name="close" states="draft" string="Create Invoices" type="object" colspan="2" icon="terp-gtk-go-back-rtl"/>
                    </page>
                    <page string="Accounting" >
                        <group colspan="4" col="4">
                            <group colspan="2" col="2">
                                <separator string="Accounting" colspan="4"/>
                                <field name="acc_expense" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
                                <field name="acc_income" domain="[('type','&lt;&gt;','view'),('type','&lt;&gt;','consolidation')]"/>
                            </group>
                            <group colspan="2" col="2">
                                <separator string="Analytic" colspan="4"/>
                                <field name="journal_id"/>
                                <field name="journal_seller_id"/>
                                <field name="account_analytic_id" groups="analytic.group_analytic_accounting"/>
                            </group>
                        </group>
                    </page>
                    <page string="Commissions">
                        <group col="4" colspan="4" expand="1">
                            <group col="2" colspan="4">
                               <separator string="Buyer Commissions" colspan="4"/>
                                <field name="buyer_costs" domain="[('parent_id','=',False),('domain','=','auction'),('type_tax_use','&lt;&gt;','sale')]" nolabel="1" colspan="4"/>
                             </group>
                             <group col="2" colspan="4">
                                 <separator string="Seller Commissions" colspan="4"/>
                                 <field name="seller_costs" domain="[('parent_id','=',False),('domain','=','auction'),('type_tax_use','&lt;&gt;','purchase')]" nolabel="1" colspan="4"/>
                             </group>
                        </group>
                    </page>
                    <page string="History">
                        <group colspan="4" col="4">
                            <group colspan="2" col="2">
                                <separator string="Buyer Invoices" colspan="2"/>
                                <field name="buyer_invoice_history" nolabel="1" widget="one2many_list"
                                        height="400">
                                    <tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
                                        <field name="date_invoice"/>
                                        <field name="number"/>
                                        <field name="partner_id" groups="base.group_user"/>
                                        <field name="name"/>
                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                                        <field name="user_id"/>
                                        <field name="date_due"/>
                                        <field name="origin"/>
                                        <field name="state"/>
                                    </tree>
                                </field>
                            </group>
                            <group colspan="2" col="2">
                                <separator string="Seller Invoices" colspan="2"/>
                                <field name="seller_invoice_history" nolabel="1" widget="one2many_list"
                                        height="400">
                                    <tree colors="blue:state in ('draft');black:state in ('proforma','proforma2','open');gray:state in ('cancel')" string="Invoice">
                                        <field name="date_invoice"/>
                                        <field name="number"/>
                                        <field name="partner_id" groups="base.group_user"/>
                                        <field name="name"/>
                                        <field name="company_id" groups="base.group_multi_company" widget="selection"/>
                                        <field name="user_id"/>
                                        <field name="date_due"/>
                                        <field name="origin"/>
                                        <field name="state"/>
                                    </tree>
                                </field>
                            </group>
                        </group>
                    </page>
                </notebook>
            </form>
        </field>
    </record>

    <!-- Auction Dates Search view -->

    <record id="view_auction_dates_filter" model="ir.ui.view">
        <field name="name">Auction Dates search</field>
        <field name="model">auction.dates</field>
        <field name="type">search</field>
        <field name="arch" type="xml">
            <search string="Search Next Auction Dates">
                <filter icon="terp-document-new"
                    string="Draft"  help="Draft Auction"
                    name="draft"
                    domain="[('state','=', 'draft')]"/>
                <filter icon="terp-check"
                    string="Invoiced"  help="Invoiced Auction"
                    domain="[('state','=','closed')]"/>
                <separator orientation="vertical"/>
                <field name="name" string="Auction"/>
                <field name="state"/>
                <field name="auction1" string="First Auction Date"/>
                <field name="auction2" string="Last Auction Date"/>
                <newline/>
                <group expand="0" string="Group By..." colspan="16">
                    <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                    <separator orientation="vertical" />
                    <filter string="Auction Date"
                        icon="terp-go-month"
                        help="Auction Date" domain="[]"
                        context="{'group_by':'auction1'}" />
                </group>
            </search>
        </field>
    </record>

    <!-- Auction Dates Calendar View -->

    <record model="ir.ui.view" id="auction_dates_calendar_view">
        <field name="name">Auction Dates Calendar</field>
        <field name="model">auction.dates</field>
        <field name="type">calendar</field>
        <field name="priority" eval="2"/>
        <field name="arch" type="xml">
            <calendar string="Next Auction"
                date_start="auction1" color="">
                <field name="name" />
                <field name="auction1"/>
            </calendar>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_auction_dates_next">
        <field name="name">Auctions</field>
        <field name="res_model">auction.dates</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,calendar</field>
        <field name="search_view_id" ref="view_auction_dates_filter"/>
        <field name="context">{"search_default_draft": "1"}</field>
    </record>

    <act_window name="Open lots"
        context="{'search_default_auction_id': [active_id], 'default_auction_id': active_id}"
        res_model="auction.lots"
        src_model="auction.dates"
        id="act_auction_lot_line_open"/>


    <menuitem name="Auctions" parent="auction_menu_root" id="auction_date_menu" sequence="1"/>
    <menuitem name="Auctions" parent="auction_date_menu" id="menu_auction_dates_next1" action="action_auction_dates_next"/>


    <record model="ir.ui.view" id="view_auction_lot_tree">
        <field name="name">Auction lots</field>
        <field name="model">auction.lots</field>
        <field name="type">tree</field>
        <field name="priority" eval="1"/>
        <field name="arch" type="xml">
            <tree colors="blue:state in ('unsold','draft');black:state in ('sold','taken_away');gray:state in ('paid') " string="Objects">
                <field name="obj_num" string="Ref" select="1"/>
                <field name="name" select="1"/>
                <field name="ach_uid"/>
                <field name="obj_price" sum="Total Adj."/>
                <field name="bord_vnd_id"/>
                <field name="lot_num"/>
                <field name="auction_id"/>
                <field name="lot_type"/>
                <field name="state" select="1"/>
                <button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
                <button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
                <button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
                <button name="button_unpaid" string="Set to draft" states="sold,unsold,paid" type="object" icon="gtk-convert"/>
            </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="auction_lot_detailed">
        <field name="name">Auction lots</field>
        <field name="model">auction.lots</field>
        <field name="type">form</field>
        <field name="priority" eval="8"/>
        <field name="arch" type="xml">
            <form string="Objects">
              <group colspan="4" col="8">
                <field name="name" colspan="4"/>
                <field name="obj_num"/>
                <newline/>
                <field name="auction_id"/>
                <field name="lot_type"/>
                <field name="lot_local"/>
              </group>
              <notebook colspan="4">
                  <page string="Catalog">
                      <separator string="Inventory" colspan="2"/>
                      <group colspan="4" col="6">
                          <group colspan="2" col="4">
                            <field name="product_id" colspan="4"/>
                            <field name="lot_num" select="1" />
                            <field name="bord_vnd_id"/>
                          </group>
                          <group colspan="2" col="1">
                            <field name="image" widget='image' nolabel="1"/>
                          </group>
                      </group>
                      <group colspan="4" col="6">
                        <group colspan="2" col="2">
                            <separator string="Authors" colspan="4"/>
                            <field name="artist_id"/>
                            <field name="artist2_id"/>
                            <field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','&lt;&gt;','sale')]"/>
                        </group>
                        <group colspan="2" col="2">
                            <separator string="Price" colspan="4"/>
                            <field name="lot_est1"/>
                            <field name="lot_est2"/>
                            <field name="obj_price"/>
                            <field name="seller_price"/>
                            <field name="buyer_price"/>
                            <field name="obj_comm"/>
                        </group>
                        <group colspan="2" col="2">
                            <separator string="Statistical" colspan="4"/>
                            <field name="gross_revenue"/>
                            <field name="net_revenue"/>
                            <field name="gross_margin"/>
                            <field name="net_margin"/>
                            <field name="costs"/>
                        </group>
                      </group>
                      <group colspan="4" col="4">
                        <group colspan="2" col="4">
                            <separator string="Buyer Information" colspan="4"/>
                            <field name="ach_uid"/>
                            <field name="is_ok"/>
                            <field name="ach_login" />
                            <field name="paid_ach"/>
                            <field name="ach_inv_id"/>
                            <field name="ach_emp"/>
                        </group>
                        <group colspan="2" col="4">
                            <separator string="Seller Information" colspan="4"/>
                            <field name="seller_id"/>
                            <newline/>
                            <field name="vnd_lim"/>
                            <field name="vnd_lim_net"/>
                            <field name="sel_inv_id"/>
                            <field name="paid_vnd"/>
                        </group>
                    </group>
                       <group colspan="4" col="4">
                        <separator string="" colspan="4"/>
                        <field name="state" colspan="1"/>
                        <group col="8" colspan="2">
                            <button name="button_bought" string="Sold" states="draft" type="object" icon="gtk-jump-to"/>
                            <button name="button_not_bought" string="Not sold" states="draft" type="object" icon="gtk-undo"/>
                            <button name="button_taken_away" string="Taken away" states="sold" type="object" icon="gtk-goto-last"/>
                            <button name="button_unpaid" string="Set to draft" states="sold,unsold,paid" type="object" icon="gtk-convert"/>
                        </group>
                      </group>
                   </page>
                   <page string="Bids">
                       <field name="bid_lines" colspan="4" nolabel="1">
                            <tree string="Bids Details"  editable="top">
                                <field name="bid_id"/>
                                <field name="price"/>
                                <field name="call"/>
                            </tree>
                            <form string="Bids Details" >
                                <field name="bid_id"/>
                                <field name="lot_id" domain="[('auction_id','=',parent['auction_id'])]" on_change="onchange_name(lot_id)"/>
                                <field name="price"/>
                                <field name="call"/>
                            </form>
                        </field>
                    </page>
                    <page string="History" groups="base.group_extended">
                            <group colspan="2" col="2">
                                <field name="statement_id" domain="[('state','=','draft')]" colspan="4" nolabel="1"
                                    height="575" width="285" widget="one2many_list">
                                    <tree string="Buyer's Payment History">
                                        <field name="statement_id"/>
                                        <field name="amount"/>
                                        <field name="date"/>
                                    </tree>
                                    <form string="Buyer's Payment History">
                                        <field name="name"/>
                                        <field name="sequence"/>
                                        <field name="date"/>
                                        <field name="partner_id"/>
                                        <field name="account_id"/>
                                        <field name="type"/>
                                        <field name="statement_id"/>
                                        <field name="amount"/>
                                    </form>
                                </field>
                            </group>
                            <group colspan="2" col="2">
                               <field name="history_ids" colspan="4" readonly="1" nolabel="1" height="575">
                                  <tree string="History">
                                     <field name="name"/>
                                     <field name="lot_id"/>
                                     <field name="auction_id"/>
                                     <field name="price"/>
                                  </tree>
                               </field>
                            </group>
                    </page>
                    <page string="Notes">
                        <field name="obj_desc" colspan="4" nolabel="1"/>
                    </page>
                </notebook>
           </form>
        </field>
    </record>

    <record id="view_auction_lots_filter" model="ir.ui.view">
         <field name="name">Auction Lots search</field>
         <field name="model">auction.lots</field>
         <field name="type">search</field>
         <field name="arch" type="xml">
             <search string="Search Auction Lots">
                 <filter icon="terp-document-new"
                     string="Draft"  help="New Object"
                     name="draft"
                     domain="[('state','=', 'draft')]"/>
                 <filter icon="terp-dolar"
                     string="Sold"  help="Buy object"
                     domain="[('state','=','sold')]"/>
                 <separator orientation="vertical"/>
                 <field name="name"/>
                 <field name="ach_uid"/>
                 <field name="bord_vnd_id"/>
                 <field name="state"/>
                 <newline/>
                 <group expand="0" string="Group By..." colspan="16">
                     <filter string="Buyer"
                         icon="terp-personal"
                         help="Buyer" domain="[]"
                         context="{'group_by':'ach_uid'}"/>
                     <separator orientation="vertical" />
                     <filter string="Auction"
                         icon="terp-purchase"
                         help="Auction" domain="[]"
                         context="{'group_by':'auction_id'}"/>
                     <filter string="Inventory"
                         icon="terp-purchase"
                         help="Depositer Inventory" domain="[]"
                         context="{'group_by':'bord_vnd_id'}"/>
                     <separator orientation="vertical" />
                     <filter string="State" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}"/>
                     <filter string="Type"
                         icon="terp-stock_symbol-selection"
                         help="Object Category" domain="[]"
                         context="{'group_by':'lot_type'}"/>
                 </group>
             </search>
        </field>
    </record>

  <!-- Graph view for Auction Lots -->

    <record model="ir.ui.view" id="auction_lot_graph">
        <field name="name">Auction lots</field>
        <field name="model">auction.lots</field>
        <field name="type">graph</field>
        <field name="arch" type="xml">
            <graph string="Lots" type="bar">
                <field name="lot_type"/>
                <field name="lot_est1" operator="+"/>
                <field name="lot_est2" operator="+"/>
                <field name="obj_price" operator="+"/>
            </graph>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_all_objects">
        <field name="name">Objects</field>
        <field name="res_model">auction.lots</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,graph</field>
        <field name="search_view_id" ref="view_auction_lots_filter"/>
        <field name="context">{"search_default_draft": "1"}</field>
    </record>

    <!-- Action for Bids -->

    <act_window name="Open Bids"
        context="{'search_default_lot_id': [active_id], 'default_lot_id': active_id}"
        res_model="auction.bid_line"
        src_model="auction.lots"
        id="act_auction_lot_open_bid"/>

    <menuitem name="Objects" action="action_all_objects" parent="auction_date_menu" id="auction_all_objects_menu"/>

    <record model="ir.ui.view" id="view_deposit_border_form">
        <field name="name">auction.deposit.form</field>
        <field name="model">auction.deposit</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Deposit Border Form">
                <group colspan="4" col="6">
                   <field name="name" string="Reference"/>
                   <field name="date_dep"/>
                   <field name="partner_id"/>
                   <newline/>
                   <field name="method"/>
                   <field name="tax_id" domain="[('domain','=','auction'),('parent_id','=',False),('type_tax_use','&lt;&gt;','purchase')]"/>
                   <field name="transfer"/>
                </group>
               <notebook colspan="4">
                <page string="General Information">
                 <field name="lot_id" colspan="4" mode="tree,graph" nolabel="1">
                      <tree string="Objects">
                         <field name="lot_num"/>
                         <field name="obj_num"/>
                         <field name="auction_id"/>
                         <field name="name"/>
                         <field name="obj_price"/>
                         <field name="vnd_lim"/>
                         <field name="lot_est1"/>
                         <field name="lot_est2"/>
                      </tree>
                      <form string="Objects">
                          <notebook colspan="4">
                              <page string="Description">
                                <field name="auction_id" colspan="4"/>
                                <field name="lot_num"/>
                                <field name="obj_num"/>
                                <newline/>
                                <field name="name"/>
                                <field name="lot_type" select="1"/>
                                <field name="name2"/>
                                <newline/>
                                <field name="artist_id"/>
                                <field name="artist2_id"/>
                                <separator string="Objects Description" colspan="4"/>
                                <field name="obj_desc" colspan="4" nolabel="1"/>
                                <field name="vnd_lim"/>
                                <field name="vnd_lim_net"/>
                                <field name="lot_est1"/>
                                <field name="lot_est2"/>
                                <field name="author_right" domain="[('domain','=','sabam'),('parent_id','=',False),('type_tax_use','&lt;&gt;','sale')]"/>
                                <field name="product_id" domain="[('sale_ok','=',True)]"/>
                                <field name="state" readonly="1" colspan="4"/>
                              </page>
                              <page string="Photos">
                                  <field name="image" colspan="4" widget="image"/>
                              </page>
                          </notebook>
                      </form>
                 </field>
                </page>
              <page string="Extra Costs">
                 <field name="specific_cost_ids" widget="one2many_list" nolabel="1" colspan="4">
                    <tree string="Deposit Costs" editable="top">
                       <field name="name"/>
                       <field name="amount"/>
                       <field name="account" domain="[('type','=','income')]"/>
                    </tree>
                    <form string="Deposit Costs">
                       <field name="name"/>
                       <field name="amount"/>
                       <field name="account"/>
                    </form>
                 </field>
                </page>
               </notebook>
            </form>
        </field>
    </record>

    <record model="ir.ui.view" id="view_deposit_border_tree2">
        <field name="name">Deposit border</field>
        <field name="model">auction.deposit</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="">
                <field name="name"/>
                <field name="partner_id"/>
                <field name="date_dep"/>
                <field name="method"/>
                <field name="tax_id"/>
                <field name="info"/>
            </tree>
        </field>
    </record>

    <record id="view_deposit_border_filter" model="ir.ui.view">
         <field name="name">Deposit border</field>
         <field name="model">auction.deposit</field>
         <field name="type">search</field>
         <field name="arch" type="xml">
             <search string="Search Auction deposit">
                 <field name="name"/>
                 <field name="partner_id"/>
                 <field name="method"/>
                 <field name="date_dep"/>
                 <newline/>
                 <group expand="0" string="Group By..." colspan="16">
                     <filter string="Seller"
                         icon="terp-personal"
                         help="Seller" domain="[]"
                         context="{'group_by':'partner_id'}"/>
                     <separator orientation="vertical" />
                     <filter string="Withdrawned method"
                         icon="terp-purchase"
                         help="Withdrawned method" domain="[]"
                         context="{'group_by':'method'}"/>
                    <separator orientation="vertical" />
                    <filter string="Deposit Date"
                         icon="terp-go-month"
                         help="Deposit Date" domain="[]"
                         context="{'group_by':'date_dep'}"/>
                 </group>
             </search>
        </field>
    </record>

    <!-- Auction Deposit Calendar View -->

    <record model="ir.ui.view" id="auction_deposit_calendar_view">
        <field name="name">Deposit Border Calendar</field>
        <field name="model">auction.deposit</field>
        <field name="type">calendar</field>
        <field name="arch" type="xml">
            <calendar string="Deposit Border"
                date_start="date_dep" color="create_uid">
                <field name="partner_id" />
                <field name="date_dep"/>
            </calendar>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_deposit_border">
        <field name="name">Deposit border</field>
        <field name="res_model">auction.deposit</field>
        <field name="view_type">form</field>
        <field name="view_mode">tree,form,calendar</field>
        <field name="view_id" ref="view_deposit_border_tree2"/>
        <field name="search_view_id" ref="view_deposit_border_filter"/>
    </record>

    <menuitem name="Sellers" id="auction_seller_menu" parent="auction_menu_root" sequence="3"/>
    <menuitem name="Deposit border" parent="auction_seller_menu" action="action_deposit_border" id="menu_auction_deposit_border"/>

    <!-- Bids Lines View -->

    <record model="ir.ui.view" id="view_bids_tree">
        <field name="name">auction.bid_line.tree1</field>
        <field name="model">auction.bid_line</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Bids">
                <field name="bid_id"/>
                <field name="price"/>
                <field name="call"/>
                <field name="auction"/>
            </tree>
        </field>
    </record>

    <record model="ir.ui.view" id="view_bids_form">
        <field name="name">auction.bid_line.form1</field>
        <field name="model">auction.bid_line</field>
        <field name="type">form</field>
        <field name="arch" type="xml">
            <form string="Bids">
                <field name="bid_id" select="1"/>
                <field name="lot_id" domain="[('auction_id','=',parent['auction_id'])]" on_change="onchange_name(lot_id)" colspan="4"/>
                <field name="call" colspan="4" select="1"/>
                <field name="price"/>
            </form>
        </field>
    </record>

<!-- BidS View -->

    <record model="ir.ui.view" id="v19">
        <field name="name">auction.bid.form</field>
        <field name="model">auction.bid</field>
        <field name="arch" type="xml">
            <form string="Bids">
                <group colspan="4" col="6">
                    <field name="name"/>
                    <field name="auction_id"/>
                    <field name="contact_tel"/>
                    <newline/>
                    <field name="partner_id" on_change="onchange_contact(partner_id)" colspan="4"/>
                </group>
                <field name="bid_lines" colspan="4" nolabel="1">
                    <tree string="Bids Lines" editable="bottom">
                        <field name="lot_id" domain="[('auction_id','=',parent.auction_id)]"/>
                        <field name="price"/>
                        <field name="call"/>
                    </tree>
                    <form string="Bids Lines">
                        <field name="lot_id" domain="[('auction_id','=',parent.auction_id)]"/>
                        <field name="price"/>
                        <field name="call"/>
                    </form>
                </field>
            </form>
        </field>
    </record>

    <record model="ir.ui.view" id="view_auction_bid_tree">
        <field name="name">auction.bid.tree</field>
        <field name="model">auction.bid</field>
        <field name="type">tree</field>
        <field name="arch" type="xml">
            <tree string="Bids">
                <field name="name"/>
                <field name="auction_id"/>
                <field name="partner_id"/>
                <field name="contact_tel"/>
            </tree>
        </field>
    </record>


    <record id="view_auction_bid_filter" model="ir.ui.view">
         <field name="name">Auction Bid</field>
         <field name="model">auction.bid</field>
         <field name="type">search</field>
         <field name="arch" type="xml">
             <search string="Search Auction Bid">
                 <field name="name"/>
                 <field name="auction_id"/>
                 <field name="partner_id"/>
                 <field name="contact_tel"/>
                 <newline/>
                 <group expand="0" string="Group By..." colspan="16">
                     <filter string="Buyer"
                         icon="terp-personal"
                         help="Buyer" domain="[]"
                         context="{'group_by':'partner_id'}"/>
                     <separator orientation="vertical" />
                     <filter string="Auction"
                         icon="terp-purchase"
                         help="Auction" domain="[]"
                         context="{'group_by':'auction_id'}"/>
                 </group>
             </search>
        </field>
    </record>

    <record model="ir.actions.act_window" id="action_bid_open">
        <field name="name">Open Bids</field>
        <field name="res_model">auction.bid</field>
        <field name="view_mode">tree,form</field>
    </record>

    <menuitem name="Buyers" id="auction_buyers_menu" parent="auction_menu_root" sequence="4"/>
    <menuitem name="Bids" parent="auction_buyers_menu" action="action_bid_open" id="menu_action_bid_open"/>

    <menuitem name="Reporting" id="auction_report_menu" parent="auction_menu_root" sequence="6" groups="group_auction_manager"/>

    <act_window name="Deposit slip"
        context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
        res_model="auction.deposit"
        src_model="res.partner"
        id="act_auction_lot_open_deposit"/>

</data>
</openerp>

