[FORWARD] Forward port of addons 7.0 until revision 9008
[odoo/odoo.git] / addons / crm_claim / crm_claim_view.xml
index 0c1b063..78e467a 100644 (file)
@@ -4,7 +4,7 @@
 
         <menuitem id="menu_config_claim" name="Claim"
             groups="base.group_no_one"
-            parent="base.menu_base_config" sequence="55" />
+            parent="base.menu_base_config" sequence="55"/>
 
         <!-- Claims categories  -->
 
             <field name="view_id" ref="crm.crm_case_categ_tree-view"/>
             <field name="domain">[('object_id.model', '=', 'crm.claim')]</field>
             <field name="context" eval="{'object_id': ref('model_crm_claim')}"/>
-            <field name="help">Create claim categories to better manage and classify your claims. Some example of claims can be: preventive action, corrective action.</field>
+            <field name="help" type="html">
+              <p class="oe_view_nocontent_create">
+                Click to create a claim category.
+              </p><p>
+                Create claim categories to better manage and classify your
+                claims. Some example of claims can be: preventive action,
+                corrective action.
+              </p>
+            </field>
         </record>
 
         <menuitem action="crm_claim_categ_action" name="Categories"
 
         <!-- Claim Stages -->
 
+        <record id="crm_claim_stage_tree" model="ir.ui.view">
+            <field name="name">crm.claim.stage.tree</field>
+            <field name="model">crm.claim.stage</field>
+            <field name="arch" type="xml">
+                <tree string="Claim Stages">
+                    <field name="sequence"/>
+                    <field name="name"/>
+                    <field name="state"/>
+                </tree>
+            </field>
+        </record>
+
+        <record id="crm_claim_stage_form" model="ir.ui.view">
+            <field name="name">crm.claim.stage.form</field>
+            <field name="model">crm.claim.stage</field>
+            <field name="arch" type="xml">
+                <form string="Claim Stage">
+                    <field name="name"/>
+                    <field name="case_default"/>
+                    <field name="sequence"/>
+                    <field name="state"/>
+                    <field name="case_refused"/>
+                    <field name="fold"/>
+                </form>
+            </field>
+        </record>
+
         <record id="crm_claim_stage_act" model="ir.actions.act_window">
             <field name="name">Claim Stages</field>
-            <field name="res_model">crm.case.stage</field>
+            <field name="res_model">crm.claim.stage</field>
             <field name="view_type">form</field>
-            <field name="view_id" ref="crm.crm_case_stage_tree"/>
-            <field name="context">{'search_default_claim':1}</field>
-            <field name="help">You can create claim stages to categorize the status of every claim entered in the system. The stages define all the steps required for the resolution of a claim.</field>
+            <field name="view_id" ref="crm_claim_stage_tree"/>
+            <field name="help" type="html">
+              <p class="oe_view_nocontent_create">
+                Click to setup a new stage in the processing of the claims. 
+              </p><p>
+                You can create claim stages to categorize the status of every
+                claim entered in the system. The stages define all the steps
+                required for the resolution of a claim.
+              </p>
+            </field>
         </record>
 
         <!-- Claims    -->
         <record model="ir.ui.view" id="crm_case_claims_tree_view">
             <field name="name">CRM - Claims Tree</field>
             <field name="model">crm.claim</field>
-            <field name="type">tree</field>
             <field name="arch" type="xml">
                 <tree string="Claims" colors="blue:state=='pending' and not(date_deadline and (date_deadline &lt; current_date));gray:state in ('close', 'cancel');red:date_deadline and (date_deadline &lt; current_date)">
                     <field name="name"/>
                     <field name="partner_id"/>
-                    <field name="user_id" />
+                    <field name="user_id"/>
                     <field name="date"/>
+                    <field name="stage_id"/>
                     <field name="date_action_next"/>
                     <field name="action_next"/>
-                    <field name="categ_id" string="Type" select="1"/>
-                    <field name="stage_id" invisible="1"/>
+                    <field name="categ_id" string="Type"/>
                     <field name="date_deadline" invisible="1"/>
                     <field name="date_closed" invisible="1"/>
-                    <field name="stage_id"/>
-                    <button name="case_open" string="Open"
-                        states="draft,pending" type="object"
-                        icon="gtk-go-forward" groups="base.group_no_one"/>
-                    <button name="case_close" string="Close"
-                        states="open,draft,pending" type="object"
-                        icon="gtk-close" groups="base.group_no_one"/>
+                    <field name="state" groups="base.group_no_one"/>
                 </tree>
             </field>
         </record>
         <record model="ir.ui.view" id="crm_case_claims_form_view">
             <field name="name">CRM - Claims Form</field>
             <field name="model">crm.claim</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
