[Merge] Merge with trunk addons
[odoo/odoo.git] / addons / crm_claim / crm_claim_view.xml
index 39cc877..2b3f883 100644 (file)
@@ -2,6 +2,10 @@
 <openerp>
     <data>
 
+    <menuitem id="menu_config_claim" name="Claim"
+        groups="base.group_extended"
+        parent="base.menu_base_config" sequence="8" />
+
     <!-- Claims categories  -->
 
     <record id="crm_claim_categ_action" model="ir.actions.act_window">
@@ -13,8 +17,9 @@
         <field name="context">{'object_id':'crm.claim'}</field>
     </record>
 
-    <menuitem action="crm_claim_categ_action"
-        id="menu_crm_case_claim-act" parent="crm.menu_crm_case_categ" />
+    <menuitem action="crm_claim_categ_action" name="Categories"
+        id="menu_crm_case_claim-act" parent="menu_config_claim" />
+
 
     <!-- Claim Stages -->
 
@@ -27,8 +32,8 @@
         <field name="context">{'object_id':'crm.claim'}</field>
     </record>
 
-    <menuitem action="crm_claim_stage_act"
-            id="menu_crm_claim_stage_act" parent="crm.menu_crm_case_stage" />
+     <menuitem action="crm_claim_stage_act" name="Stages"
+            id="menu_crm_claim_stage_act" parent="menu_config_claim" />
 
     <!-- Claim Resource Type -->
 
@@ -41,9 +46,9 @@
         <field name="context">{'object_id':'crm.claim'}</field>
     </record>
 
-    <menuitem action="crm_claim_resource_act"
+     <menuitem action="crm_claim_resource_act" name="Resource Type"
             id="menu_crm_claim_stage_act"
-            parent="crm.menu_crm_case_resource_type" />
+            parent="menu_config_claim" />
 
         <!-- Claims    -->
 
                     <field name="create_date"/>
                     <field name="date_closed"/>
                     <field name="log_ids" nolabel="1" colspan="4">
-                        <form string="Actions">
+                        <tree string="Logs">
+                            <field name="name" colspan="4"/>
+                            <field name="date"/>
+                            <field name="user_id"/>
+                        </tree>
+                        <form string="Logs">
                             <separator string="Action Information" colspan="4"/>
                             <field name="name" colspan="4"/>
                             <field name="date"/>
-                            <field name="user_id"/>                            
+                            <field name="user_id"/>
                         </form>
                     </field>
                 </page>
                    <group colspan="4">
                        <field colspan="4" name="email_cc" string="CC"/>
                    </group>
-                    <field name="history_line" colspan="4" nolabel="1" mode="form,tree">
-                        <form string="Communication history">
-                            <group col="7" colspan="4">
-                                <field name="date"/>
-                                <field name="email_to"/>
-                                <field name="email_from"/>
-                               <button
-                                     string="Add a CC"
-                                               name="%(crm.action_view_crm_email_add_cc_wizard)d"
-                                               icon="gtk-add" type="action"/>
-                                   </group>
-                                   <newline/>
-                                   <field name="description" colspan="4" nolabel="1"/>
-                                   <button colspan="4"
-                                       string="Reply to Last Email"
-                                       name="%(action_crm_send_mail)d"
-                                       context="{'mail':'reply', 'model': 'crm.claim'}"
-                                       icon="gtk-undo" type="action" />
-                               </form>
-                               <tree string="Communication history">
-                                   <field name="description"/>
-                                   <field name="email_to"/>
-                                   <field name="date"/>
-                               </tree>
-                           </field>
-                           <button colspan="4" string="Send New Email"
-                               name="%(action_crm_send_mail)d"
-                               context="{'mail':'new', 'model': 'crm.claim'}"
-                               icon="gtk-go-forward" type="action" />
+                   <field name="message_ids" colspan="4" nolabel="1" mode="form,tree" height="280">
+                                <form string="Communication history">
+                                    <group col="6" colspan="4">
+                                        <field name="date"/>
+                                        <field name="email_to"/>
+                                        <field name="email_from"/>
+                                    </group>
+                                    <notebook colspan="4">
+                                        <page string="Details">
+                                            <field name="description" colspan="4" nolabel="1"/>
+                                        </page>
+                                        <page string="Attachments">
+                                            <field name="attachment_ids" colspan="4" readonly="1" nolabel="1"/>
+                                        </page>
+                                    </notebook>
+                                    <button colspan="4"
+                                    string="Reply to Last Email"
+                                    name="%(crm.action_crm_send_mail)d"
+                                    context="{'mail':'reply', 'model': 'crm.lead'}"
+                                    icon="gtk-undo" type="action" />
+                                </form>
+                                <tree string="Communication history">
+                                    <field name="date"/>
+                                    <field name="email_from" />
+                                    <field name="email_to"/>
+                                    <field name="description"/>
+                                </tree>
+                         </field>
+                   <button colspan="4" string="Send New Email"
+                       name="%(crm.action_crm_send_mail)d"
+                       context="{'mail':'new', 'model': 'crm.claim'}"
+                       icon="gtk-go-forward" type="action" />
                  </page>
                 </notebook>
 
             <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Search Claims">
-                   <filter icon="gtk-new" string="Current"
+                   <filter icon="gtk-new" string="Current" name="current"
                        domain="[('state','in',('draft', 'open'))]"
                        separator="1" help="Current Claims" default="1"
                    />
                    <field name="partner_id" select="1"/>
                    <field name="user_id" select="1" widget="selection">
                            <filter icon="terp-partner"
-                               domain="[('user_id','=',uid)]" help="My Claims"
-                               default="1" />
-                           <filter icon="terp-partner"
                                domain="[('user_id','=', False)]"
                                help="Unassigned Claims" />
                    </field>
                    <field name="section_id" select="1"
-                       widget="selection"
-                       default="context.get('section_id', False)">
-                       <filter icon="terp-crm"
-                           domain="[('section_id','=',context.get('section_id',False))]"
-                           help="My section" />
-                   </field>
+                       widget="selection"/>
                    <newline/>
-                   <group expand="1" string="Group By..." colspan="10" col="20">
+                   <group expand="1" string="Group By...">
                        <filter string="Deadline" icon="terp-crm"
                            domain="[]"
                            context="{'group_by':'date_deadline'}" />