[MERGE] addons 16 survey
[odoo/odoo.git] / addons / account_analytic_analysis / account_analytic_analysis_view.xml
index 0f20014..fd32edb 100644 (file)
 
         <!--
         Analytic Account form
+        -->
 
-        Remove information on Account data => because they move on analysis sheet
-        create a page with invoicing informations
-       
-        <record id="account_analytic_account_invoice_stat_form" model="ir.ui.view">
-            <field name="name">account.analytic.account.invoice.stat.form.inherit</field>
-            <field name="model">account.analytic.account</field>
-            <field name="type">form</field>
-            <field name="inherit_id" ref="hr_timesheet_invoice.account_analytic_account_form_form"/>
-            <field eval="18" name="priority"/>
-            <field name="arch" type="xml">
-                <group name="invoice_stats" position="inside">
-                    <field name="hours_qtt_non_invoiced" attrs="{'invisible': [('to_invoice','=',0)]}"/>
-                    <field name="ca_to_invoice" attrs="{'invisible': [('to_invoice','=',0)]}"/>
-                    <label string="" colspan="1"/>
-                    <button
-                        name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
-                        string="Create Invoice"
-                        type="action"
-                        attrs="{'readonly':[('ca_to_invoice','=',0.0)], 'invisible': [('to_invoice','=',0)]}"
-                        icon="gtk-go-forward"/>
-                </group>
-            </field>
-        </record> -->
-        <act_window
-            id="action_sales_order_line"
-            name="Sales Order Lines"
-            res_model="sale.order.line"
-            src_model="account.analytic.account"
-            />
-         <act_window
-            id="action_timesheet_lines_tree"
-            name="Timesheet Lines"
-            res_model="account.analytic.line"
-            src_model="account.analytic.account"
-            />
+        <record model="ir.actions.act_window" id="action_sales_order">
+            <field name="name">Sales Orders</field>
+            <field name="res_model">sale.order</field>
+            <field name="src_model">account.analytic.account</field>
+        </record>
 
-        <record id="hr_timesheet.account_analytic_account_form_form" model="ir.ui.view">
+        <record id="account_analytic_account_form_form" model="ir.ui.view">
             <field name="name">account.analytic.account.invoice.form.inherit</field>
             <field name="model">account.analytic.account</field>
-            <field name="type">form</field>
             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
-            <field eval="18" name="priority"/>
+            <field eval="40" name="priority"/>
             <field name="arch" type="xml">
-               <xpath expr='//field[@name="parent_id"]' position='after'>
-                   <field name="template_id" on_change="on_change_template(template_id)"  domain="[('type','=','template')]" attrs="{'invisible': [('type','in',['view', 'normal','template'])]}" context="{'default_type' : 'template'}"/>
-               </xpath>
-                <xpath expr='//group[@name="project"]' position="after">
-                    <group col="6" colspan="3" class="oe_form_group_label_border">
-                        <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
-                    </group>
+                <xpath expr='//div[@name="duration"]' position="after" version="7.0">
+                    <label for="quantity_max"/>
+                    <div>
+                        <field name="quantity_max" class="oe_inline"/>
+                    </div>
                 </xpath>
