[MERGE] OPW 32677: account_voucher: add missing type in 'line_{dr,cr}_ids' fields...
[odoo/odoo.git] / addons / event / event_view.xml
index 86c42ae..8062d2d 100644 (file)
                         <field name="note" colspan="4" nolabel="1"/>
                         <field name="state" select="1"/>
                         <group col="4" colspan="2">
-                           <button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
                            <button string="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
+                           <button string="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
                            <button string="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
-                           <button string="Set To Draft" name="button_draft" states="confirm,cancel,done" type="object" icon="gtk-convert"/>
+                           <button string="Set To Draft" name="button_draft" states="cancel" type="object" icon="gtk-convert"/>
                         </group>
                     </page>
                     <page string="Speakers">
             <field name="arch" type="xml">
                 <tree string="Events" colors="red:register_min>register_current;black:register_min&lt;=register_current">
                     <field name="name" string="Name"/>
-                    <field name="user_id"/>
                     <field name="main_speaker_id"/>
                     <field name="language"/>
                     <field name="type"/>
                     <field name="register_min"/>
                     <field name="register_current"/>
                     <field name="section_id" invisible="context.get('invisible_section', True)"/>
-                    <field name="state"/>
                     <field name="user_id"/>
+                    <field name="state"/>
                     <button string="Confirm Event" help="Confirm Event" name="button_confirm" states="draft" type="object" icon="gtk-apply"/>
                     <button string="Cancel Event" help="Cancel Event" name="button_cancel" states="draft,confirm" type="object" icon="gtk-cancel"/>
                     <button string="Event Done" help="Event Done" name="button_done" states="confirm" type="object" icon="gtk-jump-to"/>
                               domain="[('user_id','=',uid)]"/>
                         </field>
                         <field name="date_begin" select="1"/>
-                        <field name="state" select="1"/>
-                        <field name="section_id" default="context.get('section_id', False)" widget="selection" groups="base.group_extended">
+                        <field name="section_id" widget="selection" groups="base.group_extended">
                           <filter icon="terp-personal+"
                                   context="{'invisible_section': False}"
                                   domain="[('section_id.user_id','=',uid)]"
            <field name="view_mode">tree,form,calendar,graph</field>
            <field name="context">{"search_default_draft": "1", "search_default_section_id": section_id}</field>
            <field name="search_view_id" ref="view_event_search"/>
+           <field name="help">Event is the low level object used by meeting and others documents that should be synchronized with mobile devices or calendar applications through caldav. Most of the users should work in the Calendar menu, and not in the list of events.</field>
        </record>
 
       <act_window
             res_model="event.registration"
             src_model="event.event"
             view_mode="tree,form,calendar,graph"
-            context="{'search_default_event_id': active_id}"
+            context="{'search_default_event_id': active_id, 'default_event_id': active_id}"
             view_type="form"/>
 
       <act_window
             res_model="event.registration"
             src_model="res.partner"
             view_mode="tree,form,calendar,graph"
-            context="{'search_default_partner_id': [active_id]}"
+            context="{'search_default_partner_id': [active_id], 'default_partner_id': active_id}"
             view_type="form"/>
 
        <menuitem name="Events" id="menu_event_event" action="action_event_view" parent="base.menu_event_main" />
                         <field name="event_id" on_change="onchange_event(event_id, partner_invoice_id)" domain="[('state','in',('draft','confirm'))]"/>
                         <field name="create_date" string="Registration Date"/>
                         <field name="name"/>
-                        <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id,event_id)" />
-                        <field name="user_id"/>
+                        <field name="partner_id" attrs="{'readonly':[('state','!=', 'draft')]}" required="1" on_change="onchange_partner_id(partner_id,event_id)" />
+                        <field name="user_id" attrs="{'readonly':[('state','!=', 'draft')]}" />
                         <field name="tobe_invoiced"/>
                     </group>
                     <notebook colspan="4">
                                     </group>
                                     <notebook colspan="4">
                                         <page string="Details">
-                                            <group attrs="{'invisible': [('history', '!=', True)]}">
+                                            <group>
                                                 <field name="description" colspan="4" nolabel="1" height="250"/>
                                                 <button colspan="4"
                                                     string="Reply"
+                                                    attrs="{'invisible': [('history', '!=', True)]}"
                                                     name="%(crm.action_crm_send_mail)d"
                                                     context="{'mail':'reply', 'model': 'event.registration', 'include_original' : True}"
                                                     icon="terp-mail-replied" type="action" />
                                             </group>
-                                            <group attrs="{'invisible': [('history', '=', True)]}">
-                                                <field name="display_text" colspan="4" nolabel="1"  height="250"/>
-                                            </group>
                                         </page>
                                         <page string="Attachments">
                                             <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
             <field name="type">calendar</field>
             <field eval="2" name="priority"/>
             <field name="arch" type="xml">
-                <calendar color="event_id" date_start="date" date_delay="duration" string="Event Registration">
+                <calendar color="event_id" date_start="date" date_delay="date_closed" string="Event Registration">
                     <field name="event_id"/>
                     <field name="partner_invoice_id"/>
                 </calendar>