[FIX]account_analytic_analysis:prepaid unit field is renamed
[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         <record model="ir.actions.act_window" id="action_sales_order">
10             <field name="name">Sales Orders</field>
11             <field name="res_model">sale.order</field>
12             <field name="src_model">account.analytic.account</field>
13         </record>
14
15         <record id="account_analytic_account_form_form" model="ir.ui.view">
16             <field name="name">account.analytic.account.invoice.form.inherit</field>
17             <field name="model">account.analytic.account</field>
18             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
19             <field eval="40" name="priority"/>
20             <field name="arch" type="xml">
21                 <xpath expr='//field[@name="name"]' position="after" version="7.0">
22                         <h4>
23                             <label for="date_start" string="Start Date"/>
24                         </h4>
25                         <div>
26                             <h3>
27                                 <field name="date_start" class="oe_inline"/>
28                             </h3>
29                         </div>
30                 </xpath>
31                 <xpath expr='//div[@name="duration"]' position="after" version="7.0">
32                     <label for="quantity_max" string="Prepaid Time Unit"/>
33                     <div>
34                         <field name="quantity_max" class="oe_inline"/>
35                     </div>
36                 </xpath>
37                 <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
38                 </xpath>
39                 <xpath expr='//separator[@name="description"]' position='before'>
40                     <separator name="toinvoice" string="Invoicing"/>
41                     <table class="oe_form_analytic_account">
42                         <tr>
43                             <th class="oe_grey" width="160px"></th>
44                             <th class="oe_grey" width="25px"></th>
45                             <th class="oe_grey" width="100px"><label string="Expected"/></th>
46                             <th class="oe_grey" width="100px"><label string="Invoiced"/></th>
47                             <th class="oe_grey" width="100px"><label string="Remaining"/></th>
48                             <th class="oe_grey" width="100px"><label string="To Invoice"/></th>
49                             <th width="30px"></th>
50                             <th></th>
51                         </tr><tr>
52                             <td class="oe_grey">
53                                 <label for="fix_price_invoices"/>
54                             </td><td class="oe_grey">
55                                 <field name="fix_price_invoices" class="oe_inline"/>
56                             </td><td>
57                                 <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
58                             </td><td>
59                                 <field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
60                             </td><td>
61                                 <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
62                             </td><td>
63                                 <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
64                             </td><td>
65                                 <button name="open_sale_order_lines"
66                                     class="oe_link oe_e"
67                                     string="/" type="object"
68                                     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]}"
69                                     attrs="{'invisible': [('fix_price_to_invoice','=',0)]}"/>
70                             </td><td>
71                                 <button name="%(action_sales_order)d" string="Sale Orders"
72                                     type="action"
73                                     class="oe_link"
74                                     context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
75                                     attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
76                             </td>
77                         </tr><tr>
78                             <td class="oe_grey">
79                                 <label for="invoice_on_timesheets"/>
80                             </td><td class="oe_grey">
81                                 <field name="invoice_on_timesheets"/>
82                             </td><td>
83                                 <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
84                             </td><td>
85                                 <field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
86                             </td><td>
87                                 <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
88                             </td><td>
89                                 <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
90                             </td><td>
91                                 <button name="%(hr_timesheet_invoice.act_acc_analytic_acc_2_report_acc_analytic_line_to_invoice)d"
92                                     type="action"
93                                     class="oe_link oe_e"
94                                     string="/"
95                                     attrs="{'invisible': [('ca_to_invoice','=',0.0)]}"/>
96
97                             </td><td>
98                                 <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
99                                     string="Timesheets" type="action"
100                                     class="oe_link"
101                                     attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"
102                                     context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
103                             </td>
104                         </tr><tr name='total'>
105                             <th class="oe_grey">
106                                 <label string="Total"/>
107                             </th><td class="oe_grey">
108                             </td><td class="oe_grey">
109                                 <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
110                             </td><td class="oe_grey">
111                                 <field name="invoiced_total" class="oe_inline"/>
112                             </td><td class="oe_grey">
113                                 <field name="remaining_total" class="oe_inline"/>
114                             </td><td class="oe_grey">
115                                 <field name="toinvoice_total" class="oe_inline"/>
116                             </td><td>
117                             </td>
118                         </tr>
119                     </table>
120                     <group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
121                         <field name="pricelist_id"
122                             class="oe_inline"
123                             attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
124                         <field name="to_invoice"
125                             class="oe_inline"
126                             widget="selection"
127                             attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
128                     </group>
129                  </xpath>
130             </field>
131         </record>
132
133         <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
134             <field name="name">account.analytic.account.tree</field>
135             <field name="model">account.analytic.account</field>
136             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
137             <field name="arch" type="xml">
138                 <field name="date" position="before">
139                     <field name="last_invoice_date"/>
140                     <field name="toinvoice_total"/>
141                 </field>
142             </field>
143         </record>
144
145         <record id="template_of_contract_action" model="ir.actions.act_window">
146             <field name="name">Template of Contract</field>
147             <field name="type">ir.actions.act_window</field>
148             <field name="res_model">account.analytic.account</field>
149             <field name="view_type">form</field>
150             <field name="view_mode">tree,form</field>
151             <field name="domain">[('type','=','template')]</field>
152             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
153             <field name="help" type="html">
154                 <p class="oe_view_nocontent_create">
155                     Click here to create a Template of contract.
156                 </p><p>
157                     Templates are used to prefigure contract/project that 
158                     can be selected by the salespoeple to create their customer 
159                     contract/project from the menu Sales/Contracts.
160                 </p>
161             </field>
162              
163         </record>
164         <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>
165     </data>
166 </openerp>