-                <xpath expr='//separator[@name="description"]' position='before'>
-                   <separator colspan="4" string="Invoicing" name="invoicing"/>
-                   <group col="1" colspan="4">
-                       <table border="0">
-                           <tr>
-                               <th class="oe_th_150px" height="20px"></th>
-                               <th width="10px"></th>
-                               <th class="oe_th_110px">Est.Tot</th>
-                               <th class="oe_th_110px">Invoiced</th>
-                               <th class="oe_th_110px">Remaining</th>
-                               <th class="oe_th_110px">Ready To Invoice</th>
-                               <th width="10px"></th>
-                               <th class="oe_th_150px"></th>
-                               <th class="oe_th_150px"></th>
-                           </tr>
-                           <tr>
-                               <th class="oe_border_right">Fix Price Invoices</th>
-                               <td><field name="fix_price_invoices" nolabel="1"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                               <td width="10px"></td>
-                               <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                               <td class="oe_th_150px"><button class= "oe_btn_width" name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                           </tr>
-                           <tr>
-                               <th class="oe_border_right">Invoice On Timesheets</th>
-                               <td><field name="invoice_on_timesheets" nolabel="1"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                               <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                               <td width="10px"></td>
-                               <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                               <td class="oe_th_150px"><button class= "oe_btn_width" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                           </tr>
-                           <tr>
-                               <th class="oe_border_right">Charge Expenses</th>
-                               <td><field name="charge_expenses" nolabel="1"/></td>
-                               <td class="oe_amount_center oe_th_110px">todo</td>
-                               <td class="oe_amount_center oe_th_110px">todo</td>
-                               <td class="oe_amount_center oe_th_110px oe_border_right">todo</td>
-                               <td class="oe_amount_center oe_th_110px">todo</td>
-                               <td width="10px"></td>
-                               <td class="oe_th_150px">todo</td>
-                               <td class="oe_th_150px">todo</td>
-                           </tr>
-                           <tr>
-                               <th class="oe_border_right">Total</th>
-                               <td width="10px"></td>
-                               <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                               <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                               <td class="oe_amount_center oe_th_110px oe_border_right oe_border_top">todo</td>
-                               <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                           </tr>
-                       </table>
-                   </group>
-<!--               <group colspan="4">-->
-<!--                   <group col="2" colspan="1" class="oe_form_group_label_border">-->
-<!--                       <label string=" "/><label string=" "/>-->
-<!--                       <field name="fix_price_invoices"/>-->
-<!--                       <field name="invoice_on_timesheets"/>-->
-<!--                       <field name="charge_expenses"/>-->
-<!--                   </group>-->
-<!--                   <group col="2" colspan="1">-->
-<!--                       <label string="Est.Tot"/>-->
-<!--                       <label string="Invoiced"/>-->
-<!--                       <field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!--                       <field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!--                   </group>-->
-<!--                   <group col="2" colspan="1" class="oe_form_group_odd_border">-->
-<!--                       <label string="Remaining"/>-->
-<!--                       <label string="To Invoice"/>-->
-<!--                       <field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!--                       <field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!--                   </group>-->
-<!--                   <group col="2" colspan="1">-->
-<!--                       <label string=" "/><label string=" "/>-->
-<!--                       <button name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <button name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/>-->
-<!--                       <button name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!--                <button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/>-->
-<!---->
-<!--                   </group>-->
-<!--               </group>-->
-                   
-                   
-                   
-                    <!--<group colspan="4" name="contract_lines" class="oe_form_group_label_border">
-                        <table name="contract_data">
-                            <tr name="title" >
-                                <th ><div class="oe_field_label" ></div></th>
-                                <td><div></div></td>
-                                <th ><div class="oe_float_field_view" >Est. Total</div></th>
-                                <th ><div class="oe_field_view" >Invoiced</div></th>
-                                <th ><div class="oe_field_view" >Remaining</div></th>
-                                <th ><div class="oe_float_field_view" >Ready to Invoice</div></th>
-                            </tr>
-                            <tr>
-                                <th><div class="oe_field_label">Fix price Invoices</div></th>
-                                <td><div><field name="so_visible" nolabel="1"/></div></td>
-                                <td><div class="oe_float_field_view"><field name="amount_max" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
-                                <td><div class="oe_field_view"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
-                                <td><div class="oe_field_view"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
-                                <td><div class="oe_float_field_view"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('so_visible','=',0)]}"/></div></td>
-                                <td><button class="oe_title_button_right" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('so_visible','=',0)]}"/></td>
-                                <td><button class="oe_title_button_left" name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('so_visible','=',0)]}"/></td>
-                                               </tr>
-                            <tr>
-                               <th><div class="oe_field_label">Invoice on timesheet</div></th>
-                               <td><div><field name="timsheet_visible" nolabel="1"/></div></td>
-                               <td><div class="oe_float_field_view" ><field name="quantity_max" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
-                               <td><div class="oe_field_view" ><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
-                               <td><div class="oe_field_view" ><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
-                               <td><div class="oe_float_field_view" ><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></div></td>
-                               <td><button class="oe_title_button_right" name="%(account.action_account_tree1)d" string="Timesheets" type="action" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></td>
-                               <td><button class="oe_title_button_left" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('timsheet_visible','=',0)]}"/></td>
-                           </tr>
-                           <tr>
-                                <th><div class="oe_field_label" >Charge Expenses</div></th>
-                                <td><div><field name="expense_visible" nolabel="1"/></div></td>
-                                <td><div class="oe_float_field_view" ><field name="expense_max" nolabel="1" attrs="{'invisible': [('expense_visible','=',0)]}"/></div></td>
-                                <td><div class="oe_field_view" ></div></td>
-                                <td><div class="oe_field_view" ></div></td>
-                                <td><div class="oe_float_field_view"></div></td>
-                            </tr> 
-                            <tr name="total">
-                                <th><div class="oe_field_label" >Total</div></th>
-                                <td><div></div></td>
-                                <td><div class="oe_totals" ></div></td>
-                                <td><div class="oe_totals_view" ></div></td>
-                                <td><div class="oe_totals_view" ></div></td>
-                                <td><div class="oe_totals" ></div></td>
-                            </tr>
-                        </table>
-                    </group>-->
-                   <group colspan="4" class="oe_form_group_label_border"> 
-                           <field name="pricelist_id" />
-                           <field name="to_invoice" widget="selection" />
-                   </group>
+                <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
                 </xpath>
