Launchpad automatic translations update.
[odoo/odoo.git] / addons / hr_timesheet / hr_timesheet_view.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <record id="hr_timesheet_line_tree" model="ir.ui.view">
6             <field name="name">hr.analytic.timesheet.tree</field>
7             <field name="model">hr.analytic.timesheet</field>
8             <field name="arch" type="xml">
9                 <tree editable="top" string="Timesheet Activities">                  
10                     <field name="date" on_change="on_change_date(date)"/>
11                     <field name="user_id" on_change="on_change_user_id(user_id)" required="1" options='{"no_open": True}'/>
12                     <field name="name"/>
13                     <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1, 'default_type': 'contract'}"/>
14                     <field name="unit_amount" string="Duration" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
15                     <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
16                     <field name="journal_id" invisible="1"/>
17                     <field name="amount" sum="Total cost" invisible="1"/>
18                     <field name="general_account_id" invisible="1"/>
19                     <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]" invisible="1"/>
20                 </tree>
21             </field>
22         </record>
23         <record id="hr_timesheet_line_form" model="ir.ui.view">
24             <field name="name">hr.analytic.timesheet.form</field>
25             <field name="model">hr.analytic.timesheet</field>
26             <field name="arch" type="xml">
27                 <form string="Timesheet Activities" version="7.0">
28                     <sheet>
29                     <group>
30                         <group>
31                             <field name="name"/>
32                             <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
33                         </group>
34                         <group>
35                             <field name="date" on_change="on_change_date(date)"/>
36                         </group>
37                     </group>
38                     <notebook>
39                         <page string="Information">
40                         <group>
41                             <group string="Product">
42                                 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" required="1" domain="[('type','=','service')]"/>
43                                 <label string="Duration" for="unit_amount"/>
44                                 <div>
45                                     <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
46                                     <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" class="oe_inline"/>
47                                 </div>
48                             </group>
49                             <group string="Accounting">
50                                 <field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close'),('parent_id','!=',False)]" name="account_id" select="1"/>
51                                 <field name="amount"/>
52                                 <field name="general_account_id"/>
53                                 <field name="journal_id"/>
54                             </group>
55                         </group>
56                         </page>
57                     </notebook>
58                     </sheet>
59                 </form>
60             </field>
61         </record>
62
63         <record id="hr_timesheet_line_search" model="ir.ui.view">
64             <field name="name">hr.analytic.timesheet.search</field>
65             <field name="model">hr.analytic.timesheet</field>
66             <field name="arch" type="xml">
67                 <search string="Timesheet">
68                     <field name="date"/>
69                     <field name="user_id"/>
70                     <field name="account_id"/>
71                     <group expand="0" string="Group By...">
72                         <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
73                         <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
74                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
75                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
76                     </group>
77                 </search>
78             </field>
79         </record>
80
81         <record model="ir.actions.act_window" id="act_analytic_cost_revenue">
82             <field name="context">{'search_default_account_id': [active_id], 'default_account_id': active_id, 'search_default_group_date': 1, 'search_default_group_journal': 1}</field>
83             <field name="name">Costs &amp; Revenues</field>
84             <field name="res_model">account.analytic.line</field>
85             <field name="src_model">account.analytic.account</field>
86             <field name="view_mode">tree,form</field>
87             <field name="view_type">form</field>
88             <field name="help" type="html">
89               <p>
90                 No activity yet on this contract.
91               </p><p>
92                 In OpenERP, contracts and projects are implemented using
93                 analytic account. So, you can track costs and revenues to analyse
94                 your margins easily.
95               </p><p>
96                 Costs will be created automatically when you register supplier
97                 invoices, expenses or timesheets.
98               </p><p>
99                 Revenues will be created automatically when you create customer
100                 invoices. Customer invoices can be created based on sale orders
101                 (fixed price invoices), on timesheets (based on the work done) or
102                 on expenses (e.g. reinvoicing of travel costs).
103               </p>
104             </field>
105         </record>
106
107  
108         <record id="account_analytic_account_timesheet_form" model="ir.ui.view">
109             <field name="name">account.analytic.account.invoice.form</field>
110             <field name="model">account.analytic.account</field>
111             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
112             <field name="arch" type="xml">
113                 <xpath expr='//div[@name="project"]' position='inside'>
114                     <field name="use_timesheets"/>
115                     <label for="use_timesheets"/>
116                 </xpath>
117                 <xpath expr='//div[@name="buttons"]' position='inside'>
118                     <button string="Costs and Revenues"
119                         name="%(act_analytic_cost_revenue)d"
120                         type="action"/>
121
122                 </xpath>
123             </field>
124         </record>
125
126         <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
127             <field name="name">Timesheet Activities</field>
128             <field name="type">ir.actions.act_window</field>
129             <field name="res_model">hr.analytic.timesheet</field>
130             <field name="view_type">form</field>
131             <field name="view_mode">tree,form</field>
132             <field name="context">{"search_default_today":1}</field>
133             <field name="search_view_id" ref="hr_timesheet_line_search"/>
134             <field name="help" type="html">
135               <p class="oe_view_nocontent_create">
136                 Click to record activities.
137               </p><p>
138                 You can register and track your workings hours by project every
139                 day. Every time spent on a project will become a cost in the
140                 analytic accounting/contract and can be re-invoiced to
141                 customers if required.
142               </p>
143             </field>
144         </record>
145
146         <menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
147
148         <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
149             <field name="name">hr.timesheet.employee.extd_form</field>
150             <field name="model">hr.employee</field>
151             <field name="inherit_id" ref="hr.view_employee_form"/>
152             <field name="arch" type="xml">
153                 <xpath expr="//group[@name='active_group']" position="before">
154                     <group string="Timesheets">
155                         <field name="product_id" domain="[('type','=','service')]"/>
156                         <field name="journal_id"/>
157                     </group>
158                 </xpath>
159             </field>
160         </record>
161
162         <menuitem id="menu_hr_timesheet_reports" parent="hr.menu_hr_reporting" sequence="5" name="Timesheet"/>
163
164
165     </data>
166 </openerp>