[IMP]MRP :BOM view are improved
[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="type">tree</field>
9             <field name="arch" type="xml">
10                 <tree editable="bottom" string="Timesheet Lines">
11                     <field name="date" on_change="on_change_date(date)"/>
12                     <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
13                     <field name="journal_id" invisible="1"/>
14                     <field name="name"/>
15                     <field domain="[('type','=','normal'),('use_timesheets','=',1)]" name="account_id" context="{'default_use_timesheets': 1}"/>
16                     <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"/>
17                     <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" sum="Total time" widget="float_time"/>
18                     <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" invisible="1"/>
19                     <field name="amount" sum="Total cost" invisible="1"/>
20                     <field name="general_account_id" invisible="1"/>
21                 </tree>
22             </field>
23         </record>
24         <record id="hr_timesheet_line_form" model="ir.ui.view">
25             <field name="name">hr.analytic.timesheet.form</field>
26             <field name="model">hr.analytic.timesheet</field>
27             <field name="type">form</field>
28             <field name="arch" type="xml">
29                 <form string="Timesheet Lines">
30                     <group col="4">
31                         <field name="name" colspan="4"/>
32                         <field name="user_id" on_change="on_change_user_id(user_id)" required="1"/>
33                         <field name="date" on_change="on_change_date(date)"/>
34                     </group>
35                     <notebook>
36                         <page string="Information">
37                             <group>
38                                 <group string="Product">
39                                     <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')]"/>
40                                     <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
41                                     <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time"/>
42                                 </group>
43                                 <group string="Accounting">
44                                     <field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close'),('parent_id','!=',False)]" name="account_id"/>
45                                     <field name="amount"/>
46                                     <field name="general_account_id"/>
47                                     <field name="journal_id"/>
48                                 </group>
49                             </group>
50                         </page>
51                     </notebook>
52                 </form>
53             </field>
54         </record>
55
56         <record id="hr_timesheet_line_search" model="ir.ui.view">
57             <field name="name">hr.analytic.timesheet.search</field>
58             <field name="model">hr.analytic.timesheet</field>
59             <field name="type">search</field>
60             <field name="arch" type="xml">
61                 <search string="Timesheet">
62                     <group>
63                         <field name="date"/>
64                         <separator orientation="vertical"/>
65                         <field name="user_id"/>
66                         <field name="account_id"/>
67                     </group>
68                     <newline/>
69                     <group expand="0" string="Group By...">
70                         <filter string="Users" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
71                         <separator orientation="vertical"/>
72                         <filter string="Analytic account" icon="terp-folder-green" domain="[]" context="{'group_by':'account_id'}"/>
73                         <filter string="Product" icon="terp-accessories-archiver" domain="[]" context="{'group_by':'product_id'}"/>
74                         <separator orientation="vertical"/>
75                         <filter string="Date" icon="terp-go-month" domain="[]" context="{'group_by':'date'}"/>
76                     </group>
77                 </search>
78             </field>
79
80         </record>
81         
82         <record id="account_analytic_account_timesheet_form" model="ir.ui.view">
83             <field name="name">account.analytic.account.invoice.form</field>
84             <field name="model">account.analytic.account</field>
85             <field name="type">form</field>
86             <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
87             <field name="arch" type="xml">
88                 <xpath expr='//separator[@name="project_sep"]' position='replace'>
89                     <separator name="project_sep" string="Project Management" colspan="4"/> <!-- removal of invisible attribute -->
90                 </xpath>
91                 <xpath expr='//separator[@name="project_sep"]' position='after'>
92                     <field name="use_timesheets"/>
93                 </xpath>
94             </field>
95         </record>
96
97         <record id="act_hr_timesheet_line_evry1_all_form" model="ir.actions.act_window">
98             <field name="name">Timesheet Lines</field>
99             <field name="type">ir.actions.act_window</field>
100             <field name="res_model">hr.analytic.timesheet</field>
101             <field name="view_type">form</field>
102             <field name="view_mode">tree,form</field>
103             <field name="context">{"search_default_today":1}</field>
104             <field name="search_view_id" ref="hr_timesheet_line_search"/>
105             <field name="help">Through this menu you can register and follow your workings hours by project every day.</field>
106         </record>
107
108         <menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
109
110         <record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
111             <field name="name">hr.timesheet.employee.extd_form</field>
112             <field name="model">hr.employee</field>
113             <field name="inherit_id" ref="hr.view_employee_form"/>
114             <field name="arch" type="xml">
115                 <page string="Categories" position="after">
116                     <page string="Timesheets" groups="base.group_hr_user">
117                         <field name="product_id" domain="[('type','=','service')]"/>
118                         <field name="journal_id" widget="selection"/>
119                     </page>
120                 </page>
121             </field>
122         </record>
123
124         <menuitem id="menu_hr_timesheet_reports" parent="hr.menu_hr_reporting" sequence="5" name="Timesheet"/>
125
126
127     </data>
128 </openerp>