<?xml version="1.0"?>
<odoo>

    <record model="workflow" id="wkf_reservation">
        <field name="name">hotel.reservation.basic</field>
        <field name="osv">hotel.reservation</field>
        <field name="on_create">True</field>
    </record>

    #----------------------------------------------
    # Activity
    #----------------------------------------------

    <record model="workflow.activity" id="act_draft">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="flow_start">True</field>
        <field name="name">draft</field>
    </record>
    <record model="workflow.activity" id="act_confirm">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="name">confirm</field>
        <field name="kind">function</field>
        <field name="action">confirmed_reservation()</field>
    </record>
    <record model="workflow.activity" id="act_done">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="name">done</field>
        <field name="flow_stop">True</field>
        <field name="kind">function</field>
        <field name="action">_create_folio()</field>
    </record>
     <record model="workflow.activity" id="act_checkin">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="name">checkin</field>
        <field name="kind">function</field>
        <field name="action">action_reservation_checkin()</field>
    </record>
    <record id="act_checkin" model="workflow.activity">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="name">checkin</field>
        <field name="kind">function</field>
        <field name="action">action_reservation_checkin()</field>
    </record>
    <record model="workflow.activity" id="act_cancelled">
        <field name="wkf_id" ref="wkf_reservation"/>
        <field name="name">cancelled</field>
        <field name="flow_stop">True</field>
        <field name="kind">function</field>
        <field name="action">action_cancel()</field>
    </record>

    <!--
      Transition
                  -->

    <record model="workflow.transition" id="t1">
        <field name="act_from" ref="act_draft" />
        <field name="act_to" ref="act_confirm" />
        <field name="signal">confirm</field>
    </record>
    <record model="workflow.transition" id="t2">
        <field name="act_from" ref="act_confirm" />
        <field name="act_to" ref="act_done" />
        <field name="signal">done</field>
    </record>
    <record model="workflow.transition" id="t2">
        <field name="act_from" ref="act_checkin" />
        <field name="act_from" ref="act_confirm" />
        <field name="act_to" ref="act_done" />
        <field name="signal">done</field>
    </record>
    <record model="workflow.transition" id="trans_reservation_confirm_to_checkin">
        <field name="act_from" ref="act_confirm"/>
        <field name="act_to" ref="act_checkin"/>
        <field name="signal">%(launch_checkin_wizard)d</field>
    </record>
    <record model="workflow.transition" id="hotel_reservation.t2">
        <field name="act_from" ref="act_checkin" />
        <field name="act_from" ref="act_confirm" />
        <field name="act_to" ref="act_done" />
        <field name="signal">done</field>
    </record>
    <record id="trans_reservation_confirm_to_checkin" model="workflow.transition">
        <field name="act_from" ref="act_confirm"/>
        <field name="act_to" ref="act_checkin"/>
        <field name="signal">%(launch_checkin_wizard)d</field>
    </record>

</odoo>