-                <!-- <notebook position="inside">
-                    <page string="Invoice Analysis">
-                        <separator colspan="4" string="Work Done Stats"/>
-
-                        <field name="total_cost"/>
-                        <field name="remaining_ca"/>
-                        <field name="ca_invoiced"/>
-                        <field name="ca_theorical"/>
-                        <newline/>
-                        <field name="hours_quantity"/>
-                        <field name="hours_qtt_invoiced"/>
-                        <field name="remaining_hours"/>
-                        <newline/>
-                        <separator colspan="4" string="Analysis Stats"/>
-
-                        <field name="revenue_per_hour"/>
-                        <field name="real_margin"/>
-                        <field name="real_margin_rate"/>
-                        <field name="theorical_margin"/>
-                        <separator colspan="4" string="Key Dates"/>
-
-                        <field name="last_invoice_date"/>
-                        <field name="last_worked_invoiced_date"/>
-                        <field name="last_worked_date"/>
-                    </page>
-                    <page string="Stats by month">
-                        <field colspan="4" name="month_ids" nolabel="1">
-                            <tree string="Month">
-                                <field name="month"/>
-                                <field name="unit_amount" widget="float_time"/>
-                            </tree>
-                        </field>
-                    </page>
-                    <page string="Stats by user">
-                        <field colspan="4" name="user_ids" nolabel="1">
-                            <tree string="Users">
-                                <field name="user"/>
-                                <field name="unit_amount" widget="float_time"/>
-                            </tree>
-                        </field>
-                    </page>
-                </notebook> -->
+                <xpath expr='//separator[@name="description"]' position='before'>
+                    <separator name="toinvoice" string="Invoicing"/>
+                    <table class="oe_form_analytic_account">
+                        <tr>
+                            <th class="oe_timesheet_grey" width="160px"></th>
+                            <th class="oe_timesheet_grey" width="25px"></th>
+                            <th class="oe_timesheet_grey" width="100px"><label string="Expected"/></th>
+                            <th class="oe_timesheet_grey" width="100px"><label string="Invoiced"/></th>
+                            <th class="oe_timesheet_grey" width="100px"><label string="Remaining"/></th>
+                            <th class="oe_timesheet_grey" width="100px"><label string="To Invoice"/></th>
+                            <th width="30px"></th>
+                            <th></th>
+                        </tr><tr>
+                            <td class="oe_timesheet_grey">
+                                <label for="fix_price_invoices"/>
+                            </td><td class="oe_timesheet_grey">
+                                <field name="fix_price_invoices" class="oe_inline"/>
+                            </td><td>
+                                <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
+                            </td><td attrs="{'invisible': [('fix_price_invoices','=',False)]}" class="oe_timesheet_action">
+                                <span attrs="{'invisible': [('fix_price_to_invoice','=',0.0)]}" class="oe_grey">
+                                    <button name="open_sale_order_lines"
+                                        class="oe_link"
+                                        string="⇒ Invoice" type="object"
+                                        context="{'default_partner_id': [partner_id],'default_project_id': active_id,'search_default_uninvoiced': 1,'search_default_project_id': active_id,'search_default_partner_id': [partner_id]}"/>
+                                    or view
+                                </span>
 
