[IMP] simplified views
[odoo/odoo.git] / addons / hr_timesheet_sheet / process / hr_timesheet_sheet_process.xml
old mode 100644 (file)
new mode 100755 (executable)
index 8ba8e03..9db1347
 <?xml version="1.0" ?>
 <openerp>
-       <data>
-               
-               <!-- 
-                       Process
-               -->
-               
-               <record id="process_process_hrtimesheetworkflow0" model="process.process">
-                       <field eval="&quot;&quot;&quot;Hr Timesheet flow for services companies.&quot;&quot;&quot;" name="note"/>
-                       <field eval="1" name="active"/>
-                       <field eval="&quot;&quot;&quot;Hr Timesheet Workflow&quot;&quot;&quot;" name="name"/>
-               </record>
-               
-               <!-- 
-                       Process Node
-               -->
-                       
-               <record id="process_node_workontask0" model="process.node">
-                       <field name="menu_id" ref="project.menu_action_view_task"/>
-                       <field name="model_id" ref="project.model_project_task"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Work on Task&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;Defines the work summary of task&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="1" name="flow_start"/>
-               </record>
-       
-               <record id="process_node_attendance0" model="process.node">
-                       <field name="menu_id" ref="hr_attendance.menu_si_so"/>
-                       <field name="model_id" ref="hr.model_hr_employee"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;Defines employee's timesheet entry&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="1" name="flow_start"/>
-               </record>
-       
-               <record id="process_node_timesheet0" model="process.node">
-                       <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
-                       <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
-                       <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;Defines the task work entry into timesheet line&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
+    <data>
+        
+        <!-- 
+            Process
+        -->
+        
+        <record id="process_process_hrtimesheetprocess0" model="process.process">
+            <field eval="1" name="active"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;Hr Timesheet&quot;&quot;&quot;" name="name"/>
+        </record>
+        
+        <!-- 
+            Process Node
+        -->
+    
+        <record id="process_node_attendance0" model="process.node">
+            <field name="model_id" ref="hr.model_hr_employee"/>
+            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;Employee's timesheet entry&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
+            <field eval="1" name="flow_start"/>
+        </record>
+    
+        <record id="process_node_timesheet0" model="process.node">
+            <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;Information of time spent on a service&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
+            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
+            <field eval="0" name="flow_start"/>
+        </record>
+    
+        <record id="process_node_drafttimesheetsheet0" model="process.node">
+            <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Draft Timesheet&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;State is 'draft'.&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
             <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="0" name="flow_start"/>
-               </record>
-       
-               <record id="process_node_drafttimesheetsheet0" model="process.node">
-                       <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
-                       <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Draft Timesheet sheet&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;Encode Your hours and Sign in / out&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="0" name="flow_start"/>
-               </record>
-       
-               <record id="process_node_confirmedtimesheet0" model="process.node">
-                       <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
-                       <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Confirmed Timesheet&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;At the end of the period (week/month)&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="0" name="flow_start"/>
-               </record>
+            <field eval="0" name="flow_start"/>
+        </record>
+    
+        <record id="process_node_confirmedtimesheet0" model="process.node">
+            <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Confirmed&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;State is 'confirmed'.&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
+            <field eval="&quot;&quot;&quot;object.state=='confirm'&quot;&quot;&quot;" name="model_states"/>
+            <field eval="0" name="flow_start"/>
+        </record>
 
