<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        
        <!--  Numerotation (per lot) -->
        
        <record id="view_auction_numerotate" model="ir.ui.view">
            <field name="name">auction.lots.numerotate.open</field>
            <field name="model">auction.lots.numerotate</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
				<form string="Catalog Numerotation" >
				    <separator string="Object Reference" colspan="4"/>
				    <field name="bord_vnd_id"/>
				    <newline/>
				    <field name="lot_num" readonly="False" required="True"/>
				    <separator colspan="4"/>
				    <group col="4" colspan="4">
				    	<button icon='gtk-cancel' special="cancel"
                			string="Exit" />
                		<button name="test_exist" string="Continue"
                			colspan="2" type="object" icon="gtk-go-forward" />
				    </group>
				</form>
			</field>
		</record>
        
        <act_window name="Numerotation (per lot)"
            res_model="auction.lots.numerotate"
            src_model="auction.lots"
            view_id="view_auction_numerotate"
		    view_mode="form"
		    target="new"        
            key2="client_action_multi"    
		    id="action_view_auction_lots_numerotate"/>
        
		<record id="view_auction_lots_numerotate_second" model="ir.ui.view">
            <field name="name">auction.lots.numerotate.second</field>
            <field name="model">auction.lots.numerotate</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
				<form string="Catalog Numerotation" >
		            <group>
				        <separator string="Object Reference" colspan="4"/>
				        <field name="bord_vnd_id" readonly="1"/>
				        <field name="lot_num" readonly="1"/>
				        <field name="name" readonly="1" colspan="3"/>
				        <field name="obj_desc" readonly="1" colspan="3"/>
				        <field name="lot_est1" readonly="1"/>
				        <field name="lot_est2" readonly="1"/>
				        <separator string="Object Reference" colspan="4"/>
				        <field name="obj_num"/>
				    </group>
				    <newline/>
				    <separator colspan="4"/>
				    <group col="4" colspan="4">
				    	<button icon='gtk-cancel' special="cancel"
                			string="Exit" />
                		<button name="open_init_form" string="Back" type="object"
                			icon="gtk-go-back"/>
                		<button name="numerotate" string="Numerotate"
                			type="object" icon="gtk-go-forward"/>
				    </group>
				</form>
			</field>
		</record>
		
		<record id="action_auction_lots_numerotate" model="ir.actions.act_window">
            <field name="name">Numerotation (per lot)</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">auction.lots.numerotate</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_auction_lots_numerotate_second"/>
            <field name="target">new</field>            
        </record>
		
		<record id="view_auction_numerotate_not_exist" model="ir.ui.view">
            <field name="name">auction.lots.numerotate.not_exist</field>
            <field name="model">auction.lots.numerotate</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
				<form string="Catalog Numerotation">
				    <label string="This lot does not exist !" colspan="4"/>
				    <group col="4" colspan="4">
				    	<button icon='gtk-cancel' special="cancel"
                			string="Exit" />
                		<button name="open_init_form" string="Retry" type="object"
                			icon="gtk-go-back"/>
                	</group>
				</form>
			</field>
		</record>
		
		<record id="action_auction_lots_numerotate_not_exist" model="ir.actions.act_window">
            <field name="name">Numerotation - Not Exist</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">auction.lots.numerotate</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="view_id" ref="view_auction_numerotate_not_exist"/>
            <field name="target">new</field>            
        </record>
		    
		<record id="view_auction_numerotate_cont" model="ir.ui.view">
            <field name="name">Numerotation (automatic)</field>
            <field name="model">auction.lots.numerotate_cont</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
				<form string="Catalog Numerotation" >
				    <field name="number" colspan="4"/>
				    <separator colspan="4"/>
				    <group col="4" colspan="4">
				    	<button icon='gtk-cancel' special="cancel"
                			string="Exit" />
                		<button name="numerotate_cont" string="Numerotation"
                			colspan="2" type="object" icon="gtk-go-forward" />
				    </group>
				</form>
			</field>
		</record>
		
		<act_window name="Numerotation (automatic)"
            res_model="auction.lots.numerotate_cont"
            src_model="auction.lots"
		    view_mode="form"
		    target="new"        
            key2="client_action_multi"    
		    id="action_view_auction_numerotate_cont"/>

	</data>
</openerp>