-                <form layout="manual">
-                <div class="oe_form_topbar">
-                    <button name="case_open" string="Open" type="object"
-                            states="draft,pending"/>
-                    <button name="case_close" string="Done" type="object"
-                            states="open,pending"/>
-                    <button name="case_reset" string="Reset to Draft" type="object"
-                            states="cancel,done"/>
-                    <button name="case_cancel" string="Cancel" type="object"
+                <form string="Claim" version="7.0">
+                <header>
+                    <button name="case_close" string="Settle" type="object" class="oe_highlight"
+                            states="draft,open,pending" groups="base.group_user"/>
+                    <button name="case_cancel" string="Reject" type="object" groups="base.group_user"
                             states="draft,open,pending"/>
-                    <div class="oe_right">
-                        <field name="stage_id" nolabel="1" widget="statusbar"
-                            on_change="onchange_stage_id(stage_id)"/>
-                    </div>
-                    <div class="oe_clear"/>
-                </div>
-                <sheet string="Claims" layout="auto">
+                    <field name="stage_id" widget="statusbar" clickable="True"/>
+                </header>
+                <sheet string="Claims">
                     <group>
-                        <field name="name" />
+                        <field name="name"/>
                         <field name="date"/>
                     </group>
-                    <group colspan="4" col="6">
+                    <group colspan="4" col="4"  groups="base.group_user">
                         <field name="user_id"/>
-                        <field name="section_id" widget="selection" />
-                        <field name="state" groups="base.group_no_one"/>
-                        <newline />
                         <field name="priority"/>
+                        <field name="section_id" groups="base.group_multi_salesteams"/>
                         <field name="date_deadline"/>
+                        <field name="state" groups="base.group_no_one"/>
                     </group>
                     <group colspan="4" col="4">
                         <notebook>
                             <page string="Claim Description">
-                                <group colspan="2" col="2">
+                                <group colspan="2" col="2" groups="base.group_user">
                                     <separator colspan="2" string="Claim Reporter"/>
                                     <field name="partner_id" string="Partner"
-                                        on_change="onchange_partner_id(partner_id)" />
+                                        on_change="onchange_partner_id(partner_id)"/>
                                     <field name="partner_phone"/>
                                     <field name="email_from" widget="email"/>
                                 </group>
-                                <group colspan="2" col="2">
+                                <group colspan="2" col="2" groups="base.group_user">
                                     <separator colspan="2" string="Responsibilities"/>
                                     <field name="user_fault"/>
                                     <field name="categ_id" widget="selection"
-                                        domain="[('object_id.model', '=', 'crm.claim')]" />
+                                        domain="[('object_id.model', '=', 'crm.claim')]"/>
                                     <field name="ref"/>
                                 </group>
-                                <separator colspan="4" string="Claim/Action Description"/>
+                                <separator colspan="4" string="Claim/Action Description" groups="base.group_user"/>
                                 <field name="description" colspan="4" nolabel="1"/>
                             </page>
-                            <page string="Follow Up">
+                            <page string="Follow Up" groups="base.group_user">
                                 <group colspan="2" col="2">
                                     <separator colspan="2" string="Actions"/>
                                     <field name="date_action_next"/>
                                     <field name="resolution" colspan="2" nolabel="1"/>
                                 </group>
                             </page>
-                            <page string="Communication &amp; History">
-                                <group colspan="4">
-                                    <field colspan="4" name="email_cc" string="Global CC" widget="char"/>
-                                </group>
-                                <field name="message_ids" colspan="4" nolabel="1" mode="tree" readonly="1">
-                                    <tree string="History">
-                                        <field name="display_text" string="History Information"/>
-                                        <field name="email_from" invisible="1"/>
-                                        <button
-                                            string="Reply" attrs="{'invisible': [('email_from', '=', False)]}"
-                                            name="%(mail.action_email_compose_message_wizard)d"
-                                            context="{'mail.compose.message.mode':'reply'}"
-                                            icon="terp-mail-replied" type="action" />
-                                    </tree>
-                                </field>
-                                <button string="Add Internal Note"
-                                    name="%(crm.action_crm_add_note)d"
-                                    context="{'model': 'crm.lead' }"
-                                    icon="terp-document-new" type="action" />
-                                <button string="Send New Email"
-                                    name="%(mail.action_email_compose_message_wizard)d"
-                                    icon="terp-mail-message-new" type="action"/>
-                            </page>
                         </notebook>
                     </group>
                 </sheet>
+                <div class="oe_chatter">
+                    <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
+                    <field name="message_ids" widget="mail_thread"/>
+                </div>
                 </form>
             </field>
         </record>
         <record model="ir.ui.view" id="crm_case_claims_calendar_view">
             <field name="name">Claims Actions</field>
             <field name="model">crm.claim</field>
-            <field name="type">calendar</field>
             <field name="priority" eval="2"/>
             <field name="arch" type="xml">
                 <calendar string="Claims" date_start="date_action_next" color="user_id">
         <record id="view_crm_case_claims_filter" model="ir.ui.view">
             <field name="name">CRM - Claims Search</field>
             <field name="model">crm.claim</field>
-            <field name="type">search</field>
             <field name="arch" type="xml">
                 <search string="Search Claims">
