[ADD] analytic_contract_hr_expense: split of features of account_analytic_analysis...
[odoo/odoo.git] / addons / account_analytic_analysis / account_analytic_analysis_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!--
6         Analytic Account form
7         -->
8
9
10         <act_window
11             id="action_sales_order_line"
12             name="Sales Order Lines"
13             res_model="sale.order.line"
14             src_model="account.analytic.account"
15             />
16             
17         <record id="hr_timesheet.account_analytic_account_form_form" model="ir.ui.view">
18             <field name="name">account.analytic.account.invoice.form.inherit</field>
19             <field name="model">account.analytic.account</field>
20             <field name="type">form</field>
21             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
22             <field eval="18" name="priority"/>
23             <field name="arch" type="xml">
24                 <xpath expr='//field[@name="type"]' position='after'>
25                     <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'}"/>
26                 </xpath>
27                 <xpath expr='//field[@name="date"]' position="after">
28                     <group col="6" colspan="2" class="oe_form_group_label_border">
29                         <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
30                     </group>
31                 </xpath>
32                 <xpath expr='//field[@name="pricelist_id"]' position='before'>
33                     <separator colspan="4" string="Invoicing" name="invoicing"/>
34                     <table border="0" colspan="4">
35                         <tr>
36                             <th class="oe_th_160px" height="20px"></th>
37                             <th width="10px"></th>
38                             <th class="oe_th_110px">Est.Tot</th>
39                             <th class="oe_th_110px">Invoiced</th>
40                             <th class="oe_th_110px">Remaining</th>
41                             <th class="oe_th_110px">Ready To Invoice</th>
42                             <th width="10px"></th>
43                             <th></th>
44                             <th></th>
45                         </tr>
46                         <tr>
47                             <th class="oe_border_right">Fix Price Invoices</th>
48                             <td><field name="fix_price_invoices" nolabel="1"/></td>
49                             <td><field class="oe_th_110px" name="amount_max" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
50                             <td class="oe_th_110px"><field name="ca_invoiced" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
51                             <td class="oe_th_110px oe_border_right"><field name="remaining_ca" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
52                             <td class="oe_th_110px"><field name="ca_to_invoice" nolabel="1" attrs="{'invisible': [('fix_price_invoices','=',0)]}"/></td>
53                             <td width="10px"></td>
54                             <td><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>
55                             <td><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>
56                         </tr>
57                         <tr>
58                             <th class="oe_border_right">Invoice On Timesheets</th>
59                             <td><field name="invoice_on_timesheets" nolabel="1"/></td>
60                             <td><field class="oe_th_110px" name="hours_qtt_est" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
61                             <td class="oe_th_110px"><field name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
62                             <td class="oe_th_110px oe_border_right"><field name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
63                             <td class="oe_th_110px"><field name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
64                             <td width="10px"></td>
65                             <td><button class= "oe_btn_width" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
66                             <td><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>
67                         </tr>
68                         <div name="end_of_tabl_hook"/>
69                         <tr>
70                             <th class="oe_border_right">Total</th>
71                             <td width="10px"></td>
72                             <td class="oe_th_110px oe_border_top"><field name="est_total" nolabel="1"/></td>
73                             <td class="oe_th_110px oe_border_top"><field name="invoiced_total" nolabel="1"/></td>
74                             <td class="oe_th_110px oe_border_right oe_border_top"><field name="remaining_total" nolabel="1"/></td>
75                             <td class="oe_th_110px oe_border_top"><field name="toinvoice_total" nolabel="1"/></td>
76                         </tr>
77                     </table>
78                 </xpath>
79             </field>
80         </record>
81
82         <!-- Add information on Account analytic list for the project management -->
83         <record id="view_account_analytic_account_tree_c2c_2" model="ir.ui.view">
84             <field name="name">account.analytic.account.tree</field>
85             <field name="model">account.analytic.account</field>
86             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
87             <field name="type">tree</field>
88             <field name="arch" type="xml">
89                 <field name="quantity" position="replace">
90                     <field name="hours_quantity"/>
91                     <field name="hours_qtt_non_invoiced"/>
92                     <field name="remaining_hours"/>
93                     <field name="quantity_max"/>
94                 </field>
95             </field>
96         </record>
97
98         <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
99             <field name="name">account.analytic.account.tree</field>
100             <field name="model">account.analytic.account</field>
101             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
102             <field name="type">tree</field>
103             <field name="arch" type="xml">
104                 <field name="date" position="before">
105                     <field name="last_invoice_date"/>
106                     <field name="ca_to_invoice"/>
107                 </field>
108             </field>
109         </record>
110         
111         <record id="template_of_contract_action" model="ir.actions.act_window">
112             <field name="name">Template of Contract</field>
113             <field name="type">ir.actions.act_window</field>
114             <field name="res_model">account.analytic.account</field>
115             <field name="view_type">form</field>
116             <field name="view_mode">tree,form</field>
117             <field name="domain">[('type','=','template')]</field>
118             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
119         </record>
120         <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config" />
121     </data>
122 </openerp>