-               <record id="process_node_validatedtimesheet0" model="process.node">
-                       <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form_my_current"/>
-                       <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Validated Timesheet&quot;&quot;&quot;" name="name"/>
-            <field eval="&quot;&quot;&quot;Control by the project manager&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="0" name="flow_start"/>
-               </record>
-       
-               <record id="process_node_invoiceonwork0" model="process.node">
-                       <field name="menu_id" ref="account.menu_finance_invoice"/>
-                       <field name="model_id" ref="account.model_account_invoice"/>
-                       <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
-                       <field eval="&quot;&quot;&quot;Invoice on Work&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;Invoice based on timesheet&quot;&quot;&quot;" name="note"/>
-                       <field name="process_id" ref="process_process_hrtimesheetworkflow0"/>
-                       <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
-                       <field eval="0" name="flow_start"/>
-               </record>
-               
-               <!-- 
-                       Process Transition
-               -->
-       
-               <record id="process_transition_tasktimesheet0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Timesheet')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Work on Task')]"/>
-               </record>
-       
-               <record id="process_transition_attendance0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Attendance&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;Attendance entry moves into the timesheet&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Draft Timesheet sheet')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Attendance')]"/>
-               </record>
-       
-               <record id="process_transition_timesheet0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Timesheet&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;timesheet entry is into draft state.&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Draft Timesheet sheet')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Timesheet')]"/>
-               </record>
-       
-               <record id="process_transition_confirmtimesheet0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Confirm Timesheet&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;timesheet is confirmed at the end of the week / month&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Confirmed Timesheet')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Draft Timesheet sheet')]"/>
-               </record>
-       
-               <record id="process_transition_validatetimesheet0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Validate Timesheet&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;Timesheet is validate by project manager.&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Validated Timesheet')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Confirmed Timesheet')]"/>
-               </record>
-       
-               <record id="process_transition_invoiceontimesheet0" model="process.transition">
-                       <field eval="[(6,0,[])]" name="role_ids"/>
-                       <field eval="[(6,0,[])]" name="transition_ids"/>
-                       <field eval="&quot;&quot;&quot;Invoice on timesheet&quot;&quot;&quot;" name="name"/>
-                       <field eval="&quot;&quot;&quot;Creates invoice based on timesheet&quot;&quot;&quot;" name="note"/>
-                       <field model="process.node" name="target_node_id" search="[('name','=','Invoice on Work')]"/>
-                       <field model="process.node" name="source_node_id" search="[('name','=','Confirmed Timesheet')]"/>
-               </record>
+        <record id="process_node_validatedtimesheet0" model="process.node">
+            <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Validated&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;State is 'validated'.&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
+            <field eval="&quot;&quot;&quot;object.state=='done'&quot;&quot;&quot;" name="model_states"/>
+            <field eval="0" name="flow_start"/>
+        </record>
+    
+        <record id="process_node_invoiceonwork0" model="process.node">
+            <field name="menu_id" ref="account.menu_finance_invoice"/>
+            <field name="model_id" ref="account.model_account_invoice"/>
+            <field eval="&quot;&quot;&quot;subflow&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Invoice on Work&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;Based on the timesheet&quot;&quot;&quot;" name="note"/>
+            <field name="subflow_id" ref="account.process_process_invoiceprocess0"/>
+            <field name="process_id" ref="process_process_hrtimesheetprocess0"/>
+            <field eval="&quot;&quot;&quot;object.state=='draft'&quot;&quot;&quot;" name="model_states"/>
+            <field eval="0" name="flow_start"/>
+        </record>
 
