Launchpad automatic translations update.
[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='//div[@name="duration"]' position="after" version="7.0">
22                     <label for="quantity_max"/>
23                     <div>
24                         <field name="quantity_max"/>
25                         <div attrs="{'invisible': [('quantity','=',0)]}" class="oe_grey">
26                             <field name="quantity" class="oe_inline"/> Units Done
27                         </div>
28                         <div attrs="{'invisible': [('quantity_max','=',0)]}" class="oe_grey">
29                             <field name="remaining_hours" class="oe_inline"/> Units Remaining
30                         </div>
31                     </div>
32                 </xpath>
33                 <xpath expr='//group[@name="invoice_on_timesheets"]' position="replace">
34                 </xpath>
35                 <xpath expr='//separator[@name="description"]' position='before'>
36                     <separator name="toinvoice" string="Invoicing"/>
37                     <table class="oe_form_analytic_account">
38                         <tr>
39                             <th class="oe_timesheet_grey" width="160px"></th>
40                             <th class="oe_timesheet_grey" width="25px"></th>
41                             <th class="oe_timesheet_grey" width="100px"><label string="Expected"/></th>
42                             <th class="oe_timesheet_grey" width="100px"><label string="Invoiced"/></th>
43                             <th class="oe_timesheet_grey" width="100px"><label string="Remaining"/></th>
44                             <th class="oe_timesheet_grey" width="100px"><label string="To Invoice"/></th>
45                             <th width="30px"></th>
46                             <th></th>
47                         </tr><tr>
48                             <td class="oe_timesheet_grey">
49                                 <label for="fix_price_invoices"/>
50                             </td><td class="oe_timesheet_grey">
51                                 <field name="fix_price_invoices" class="oe_inline"/>
52                             </td><td>
53                                 <field class="oe_inline" name="amount_max" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
54                             </td><td>
55                                 <field class="oe_inline" name="ca_invoiced" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
56                             </td><td>
57                                 <field class="oe_inline" name="remaining_ca" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
58                             </td><td>
59                                 <field class="oe_inline" name="fix_price_to_invoice" attrs="{'invisible': [('fix_price_invoices','=',False)]}"/>
60                             </td><td attrs="{'invisible': [('fix_price_invoices','=',False)]}" class="oe_timesheet_action">
61                                 <span attrs="{'invisible': [('fix_price_to_invoice','=',0.0)]}" class="oe_grey">
62                                     <button name="open_sale_order_lines"
63                                         class="oe_link"
64                                         string="⇒ Invoice" type="object"
65                                         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]}"/>
66                                     or view
67                                 </span>
68
69                                 <span attrs="{'invisible': ['|',('fix_price_to_invoice','&lt;&gt;',0.0 ),('partner_id','=',False)]}" class="oe_grey">
70                                     No order to invoice, create
71                                 </span>
72                                 <button name="%(action_sales_order)d" string="Sale Orders"
73                                     type="action"
74                                     class="oe_link"
75                                     context="{'default_partner_id': [partner_id], 'search_default_partner_id': [partner_id],'search_default_project_id': [active_id],'default_project_id': [active_id]}"
76                                     />
77                             </td>
78                         </tr><tr>
79                             <td class="oe_timesheet_grey">
80                                 <label for="invoice_on_timesheets"/>
81                             </td><td class="oe_timesheet_grey">
82                                 <field name="invoice_on_timesheets"/>
83                             </td><td>
84                                 <field class="oe_inline" name="hours_qtt_est" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
85                             </td><td>
86                                 <field class="oe_inline" name="timesheet_ca_invoiced" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
87                             </td><td>
88                                 <field class="oe_inline" name="remaining_hours_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
89                             </td><td>
90                                 <field class="oe_inline" name="ca_to_invoice" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
91                             </td><td class="oe_timesheet_action" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
92                                 <span attrs="{'invisible': [('ca_to_invoice','=',0.0)]}" class="oe_grey">
93                                     <button name="%(hr_timesheet_invoice.action_hr_timesheet_invoice_create_final)d"
94                                         type="action"
95                                         class="oe_link"
96                                         string="⇒ Invoice"/>
97                                     or view 
98                                 </span>
99                                 <span attrs="{'invisible': [('ca_to_invoice','&lt;&gt;',0.0)]}" class="oe_grey">
100                                     Nothing to invoice, create 
101                                 </span>
102
103                                 <button name="%(hr_timesheet.act_hr_timesheet_line_evry1_all_form)d"
104                                     string="Timesheets" type="action"
105                                     class="oe_link"
106                                     context="{'default_account_id': active_id,'search_default_account_id': active_id}"/>
107                             </td>
108                         </tr><tr name='total'>
109                             <th class="oe_timesheet_grey">
110                                 <label string="Total"/>
111                             </th><td class="oe_timesheet_grey">
112                             </td><td class="oe_timesheet_grey">
113                                 <field name="est_total" class="oe_inline" attrs="{'invisible': [('invoice_on_timesheets','=',False)]}"/>
114                             </td><td class="oe_timesheet_grey">
115                                 <field name="invoiced_total" class="oe_inline"/>
116                             </td><td class="oe_timesheet_grey">
117                                 <field name="remaining_total" class="oe_inline"/>
118                             </td><td class="oe_timesheet_grey">
119                                 <field name="toinvoice_total" class="oe_inline"/>
120                             </td><td>
121                             </td>
122                         </tr>
123                     </table>
124                     <group name='invoice_on_timesheets' attrs="{'invisible': [('invoice_on_timesheets','=',False)]}">
125                         <p class="oe_grey oe_edit_only" colspan="2">
126                             When invoicing on timesheet, OpenERP uses the
127                             pricelist of the contract which uses the price
128                             defined on the product related to each employee to
129                             define the customer invoice price rate.
130                         </p>
131                         <group>
132                             <field name="pricelist_id"
133                                 class="oe_inline"
134                                 attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
135                             <field name="to_invoice"
136                                 class="oe_inline"
137                                 widget="selection"
138                                 attrs="{'required': [('invoice_on_timesheets', '=', True)]}"/>
139                         </group>
140                     </group>
141                  </xpath>
142             </field>
143         </record>
144
145         <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
146             <field name="name">account.analytic.account.tree</field>
147             <field name="model">account.analytic.account</field>
148             <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
149             <field name="arch" type="xml">
150                 <field name="date" position="before">
151                     <field name="last_invoice_date"/>
152                     <field name="toinvoice_total"/>
153                     <field name="remaining_hours"/>
154                 </field>
155             </field>
156         </record>
157
158         <record id="view_account_analytic_account_template_required" model="ir.ui.view">
159             <field name="name">account.analytic.account.form.template.required</field>
160             <field name="model">account.analytic.account</field>
161             <field name="groups_id" eval="[(6, 0, [ref('group_template_required')])]"/>
162             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
163             <field name="arch" type="xml">
164                 <field name="template_id" position="attributes">
165                     <attribute name="attrs">{'required': [('type','=','contract')], 'invisible': [('type','in',['view', 'normal','template'])]}</attribute>
166                 </field>
167             </field>
168         </record>
169
170         <record id="template_of_contract_action" model="ir.actions.act_window">
171             <field name="name">Contract Template</field>
172             <field name="type">ir.actions.act_window</field>
173             <field name="res_model">account.analytic.account</field>
174             <field name="view_type">form</field>
175             <field name="view_mode">tree,form</field>
176             <field name="domain">[('type','=','template')]</field>
177             <field name="context">{'search_default_type':'template','default_type' : 'template'}</field>
178             <field name="help" type="html">
179                 <p class="oe_view_nocontent_create">
180                     Click here to create a template of contract.
181                 </p><p>
182                     Templates are used to prefigure contract/project that 
183                     can be selected by the salespeople to quickly configure the
184                     terms and conditions of the contract.
185                 </p>
186             </field>
187              
188         </record>
189         <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>
190     </data>
191 </openerp>