-            </field>
-        </record>
+                                <span attrs="{'invisible': [('fix_price_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
+                                    No order to invoice, create
+                                </span>
+                                <button name="%(action_sales_order)d" string="Sale Orders"
+                                    type="action"
+                                    class="oe_link"
+                                    context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
+                                    />
+                            </td>
+                        </tr><tr>
+                            <td class="oe_timesheet_grey">
+                                <label for="invoice_on_timesheets"/>
+                            </td><td class="oe_timesheet_grey">
+                                <field name="invoice_on_timesheets"/>
+                            </td><td>
+                                <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
+                            </td><td>
+                                <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
+                            </td><td class="oe_timesheet_action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
+                                <span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
+                                    <button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
+                                        type="action"
+                                        class="oe_link"
+                                        string="⇒ Invoice"/>
+                                    or view 
+                                </span>
+                                <span attrs="{'invisible': [('ca_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
+                                    Nothing to invoice, create 
+                                </span>
 
-        <record id="project_account_analytic_account_form" model="ir.ui.view">
-            <field name="name">project.account.analytic.account.form.inherit</field>
-            <field name="model">project.project</field>
-            <field name="type">form</field>
-            <field name="inherit_id" ref="project.edit_project"/>
-            <field eval="18" name="priority"/>
-            <field name="arch" type="xml">
-               <xpath expr='//page[@name="team"]' position='after'>
-                   <page string="Contract Data" name="contract_page">
-                        <group colspan="2" col= "2" name="contract" class="oe_form_group_label_border">
-                            <separator colspan="2" string="Validity"/>
-                            <field name="date_start"/>
-                            <field name="date"/>
-                            <group col="6" colspan="3" class="oe_form_group_label_border">
-                                <field name="quantity_max"/><field name="company_uom_id" nolabel="1"/><field name="remaining_hours" string="/ Remaining"/>
-                            </group>
+                                <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
+                                    string="Timesheets" type="action"
+                                    class="oe_link"
+                                    context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
+                            </td>
+                        </tr><tr name='total'>
+                            <th class="oe_timesheet_grey">
+                                <label string="Total"/>
+                            </th><td class="oe_timesheet_grey">
+                            </td><td class="oe_timesheet_grey">
+                                <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
+                            </td><td class="oe_timesheet_grey">
+                                <field name="invoiced_total" class="oe_inline"/>
+                            </td><td class="oe_timesheet_grey">
+                                <field name="remaining_total" class="oe_inline"/>
+                            </td><td class="oe_timesheet_grey">
+                                <field name="toinvoice_total" class="oe_inline"/>
+                            </td><td>
+                            </td>
+                        </tr>
+                    </table>
+                    <group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
+                        <p class="oe_grey oe_edit_only" colspan="2">
+                            When invoicing on timesheet, OpenERP uses the
+                            pricelist of the contract which uses the price
+                            defined on the product related to each employee to
+                            define the customer invoice price rate.
+                        </p>
+                        <group>
+                            <field name="pricelist_id"
+                                class="oe_inline"
+                                attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
+                            <field name="to_invoice"
+                                class="oe_inline"
+                                widget="selection"
+                                attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
                         </group>
