[IMP] remove subtype canceled & stage change
[odoo/odoo.git] / addons / analytic / analytic_view.xml
index 55a6416..1277d25 100644 (file)
@@ -5,36 +5,60 @@
         <record id="view_account_analytic_account_form" model="ir.ui.view">
             <field name="name">analytic.analytic.account.form</field>
             <field name="model">account.analytic.account</field>
-            <field name="type">form</field>
             <field name="arch" type="xml">
-                <form  layout="manual">
-                    <sheet string="Analytic account" layout="auto">
-                        <group colspan="4" col="4" class="oe_form_group_label_border">
-                            <field name="name" string="Contract/Project Name"/>
-                            <field name="partner_id" on_change="on_change_partner_id(partner_id)" required="True"/>
-                            <field name="code"/>
-                            <field name="user_id"/>
-                            <field name="company_id" on_change="on_change_company(company_id)" select="2" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
-                            <field name="type" select="2"/>
-                            <field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
+                <form string="Analytic Account" version="7.0">
+                    <sheet string="Analytic Account">
+                        <div class="oe_right oe_button_box" name="buttons">
+                        </div>
+
+                        <div class="oe_title">
+                        <label for="name" class="oe_edit_only"/>
+                            <h1>
+                                <field name="name" class="oe_inline"/>
+                            </h1>
+                            <div name="project"/>
+                        </div>
+
+                        <group name="main">
+                            <group>
+                                <field name="partner_id" on_change="on_change_partner_id(partner_id, name)"/>
+                                <field name="manager_id"/>
+                                <field name="currency_id" attrs="{'invisible': ['|',('type', '&lt;&gt;', 'view'), ('company_id', '&lt;&gt;', False)]}"/>
+                            </group>
+                            <group>
+                                <field name="code"/>
+                                <field name="type" invisible="context.get('default_type', False)"/>
+                                <field name="parent_id" on_change="on_change_parent(parent_id)" attrs="{'invisible': [('type','in',['contract','template'])]}"/>
+                                <field name="template_id" on_change="on_change_template(template_id,context)" domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
+                                <field name="company_id" on_change="on_change_company(company_id)" widget="selection" groups="base.group_multi_company" attrs="{'required': [('type','&lt;&gt;','view')]}"/>
+                            </group>
                         </group>
-                        <notebook colspan="4">
-                            <page string="Contract Information" name="contract_page">
-                                <group colspan="2" col="2" name="contract" class="oe_form_group_label_border">
-                                    <separator colspan="2" string="Validity"/>
+                        <notebook>
+                            <page string="Contract Information" name="contract_page" attrs="{'invisible':[('type','not in',['contract', 'template'])]}">
+                                <group string="Renewal" name="contract">
+                                    <p colspan="2" class="oe_grey oe_edit_only">
+                                        Once the end date of the contract is
+                                        passed or the maximum number of service
+                                        units (e.g. support contract) is
+                                        reached, the account manager is notified 
+                                        by email to renew the contract with the
+                                        customer.
+                                    </p>
                                     <field name="date_start"/>
-                                    <field name="date"/>
-                                </group>
-                                <group colspan="2" col="2" name="project" class="oe_form_group_label_border">
-                                    <separator colspan="2" string="Project" name="project_sep" invisible="1"/>
+                                    <label for="date" string="End Date"/>
+                                    <div name="duration">
+                                        <field name="date" class="oe_inline"/>
+                                    </div>
                                 </group>
-                                <separator string="Team" colspan="4" name="team"/>
-                                <field colspan="4" name="members" nolabel="1"/>
-                                <separator string="Terms and Condition" colspan="4" name="description"/>
-                                <field colspan="4" name="description" nolabel="1"/>
+                                <separator string="Terms and Conditions" name="description"/>
+                                <field name="description"/>
                             </page>
                         </notebook>
                     </sheet>
+                    <div class="oe_chatter">
+                        <field name="message_follower_ids" widget="mail_followers"/>
+                        <field name="message_ids" widget="mail_thread"/>
+                    </div>
                 </form>
             </field>
         </record>