-                    <filter icon="terp-check" string="New" name="current"
-                        domain="[('state','=','draft')]"
-                        help="New Claims" />
-                    <filter icon="terp-camera_test"
-                        string="In Progress"
-                        domain="[('state','=','open')]"
-                        help="In Progress Claims"
-                    />
-                    <filter icon="terp-gtk-media-pause"
-                        string="Pending"
-                        domain="[('state','=','pending')]"
-                        help="All pending Claims"
-                    />
-                    <separator orientation="vertical"/>
-                    <field name="name"/>
+                    <field name="name" string="Claims"/>
+                    <filter icon="terp-check" string="New" name="current" domain="[('state','=','draft')]" help="New Claims"/>
+                    <filter icon="terp-camera_test" string="In Progress" domain="[('state','=','open')]" help="In Progress Claims"/>
+                    <filter icon="terp-gtk-media-pause" string="Pending" domain="[('state','=','pending')]"/>
+                    <separator/>
+                    <filter string="Unassigned Claims" icon="terp-personal-" domain="[('user_id','=', False)]" help="Unassigned Claims" />
                     <field name="partner_id"/>
-                    <field name="user_id" widget="selection">
-                            <filter icon="terp-personal-"
-                                domain="[('user_id','=', False)]"
-                                help="Unassigned Claims" />
-                    </field>
-                    <newline/>
+                    <field name="user_id"/>
                     <group expand="0" string="Group By...">
-                        <filter string="Partner" icon="terp-partner"
-                            domain="[]" help="Partner"
-                            context="{'group_by':'partner_id'}" />
-                        <filter string="Responsible" icon="terp-personal"
-                            domain="[]" help="Responsible User"
-                            context="{'group_by':'user_id'}" />
-                        <separator orientation="vertical"/>
-                        <filter string="Stage" icon="terp-stage"
-                            domain="[]" context="{'group_by':'stage_id'}" />
-                        <filter string="Type" icon="terp-stock_symbol-selection"
-                            domain="[]" context="{'group_by':'categ_id'}" />
-                        <filter string="Status"
-                            icon="terp-stock_effects-object-colorize"
-                            domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
-                        <separator orientation="vertical"/>
-                        <filter string="Claim Date" icon="terp-go-month"
-                            domain="[]" help="Claim Date"
-                            context="{'group_by':'date'}" />
-                        <filter string="Deadline" icon="terp-go-month"
-                            domain="[]"
-                            context="{'group_by':'date_deadline'}" />
-                        <filter string="Closure" icon="terp-go-month"
-                            domain="[]" help="Date Closed"
-                            context="{'group_by':'date_closed'}"  groups="base.group_no_one"/>
+                        <filter string="Partner" icon="terp-partner" domain="[]" help="Partner" context="{'group_by':'partner_id'}"/>
+                        <filter string="Responsible" icon="terp-personal" domain="[]" help="Responsible User" context="{'group_by':'user_id'}"/>
+                        <filter string="Stage" icon="terp-stage" domain="[]" context="{'group_by':'stage_id'}"/>
+                        <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'categ_id'}"/>
+                        <filter string="Status" icon="terp-stock_effects-object-colorize" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
+                        <filter string="Claim Date" icon="terp-go-month" domain="[]" help="Claim Date" context="{'group_by':'date'}"/>
+                        <filter string="Deadline" icon="terp-go-month" domain="[]" context="{'group_by':'date_deadline'}"/>
+                        <filter string="Closure" icon="terp-go-month" domain="[]" help="Date Closed" context="{'group_by':'date_closed'}"  groups="base.group_no_one"/>
                     </group>
                 </search>
             </field>
         </record>
 
-        <record id="base.view_crm_partner_info_History1" model="ir.ui.view">
-            <field name="name">res.partner.crm.history.inherit1</field>
-            <field name="model">res.partner</field>
-            <field name="type">form</field>
-            <field name="inherit_id" ref="base.view_partner_form"/>
-            <field name="arch" type="xml">
-                <xpath expr="/form/notebook/page[@string='History']" position="attributes">
-                    <attribute name="invisible">False</attribute>
-                </xpath>
-            </field>
-        </record>
         <record id="view_claim_partner_info_form1" model="ir.ui.view">
             <field name="name">res.partner.claim.info.form</field>
             <field name="model">res.partner</field>
-            <field name="type">form</field>
             <field name="inherit_id" ref="base.view_partner_form"/>
             <field name="priority">20</field>
             <field name="arch" type="xml">
-                <data>
-                    <xpath expr="/form/notebook/page[@string='History']" position="inside">
+                <xpath expr="//page[@name='page_history']" position="attributes">
+                    <attribute name="invisible">False</attribute>
+                </xpath>
+                <xpath expr="//page[@name='page_history']" position="inside">
+                    <group name="grp_claim" string="Claims">
                         <field name="claims_ids" colspan="4" nolabel="1">
                             <tree string="Partners Claim" editable="bottom">
                                 <field name="name"/>
                             </tree>
                         </field>
-                    </xpath>
-                </data>
+                    </group>
+                </xpath>
             </field>
         </record>