91a312c138dea44983cacf59a073420426ec81ea
[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_90px">Est.Tot</th>
39                             <th class="oe_th_90px">Invoiced</th>
40                             <th class="oe_th_90px">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_th_160px oe_border_right">Fix Price Invoices</th>
48                             <td><field width="10px" name="fix_price_invoices" nolabel="1"/></td>
49                             <group attrs="{'invisible': [('fix_price_invoices','=',0)]}">
50                             <td><field class="oe_th_90px" name="amount_max" nolabel="1" /></td>
51                             <td ><field class="oe_th_90px" name="ca_invoiced" nolabel="1" /></td>
52                             <td ><field class="oe_th_90px oe_border_right" name="remaining_ca" nolabel="1" /></td>
53                             <td ><field class="oe_th_110px" name="ca_to_invoice" nolabel="1" /></td>
54                             <td width="10px"></td>
55                             <td><button icon="terp-check" class= "oe_btn_width_120px" 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>
56                             <td><button icon="terp-dolar_ok!" 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>
57                             </group>
58                         </tr>
59                         <tr>
60                             <th class="oe_th_160px oe_border_right">Invoice On Timesheets</th>
61                             <td><field width="10px" name="invoice_on_timesheets" nolabel="1"/></td>
62                             <td><field class="oe_th_90px" name="hours_qtt_est" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
63                             <td ><field class="oe_th_90px" name="hours_qtt_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
64                             <td ><field class="oe_th_90px oe_border_right" name="remaining_hours" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
65                             <td ><field class="oe_th_110px" name="hours_qtt_non_invoiced" nolabel="1" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
66                             <td width="10px"></td>
67                             <td><button icon="terp-go-week" class= "oe_btn_width_120px" name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d" string="Timesheets" type="action" attrs="{'invisible': [('invoice_on_timesheets','=',0)]}"/></td>
68                             <td><button icon="terp-dolar" 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>
69                         </tr>
70                         <div name="end_of_tabl_hook"/>
71                         <tr>
72                             <th class="oe_th_160px oe_border_right">Total</th>
73                             <td width="10px"></td>
74                             <td ><field class="oe_th_90px oe_border_top" name="est_total" nolabel="1"/></td>
75                             <td ><field class="oe_th_90px oe_border_top" name="invoiced_total" nolabel="1"/></td>
76                             <td ><field class="oe_th_90px oe_border_right oe_border_top" name="remaining_total" nolabel="1"/></td>
77                             <td ><field class="oe_th_110px oe_border_top" name="toinvoice_total" nolabel="1"/></td>
78                         </tr>
79                     </table>
80                 </xpath>
81             </field>
82         </record>
83
84         <!-- Add information on Account analytic list for the project management -->
85         <record id="view_account_analytic_account_tree_c2c_2" model="ir.ui.view">
86             <field name="name">account.analytic.account.tree</field>
87             <field name="model">account.analytic.account</field>
88             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
89             <field name="type">tree</field>
90             <field name="arch" type="xml">
91                 <field name="quantity" position="replace">
92                     <field name="hours_quantity"/>
93                     <field name="hours_qtt_non_invoiced"/>
94                     <field name="remaining_hours"/>
95                     <field name="quantity_max"/>
96                 </field>
97             </field>
98         </record>
99
100         <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
101             <field name="name">account.analytic.account.tree</field>
102             <field name="model">account.analytic.account</field>
103             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
104             <field name="type">tree</field>
105             <field name="arch" type="xml">
106                 <field name="date" position="before">
107                     <field name="last_invoice_date"/>
108                     <field name="ca_to_invoice"/>
109                 </field>
110             </field>
111         </record>
112         
113         <record id="template_of_contract_action" model="ir.actions.act_window">
114             <field name="name">Template of Contract</field>
115             <field name="type">ir.actions.act_window</field>
116             <field name="res_model">account.analytic.account</field>
117             <field name="view_type">form</field>
118             <field name="view_mode">tree,form</field>
119             <field name="domain">[('type','=','template')]</field>
120             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
121         </record>
122         <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config" />
123     </data>
124 </openerp>