-                        <group colspan="2" col= "2" name="invoice_rate" class="oe_form_group_label_border">
-                            <separator colspan="2" string="Invoice Rate"/>
-                            <field name="pricelist_id" />
-                                       <field name="to_invoice" widget="selection" />
-                        </group>                     
-                               <separator colspan="4" string="Invoicing" name="invoicing"/>
-                               <group col="1" colspan="4">
-                                     <table border="0">
-                                       <tr>
-                                           <th class="oe_th_150px" height="20px"></th>
-                                           <th width="10px"></th>
-                                           <th class="oe_th_110px">Est.Tot</th>
-                                           <th class="oe_th_110px">Invoiced</th>
-                                           <th class="oe_th_110px">Remaining</th>
-                                           <th class="oe_th_110px">Ready To Invoice</th>
-                                           <th width="10px"></th>
-                                           <th class="oe_th_150px"></th>
-                                           <th class="oe_th_150px"></th>
-                                       </tr>
-                                       <tr>
-                                           <th class="oe_border_right">Fix Price Invoices</th>
-                                           <td><field name="fix_price_invoices" nolabel="1"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                           <td width="10px"></td>
-                                           <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_sales_order_line)d" string="Sales" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                           <td class="oe_th_150px"><button class= "oe_btn_width" name="%(sale.action_order_line_tree2)d" string="Lines To Invoice" type="action" context="{'default_project_id': active_id,'search_default_project_id': active_id}" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
-                                       </tr>
-                                       <tr>
-                                           <th class="oe_border_right">Invoice On Timesheets</th>
-                                           <td><field name="invoice_on_timesheets" nolabel="1"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="quantity_max" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                           <td class="oe_amount_center oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                           <td width="10px"></td>
-                                           <td class="oe_th_150px"><button class= "oe_btn_width" name="%(action_timesheet_lines_tree)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                           <td class="oe_th_150px"><button class= "oe_btn_width" name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d" string="Invoice Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
-                                       </tr>
-                                       <tr>
-                                           <th class="oe_border_right">Charge Expenses</th>
-                                           <td><field name="charge_expenses" nolabel="1"/></td>
-                                           <td class="oe_amount_center oe_th_110px">todo</td>
-                                           <td class="oe_amount_center oe_th_110px">todo</td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_right">todo</td>
-                                           <td class="oe_amount_center oe_th_110px">todo</td>
-                                           <td width="10px"></td>
-                                           <td class="oe_th_150px">todo</td>
-                                           <td class="oe_th_150px">todo</td>
-                                       </tr>
-                                       <tr>
-                                           <th class="oe_border_right">Total</th>
-                                           <td width="10px"></td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_right oe_border_top">todo</td>
-                                           <td class="oe_amount_center oe_th_110px oe_border_top">todo</td>
-                                       </tr>
-                                     </table>
-                               </group>
-                               <separator string="Terms and Condition" colspan="4" name="description"/>
-                        <field colspan="4" name="description" nolabel="1"/>
-                    </page>
-                </xpath>
-            </field>
-        </record>
-
-        <!-- Add information on Account analytic list for the project management -->
-        <record id="view_account_analytic_account_tree_c2c_2" model="ir.ui.view">
-            <field name="name">account.analytic.account.tree</field>
-            <field name="model">account.analytic.account</field>
-            <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
-            <field name="type">tree</field>
-            <field name="arch" type="xml">
-                <field name="quantity" position="replace">
-                    <field name="hours_quantity"/>
-                    <field name="hours_qtt_non_invoiced"/>
-                    <field name="remaining_hours"/>
-                    <field name="quantity_max"/>
-                </field>
+                    </group>
+                 </xpath>
             </field>
         </record>
 
             <field name="name">account.analytic.account.tree</field>
             <field name="model">account.analytic.account</field>
             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
-            <field name="type">tree</field>
             <field name="arch" type="xml">
                 <field name="date" position="before">
                     <field name="last_invoice_date"/>
-                    <field name="ca_to_invoice"/>
+                    <field name="toinvoice_total"/>
                 </field>
             </field>
         </record>
-        
+
         <record id="template_of_contract_action" model="ir.actions.act_window">
-            <field name="name">Template Of Contract</field>
+            <field name="name">Template of Contract</field>
             <field name="type">ir.actions.act_window</field>
             <field name="res_model">account.analytic.account</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="domain">[('type','=','template')]</field>
             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
+            <field name="help" type="html">
+                <p class="oe_view_nocontent_create">
+                    Click here to create a template of contract.
+                </p><p>
+                    Templates are used to prefigure contract/project that 
+                    can be selected by the salespeople to quickly configure the
+                    terms and conditions of the contract.
+                </p>
+            </field>
+             
         </record>
-        <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config" />
+        <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>
     </data>
 </openerp>