<?xml version="1.0"?>
<form string="SMS">
                <header>
                    <field name="to_delete" invisible="1"/>
                    <button name="send" string="Send Now" type="object" invisible="state != 'outgoing' or to_delete" class="oe_highlight"/>
                    <button name="action_set_outgoing" string="Retry" type="object" invisible="state not in ('error', 'canceled')"/>
                    <button name="action_set_canceled" string="Cancel" type="object" invisible="state not in ('error', 'outgoing')"/>
                    <field name="state" widget="statusbar" statusbar_visible="outgoing,sent,error,canceled"/>
                </header>
                <sheet>
                    <group>
                        <group>
                            <field name="partner_id" string="Contact"/>
                            <field name="mail_message_id" readonly="1" invisible="not mail_message_id"/>
                        </group>
                        <group>
                            <field name="number" required="1"/>
                            <field name="failure_type" readonly="1" invisible="not failure_type"/>
                        </group>
                    </group>
                    <group>
                        <field name="body" widget="sms_widget" string="Message" required="1" readonly="state in ('process', 'sent')"/>
                    </group>
                </sheet>
            </form>
        