[IMP]boolean timesheet move to hr_timesheet from invoice and view improve
[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         Remove information on Account data => because they move on analysis sheet
9         create a page with invoicing informations
10        
11         <record id="account_analytic_account_invoice_stat_form" model="ir.ui.view">
12             <field name="name">account.analytic.account.invoice.stat.form.inherit</field>
13             <field name="model">account.analytic.account</field>
14             <field name="type">form</field>
15             <field name="inherit_id" ref="hr_timesheet_invoice.account_analytic_account_form_form"/>
16             <field eval="18" name="priority"/>
17             <field name="arch" type="xml">
18                 <group name="invoice_stats" position="inside">
19                     <field name="hours_qtt_non_invoiced" attrs="{'invisible': [('to_invoice','=',0)]}"/>
20                     <field name="ca_to_invoice" attrs="{'invisible': [('to_invoice','=',0)]}"/>
21                     <label string="" colspan="1"/>
22                     <button
23                         name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
24                         string="Create Invoice"
25                         type="action"
26                         attrs="{'readonly':[('ca_to_invoice','=',0.0)], 'invisible': [('to_invoice','=',0)]}"
27                         icon="gtk-go-forward"/>
28                 </group>
29             </field>
30         </record> -->
31
32         <record id="hr_timesheet.account_analytic_account_form_form" model="ir.ui.view">
33             <field name="name">account.analytic.account.invoice.form.inherit</field>
34             <field name="model">account.analytic.account</field>
35             <field name="type">form</field>
36             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
37             <field eval="18" name="priority"/>
38             <field name="arch" type="xml">
39                 <xpath expr='//field[@name="parent_id"]' position='after'>
40                     <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'}"/>
41                 </xpath>
42                 <xpath expr='//page[@name="contract_page"]' position='inside'>
43                         <group colspan="4" class="oe_form_group_label_border"> 
44                                 <field name="pricelist_id" />
45                                 <field name="to_invoice" widget="selection" />
46                                 </group>
47                 </xpath>
48                 <xpath expr='//group[@name="project"]' position="after">
49                     <group col="6" colspan="3" class="oe_form_group_label_border">
50                         <field name="quantity_max"/><label string="/"/> <label string="Remaining"/> <field name="remaining_hours" nolabel="1"/>
51                     </group>
52                 </xpath>
53                 <!-- <notebook position="inside">
54                     <page string="Invoice Analysis">
55                         <separator colspan="4" string="Work Done Stats"/>
56
57                         <field name="total_cost"/>
58                         <field name="remaining_ca"/>
59                         <field name="ca_invoiced"/>
60                         <field name="ca_theorical"/>
61                         <newline/>
62                         <field name="hours_quantity"/>
63                         <field name="hours_qtt_invoiced"/>
64                         <field name="remaining_hours"/>
65                         <newline/>
66                         <separator colspan="4" string="Analysis Stats"/>
67
68                         <field name="revenue_per_hour"/>
69                         <field name="real_margin"/>
70                         <field name="real_margin_rate"/>
71                         <field name="theorical_margin"/>
72                         <separator colspan="4" string="Key Dates"/>
73
74                         <field name="last_invoice_date"/>
75                         <field name="last_worked_invoiced_date"/>
76                         <field name="last_worked_date"/>
77                     </page>
78                     <page string="Stats by month">
79                         <field colspan="4" name="month_ids" nolabel="1">
80                             <tree string="Month">
81                                 <field name="month"/>
82                                 <field name="unit_amount" widget="float_time"/>
83                             </tree>
84                         </field>
85                     </page>
86                     <page string="Stats by user">
87                         <field colspan="4" name="user_ids" nolabel="1">
88                             <tree string="Users">
89                                 <field name="user"/>
90                                 <field name="unit_amount" widget="float_time"/>
91                             </tree>
92                         </field>
93                     </page>
94                 </notebook> -->
95
96             </field>
97         </record>
98
99         <!-- Add information on Account analytic list for the project management -->
100         <record id="view_account_analytic_account_tree_c2c_2" 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="quantity" position="replace">
107                     <field name="hours_quantity"/>
108                     <field name="hours_qtt_non_invoiced"/>
109                     <field name="remaining_hours"/>
110                     <field name="quantity_max"/>
111                 </field>
112             </field>
113         </record>
114
115         <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
116             <field name="name">account.analytic.account.tree</field>
117             <field name="model">account.analytic.account</field>
118             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
119             <field name="type">tree</field>
120             <field name="arch" type="xml">
121                 <field name="date" position="before">
122                     <field name="last_invoice_date"/>
123                     <field name="ca_to_invoice"/>
124                 </field>
125             </field>
126         </record>
127         
128         <record id="template_of_contract_action" model="ir.actions.act_window">
129             <field name="name">Template Of Contract</field>
130             <field name="type">ir.actions.act_window</field>
131             <field name="res_model">account.analytic.account</field>
132             <field name="view_type">form</field>
133             <field name="view_mode">tree,form</field>
134             <field name="domain">[('type','=','template')]</field>
135             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
136         </record>
137         <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config" />
138     </data>
139 </openerp>