[FIX]: Using 'State' instead of 'Status'.
[odoo/odoo.git] / addons / hr_timesheet_sheet / process / hr_timesheet_sheet_process.xml
1 <?xml version="1.0" ?>
2 <openerp>
3     <data>
4         
5         <!-- 
6             Process
7         -->
8         
9         <record id="process_process_hrtimesheetprocess0" model="process.process">
10             <field eval="1" name="active"/>
11             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
12             <field eval="&quot;&quot;&quot;Hr Timesheet Process&quot;&quot;&quot;" name="name"/>
13         </record>
14         
15         <!-- 
16             Process Node
17         -->
18         
19         <record id="process_node_analyticcost0" model="process.node">
20             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
21             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
22             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
23             <field eval="&quot;&quot;&quot;Analytic cost&quot;&quot;&quot;" name="name"/>
24             <field eval="&quot;&quot;&quot;Analytic cost is created&quot;&quot;&quot;" name="note"/>
25             <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
26             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
27             <field eval="0" name="flow_start"/>
28         </record>
29     
30         <record id="process_node_review0" model="process.node">
31             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
32             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
33             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
34             <field eval="&quot;&quot;&quot;Review&quot;&quot;&quot;" name="name"/>
35             <field eval="&quot;&quot;&quot;Review end of day check day is complete&quot;&quot;&quot;" name="note"/>
36             <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
37             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
38             <field eval="0" name="flow_start"/>
39         </record>
40     
41         <record id="process_node_timesheetconfirming0" model="process.node">
42             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
43             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
44             <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
45             <field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
46             <field eval="&quot;&quot;&quot;Information of time spent on a service&quot;&quot;&quot;" name="note"/>
47             <field name="subflow_id" ref="process_process_hrtimesheetprocess0"/>
48             <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
49             <field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
50             <field eval="0" name="flow_start"/>
51         </record>
52         
53         <record id="process_node_timesheetline0" model="process.node">
54             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
55             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
56             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
57             <field eval="&quot;&quot;&quot;Timesheet Line&quot;&quot;&quot;" name="name"/>
58             <field eval="&quot;&quot;&quot;Encode your timesheet line&quot;&quot;&quot;" name="note"/>
59             <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
60             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
61             <field eval="0" name="flow_start"/>
62         </record>
63         
64         <record id="process_node_phonecall0" model="process.node">
65             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
66             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
67             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
68             <field eval="&quot;&quot;&quot;Phone call&quot;&quot;&quot;" name="name"/>
69             <field eval="&quot;&quot;&quot;Whatever time u spent for phone call&quot;&quot;&quot;" name="note"/>
70             <field name="process_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
71             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
72             <field eval="1" name="flow_start"/>
73         </record>
74             
75         <record id="process_node_attendance0" model="process.node">
76             <field name="model_id" ref="hr.model_hr_employee"/>
77             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
78             <field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
79             <field eval="&quot;&quot;&quot;Employee's timesheet entry&quot;&quot;&quot;" name="note"/>
80             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
81             <field eval="1" name="flow_start"/>
82         </record>
83     
84         <record id="process_node_timesheet0" model="process.node">
85             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
86             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
87             <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
88             <field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
89             <field eval="&quot;&quot;&quot;Defines the task work entry into timesheet line&quot;&quot;&quot;" name="note"/>
90             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
91             <field name="subflow_id" ref="hr_timesheet.process_process_timesheetprocess0"/>
92             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
93             <field eval="0" name="flow_start"/>
94         </record>
95     
96         <record id="process_node_drafttimesheetsheet0" model="process.node">
97             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
98             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
99             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
100             <field eval="&quot;&quot;&quot;Draft Timesheet&quot;&quot;&quot;" name="name"/>
101             <field eval="&quot;&quot;&quot;State is draft.&quot;&quot;&quot;" name="note"/>
102             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
103             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
104             <field eval="0" name="flow_start"/>
105         </record>
106     
107         <record id="process_node_confirmedtimesheet0" model="process.node">
108             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
109             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
110             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
111             <field eval="&quot;&quot;&quot;Confirmed Timesheet&quot;&quot;&quot;" name="name"/>
112             <field eval="&quot;&quot;&quot;State is confirmed.&quot;&quot;&quot;" name="note"/>
113             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
114             <field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
115             <field eval="0" name="flow_start"/>
116         </record>
117
118         <record id="process_node_validatedtimesheet0" model="process.node">
119             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
120             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
121             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
122             <field eval="&quot;&quot;&quot;Validated Timesheet&quot;&quot;&quot;" name="name"/>
123             <field eval="&quot;&quot;&quot;State is validated.&quot;&quot;&quot;" name="note"/>
124             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
125             <field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
126             <field eval="0" name="flow_start"/>
127         </record>
128     
129         <record id="process_node_invoiceonwork0" model="process.node">
130             <field name="menu_id" ref="account.menu_finance_invoice"/>
131             <field name="model_id" ref="account.model_account_invoice"/>
132             <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
133             <field eval="&quot;&quot;&quot;Invoice on Work&quot;&quot;&quot;" name="name"/>
134             <field eval="&quot;&quot;&quot;Based on the timesheet&quot;&quot;&quot;" name="note"/>
135             <field name="subflow_id" ref="account.process_process_invoiceprocess0"/>
136             <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
137             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
138             <field eval="0" name="flow_start"/>
139         </record>
140
141         <record id="process_node_workontask0" model="process.node">
142             <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
143             <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
144             <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
145             <field eval="&quot;&quot;&quot;Work on Task&quot;&quot;&quot;" name="name"/>
146             <field eval="&quot;&quot;&quot;Defines the work summary of task&quot;&quot;&quot;" name="note"/>
147             <field name="process_id" ref="hr_timesheet_sheet.process_process_hrtimesheetprocess0"/>
148             <field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
149             <field eval="1" name="flow_start"/>
150         </record>
151         
152         <!-- 
153             Process Transition
154         -->
155         
156         <record id="res_roles_hr0" model="res.roles">
157             <field eval="&quot;&quot;&quot;HR&quot;&quot;&quot;" name="name"/>
158         </record>
159         
160         <record id="hr_timesheet_sheet.t1" model="workflow.transition">
161             <field name="role_id" ref="res_roles_hr0"/>
162         </record>
163     
164         <record id="process_transition_attendancetimesheet0" model="process.transition">
165             <field eval="[(6,0,[])]" name="role_ids"/>
166             <field eval="[(6,0,[])]" name="transition_ids"/>
167             <field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>
168             <field eval="&quot;&quot;&quot;The employee signs in and signs out.&quot;&quot;&quot;" name="note"/>
169             <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
170             <field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
171         </record>
172     
173         <record id="process_transition_timesheetdraft0" model="process.transition">
174             <field eval="[(6,0,[])]" name="role_ids"/>
175             <field eval="[(6,0,[])]" name="transition_ids"/>
176             <field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
177             <field eval="&quot;&quot;&quot;The timesheet line represents the time spent by the employee on a specific service provided.&quot;&quot;&quot;" name="note"/>
178             <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
179             <field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
180         </record>
181     
182         <record id="process_transition_confirmtimesheet0" model="process.transition">
183             <field eval="[(6,0,[])]" name="role_ids"/>
184             <field eval="[(6,0,[])]" name="transition_ids"/>
185             <field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
186             <field eval="&quot;&quot;&quot;The employee periodically confirms his own timesheets.&quot;&quot;&quot;" name="note"/>
187             <field model="process.node" name="target_node_id" ref="process_node_confirmedtimesheet0"/>
188             <field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
189             <field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
190         </record>
191     
192         <record id="process_transition_validatetimesheet0" model="process.transition">
193             <field eval="[(6,0,[])]" name="role_ids"/>
194             <field eval="[(6,0,[])]" name="transition_ids"/>
195             <field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
196             <field eval="&quot;&quot;&quot;The project manager validates the timesheets.&quot;&quot;&quot;" name="note"/>
197             <field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
198             <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
199         </record>
200     
201         <record id="process_transition_invoiceontimesheet0" model="process.transition">
202             <field eval="[(6,0,[])]" name="role_ids"/>
203             <field eval="[(6,0,[])]" name="transition_ids"/>
204             <field eval="&quot;&quot;&quot;Invoicing&quot;&quot;&quot;" name="name"/>
205             <field eval="&quot;&quot;&quot;The invoice is created based on the timesheet.&quot;&quot;&quot;" name="note"/>
206             <field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
207             <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
208         </record>
209         
210         <record id="process_transition_phonecallencoding0" model="process.transition">
211             <field eval="[(6,0,[])]" name="role_ids"/>
212             <field eval="[(6,0,[])]" name="transition_ids"/>
213             <field eval="&quot;&quot;&quot;Phone call encoding&quot;&quot;&quot;" name="name"/>
214             <field eval="&quot;&quot;&quot;Encode how much time u spent on phone call&quot;&quot;&quot;" name="note"/>
215             <field model="process.node" name="target_node_id" ref="process_node_timesheetline0"/>
216             <field model="process.node" name="source_node_id" ref="process_node_phonecall0"/>
217         </record>
218         
219         <record id="process_transition_createanalyticcose0" model="process.transition">
220             <field eval="[(6,0,[])]" name="role_ids"/>
221             <field eval="[(6,0,[])]" name="transition_ids"/>
222             <field eval="&quot;&quot;&quot;Create Analytic cost&quot;&quot;&quot;" name="name"/>
223             <field eval="&quot;&quot;&quot;Creates your analytic cost accoording to quantity&quot;&quot;&quot;" name="note"/>
224             <field model="process.node" name="target_node_id" ref="process_node_analyticcost0"/>
225             <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/>
226         </record>
227     
228         <record id="process_transition_reviewofwork0" model="process.transition">
229             <field eval="[(6,0,[])]" name="role_ids"/>
230             <field eval="[(6,0,[])]" name="transition_ids"/>
231             <field eval="&quot;&quot;&quot;Review of work&quot;&quot;&quot;" name="name"/>
232             <field eval="&quot;&quot;&quot;Review of your work at the end of the day&quot;&quot;&quot;" name="note"/>
233             <field model="process.node" name="target_node_id" ref="process_node_review0"/>
234             <field model="process.node" name="source_node_id" ref="process_node_timesheetline0"/>
235         </record>
236     
237         <record id="process_transition_confirmtimesheetsheet0" model="process.transition">
238             <field eval="[(6,0,[])]" name="role_ids"/>
239             <field eval="[(6,0,[])]" name="transition_ids"/>
240             <field eval="&quot;&quot;&quot;Confirm timesheet sheet&quot;&quot;&quot;" name="name"/>
241             <field eval="&quot;&quot;&quot;Confirm timesheet at the end of the period&quot;&quot;&quot;" name="note"/>
242             <field model="process.node" name="target_node_id" ref="process_node_timesheetconfirming0"/>
243             <field model="process.node" name="source_node_id" ref="process_node_review0"/>
244         </record>
245         
246         <record id="process_transition_tasktimesheet0" model="process.transition">
247             <field eval="[(6,0,[])]" name="role_ids"/>
248             <field eval="[(6,0,[])]" name="transition_ids"/>
249             <field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
250             <field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
251             <field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
252             <field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
253          </record>        
254         
255         <!-- 
256             Process Action
257         -->
258         
259         <record id="process_transition_action_draftconfirmtimesheet0" model="process.transition.action">
260             <field eval="&quot;&quot;&quot;button_confirm&quot;&quot;&quot;" name="action"/>
261             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
262             <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
263             <field name="transition_id" ref="process_transition_confirmtimesheet0"/>
264         </record>
265         
266         <record id="process_transition_action_validatetimesheet0" model="process.transition.action">
267             <field eval="&quot;&quot;&quot;write({'state':'done'})&quot;&quot;&quot;" name="action"/>
268             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
269             <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
270             <field name="transition_id" ref="process_transition_validatetimesheet0"/>
271         </record>
272         
273         <record id="process_transition_action_refusetimesheet0" model="process.transition.action">
274             <field eval="&quot;&quot;&quot;write({'state':'draft'})&quot;&quot;&quot;" name="action"/>
275             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
276             <field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
277             <field name="transition_id" ref="process_transition_validatetimesheet0"/>
278         </record>
279         
280         <record id="process_transition_action_reviewtimesheet0" model="process.transition.action">
281             <field eval="&quot;&quot;&quot;button_confirm&quot;&quot;&quot;" name="action"/>
282             <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
283             <field eval="&quot;&quot;&quot;Review&quot;&quot;&quot;" name="name"/>
284             <field name="transition_id" ref="process_transition_confirmtimesheetsheet0"/>
285         </record>
286         
287         
288     </data>
289 </openerp>