-       </data>
-</openerp>
\ No newline at end of file
+        <record id="process_node_workontask0" model="process.node">
+            <field name="menu_id" ref="hr_timesheet_sheet.menu_act_hr_timesheet_sheet_form"/>
+            <field name="model_id" ref="hr_timesheet_sheet.model_hr_timesheet_sheet_sheet"/>
+            <field eval="&quot;&quot;&quot;state&quot;&quot;&quot;" name="kind"/>
+            <field eval="&quot;&quot;&quot;Work on Task&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;Defines the work summary of task&quot;&quot;&quot;" name="note"/>
+            <field name="process_id" ref="hr_timesheet_sheet.process_process_hrtimesheetprocess0"/>
+            <field eval="&quot;&quot;&quot;object.state in ('open', pending', 'done', 'cancelled')&quot;&quot;&quot;" name="model_states"/>
+            <field eval="1" name="flow_start"/>
+        </record>
+        
+        <!-- 
+            Process Transition
+        -->
+        
+        <record id="res_roles_hr0" model="res.roles">
+            <field eval="&quot;&quot;&quot;HR&quot;&quot;&quot;" name="name"/>
+        </record>
+        
+        <record id="hr_timesheet_sheet.t1" model="workflow.transition">
+            <field name="role_id" ref="res_roles_hr0"/>
+        </record>
+    
+        <record id="process_transition_attendancetimesheet0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Sign in/out&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;The employee signs in and signs out.&quot;&quot;&quot;" name="note"/>
+            <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_attendance0"/>
+        </record>
+    
+        <record id="process_transition_timesheetdraft0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Service&quot;&quot;&quot;" name="name"/>
+            <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"/>
+            <field model="process.node" name="target_node_id" ref="process_node_drafttimesheetsheet0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_timesheet0"/>
+        </record>
+    
+        <record id="process_transition_confirmtimesheet0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Confirmation&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;The employee periodically confirms his own timesheets.&quot;&quot;&quot;" name="note"/>
+            <field model="process.node" name="target_node_id" ref="process_node_confirmedtimesheet0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_drafttimesheetsheet0"/>
+            <field eval="[(6,0,[ref('hr_timesheet_sheet.t1')])]" name="transition_ids"/>
+        </record>
+    
+        <record id="process_transition_validatetimesheet0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Validation&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;The project manager validates the timesheets.&quot;&quot;&quot;" name="note"/>
+            <field model="process.node" name="target_node_id" ref="process_node_validatedtimesheet0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
+        </record>
+    
+        <record id="process_transition_invoiceontimesheet0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Billing&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;The invoice is created based on the timesheet.&quot;&quot;&quot;" name="note"/>
+            <field model="process.node" name="target_node_id" ref="process_node_invoiceonwork0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_confirmedtimesheet0"/>
+        </record>
+        
+        <record id="process_transition_tasktimesheet0" model="process.transition">
+            <field eval="[(6,0,[])]" name="role_ids"/>
+            <field eval="[(6,0,[])]" name="transition_ids"/>
+            <field eval="&quot;&quot;&quot;Task timesheet&quot;&quot;&quot;" name="name"/>
+            <field eval="&quot;&quot;&quot;Moves task entry into the timesheet line&quot;&quot;&quot;" name="note"/>
+            <field model="process.node" name="target_node_id" ref="process_node_timesheet0"/>
+            <field model="process.node" name="source_node_id" ref="process_node_workontask0"/>
+         </record>        
+        
+        <!-- 
+            Process Action
+        -->
+        
+        <record id="process_transition_action_draftconfirmtimesheet0" model="process.transition.action">
+            <field eval="&quot;&quot;&quot;button_confirm&quot;&quot;&quot;" name="action"/>
+            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+            <field eval="&quot;&quot;&quot;Confirm&quot;&quot;&quot;" name="name"/>
+            <field name="transition_id" ref="process_transition_confirmtimesheet0"/>
+        </record>
+        
+        <record id="process_transition_action_validatetimesheet0" model="process.transition.action">
+            <field eval="&quot;&quot;&quot;write({'state':'done'})&quot;&quot;&quot;" name="action"/>
+            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+            <field eval="&quot;&quot;&quot;Validate&quot;&quot;&quot;" name="name"/>
+            <field name="transition_id" ref="process_transition_validatetimesheet0"/>
+        </record>
+        
+        <record id="process_transition_action_refusetimesheet0" model="process.transition.action">
+            <field eval="&quot;&quot;&quot;write({'state':'draft'})&quot;&quot;&quot;" name="action"/>
+            <field eval="&quot;&quot;&quot;object&quot;&quot;&quot;" name="state"/>
+            <field eval="&quot;&quot;&quot;Refuse&quot;&quot;&quot;" name="name"/>
+            <field name="transition_id" ref="process_transition_validatetimesheet0"/>
+        </record>
+        
+    </data>
+</openerp>