[ADD] Added Demo data for the on change
[odoo/odoo.git] / addons / resource / resource_demo.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3     <data>
4
5         <!-- Example employee -->
6
7         <record id="timesheet_group1" model="resource.calendar">
8             <field name="name">38 Hours/Week</field>
9         </record>
10
11         <record model="resource.calendar.attendance">
12             <field name="name">Monday morning</field>
13             <field name="dayofweek">0</field>
14             <field name="hour_from">08</field>
15             <field name="hour_to">12</field>
16             <field name="calendar_id" ref="timesheet_group1"/>
17         </record>
18         <record model="resource.calendar.attendance">
19             <field name="name">Monday evening</field>
20             <field name="dayofweek">0</field>
21             <field name="hour_from">13</field>
22             <field name="hour_to">18</field>
23             <field name="calendar_id" ref="timesheet_group1"/>
24         </record>
25         <record model="resource.calendar.attendance">
26             <field name="name">Tuesday morning</field>
27             <field name="dayofweek">1</field>
28             <field name="hour_from">08</field>
29             <field name="hour_to">12</field>
30             <field name="calendar_id" ref="timesheet_group1"/>
31         </record>
32         <record model="resource.calendar.attendance">
33             <field name="name">Tuesday evening</field>
34             <field name="dayofweek">1</field>
35             <field name="hour_from">13</field>
36             <field name="hour_to">18</field>
37             <field name="calendar_id" ref="timesheet_group1"/>
38         </record>
39         <record model="resource.calendar.attendance">
40             <field name="name">Wednesday morning</field>
41             <field name="dayofweek">2</field>
42             <field name="hour_from">08</field>
43             <field name="hour_to">12</field>
44             <field name="calendar_id" ref="timesheet_group1"/>
45         </record>
46         <record model="resource.calendar.attendance">
47             <field name="name">Wednesday evening</field>
48             <field name="dayofweek">2</field>
49             <field name="hour_from">13</field>
50             <field name="hour_to">18</field>
51             <field name="calendar_id" ref="timesheet_group1"/>
52         </record>
53         <record model="resource.calendar.attendance">
54             <field name="name">Thursday morning</field>
55             <field name="dayofweek">3</field>
56             <field name="hour_from">08</field>
57             <field name="hour_to">12</field>
58             <field name="calendar_id" ref="timesheet_group1"/>
59         </record>
60         <record model="resource.calendar.attendance">
61             <field name="name">Thursday evening</field>
62             <field name="hour_from">13</field>
63             <field name="hour_to">18</field>
64             <field name="dayofweek">3</field>
65             <field name="calendar_id" ref="timesheet_group1"/>
66         </record>
67         <record model="resource.calendar.attendance">
68             <field name="name">Friday morning</field>
69             <field name="dayofweek">4</field>
70             <field name="hour_from">08</field>
71             <field name="hour_to">12</field>
72             <field name="calendar_id" ref="timesheet_group1"/>
73         </record>
74         <record model="resource.calendar.attendance">
75             <field name="name">Friday evening</field>
76             <field name="dayofweek">4</field>
77             <field name="hour_from">13</field>
78             <field name="hour_to">18</field>
79             <field name="calendar_id" ref="timesheet_group1"/>
80         </record>
81
82         <record id="resource_resource_demorsource" model="resource.resource">
83                 <field eval="0.8" name="time_efficiency"/>
84                 <field name="user_id" ref="base.user_demo"/>
85                 <field name="name">Demo Resource</field>
86                 <field eval="1" name="active"/>
87                 <field name="calendar_id" ref="timesheet_group1"/>
88                 <field name="resource_type">user</field>
89         </record>
90
91         <record id="resource_calendar_leaves_demoleave1" model="resource.calendar.leaves">
92                 <field name="name">Morning 2 Hours On Leave</field>
93                 <field name="resource_id" ref="resource_resource_demorsource"/>
94                 <field name="date_from" eval="time.strftime('%Y-%m-%d 08:00:00')"/>
95                 <field name="date_to" eval="time.strftime('%Y-%m-%d 11:00:00')"/>
96                 <field name="calendar_id" ref="timesheet_group1"/>
97         </record>
98
99         <record id="resource_calendar_leaves_demoleave2" model="resource.calendar.leaves">
100                 <field name="name">Half Day Seak Leave</field>
101                 <field name="resource_id" ref="resource_resource_demorsource"/>
102                 <field name="date_from"  eval="time.strftime('%Y-%m-%d 14:00:00')"/>
103                 <field name="date_to" eval="time.strftime('%Y-%m-%d 18:00:00')"/>
104                 <field name="calendar_id" ref="timesheet_group1"/>
105         </record>
106
107     </data>
108 </openerp>