<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
- <!-- Editable current timesheet used in dashboard-->
<record id="hr_timesheet_sheet_tree" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree</field>
<field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">tree</field>
<field name="arch" type="xml">
- <tree string="Timesheets" editable="top">
+ <tree string="Timesheets"
+ colors="blue:state == 'draft';grey:state == 'done'">
<field name="user_id"/>
- <field name="department_id"/>
<field name="date_from"/>
<field name="date_to"/>
<field name="name"/>
+ <field name="department_id"/>
<field name="total_attendance" groups="hr_attendance.group_hr_attendance"/>
<field name="total_timesheet"/>
<field name="total_difference" groups="hr_attendance.group_hr_attendance"/>
</tree>
</field>
</record>
-
+ <record id="hr_timesheet_sheet_graph" model="ir.ui.view">
+ <field name="name">hr.timesheet.sheet.graph</field>
+ <field name="model">hr_timesheet_sheet.sheet</field>
+ <field name="type">graph</field>
+ <field name="arch" type="xml">
+ <graph string="Timesheets" type="bar">
+ <field name="name"/>
+ <field name="total_attendance" operator="+"/>
+ <field name="total_timesheet" operator="+"/>
+ </graph>
+ </field>
+ </record>
<record id="hr_timesheet_account_form" model="ir.ui.view">
<field name="name">hr.timesheet.account.form</field>
<field name="model">hr_timesheet_sheet.sheet.account</field>
<field name="sheet_id" select="1"/>
<field name="name" select="1"/>
<field name="total" sum="Total"/>
- <field name="invoice_rate" select="2"/>
+ <field name="invoice_rate"/>
</form>
</field>
</record>
<field name="date_from"/>
<field name="date_to"/>
<field name="company_id" select="1" groups="base.group_multi_company"/>
- <field name="department_id"/>
+ <field name="department_id" groups="base.group_extended"/>
<notebook colspan="4">
<page string="Daily View">
<group col="6" colspan="4">
</group>
<field colspan="3" context="name=date_current,user_id=user_id" height="100" name="attendances_ids" nolabel="1" groups="hr_attendance.group_hr_attendance">
- <tree string="Attendances">
+ <tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field invisible="1" name="employee_id"/>
<field name="total_difference" widget="float_time" groups="hr_attendance.group_hr_attendance"/>
</tree>
</field>
- <field name="total_attendance" widget="float_time"/>
- <field name="total_timesheet" widget="float_time"/>
- <field name="total_difference" widget="float_time"/>
+ <group colspan="4" col="6">
+ <field name="total_attendance" widget="float_time"/>
+ <field name="total_timesheet" widget="float_time"/>
+ <field name="total_difference" widget="float_time"/>
+ </group>
</page>
</notebook>
<field name="state"/>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Search Timesheet">
- <group col="10" colspan="4">
- <filter icon="terp-crm" string="Unvalidated" domain="[('state','<>','done'),('date_to','<',time.strftime('%%Y-%%m-%%d'))]" help="Unvalidated Timesheets"/>
- <separator orientation="vertical"/>
- <field name="state">
- <filter icon="terp-hr" domain="[('state','=','draft')]" help="Draft Timesheets"/>
- <filter icon="terp-hr" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
- </field>
- <field name="name" select="1"/>
- <field name="user_id" select="1" widget="selection">
- <filter icon="terp-partner" domain="[('user_id','=',uid)]" help="My Timesheet"/>
- </field>
+ <group col="10" colspan="4">
+ <filter icon="terp-crm" string="In Draft" domain="[('state','in',('draft', 'new'))]" help="Unvalidated Timesheets"/>
+ <filter icon="terp-crm" string="To Validate" domain="[('state','=','confirm')]" help="Confirmed Timesheets"/>
+ <separator orientation="vertical"/>
+ <field name="user_id" select="1" widget="selection"/>
+ <field name="date_from"/>
<field name="department_id" widget="selection">
<filter icon="terp-crm"
domain="[('department_id','=',context.get('department_id',False))]"
</field>
</group>
<newline/>
- <group expand="1" string="Group By..." colspan="4" col="20">
+ <group expand="1" string="Group By...">
<filter string="Users" icon="terp-project" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Department" icon="terp-project" domain="[]" context="{'group_by':'department_id'}"/>
- </group>
+ </group>
</search>
</field>
</record>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_id" eval="False"/>
+ <field name="context">{'search_default_my_timesheet':1, 'search_default_user_id':uid }</field>
<field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
</record>
+
<!--Time Tracking menu in project Management-->
<menuitem icon="terp-project" id="base.menu_main_pm" name="Project Management" sequence="1"/>
<menuitem
<field name="type">search</field>
<field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
<field name="arch" type="xml">
- <field name="action_desc" position="after">
+ <field name="action" position="after">
<field name="sheet_id" select="1" />
</field>
</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_form"/>
<field name="arch" type="xml">
<field name="action_desc" position="after">
- <field name="sheet_id" select="2"/>
+ <field name="sheet_id"/>
</field>
</field>
</record>
<field name="type">tree</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_tree"/>
<field name="arch" type="xml">
- <field name="action_desc" position="after">
+ <field name="action" position="after">
<field name="sheet_id"/>
</field>
</field>
<field name="type">tree</field>
<field name="inherit_id" ref="hr_attendance.view_attendance_who"/>
<field name="arch" type="xml">
- <field name="action_desc" position="after">
+ <field name="action" position="after">
<field name="sheet_id"/>
</field>
</field>
</field>
</record>
+ <!-- Timesheet Button on Employee Form -->
+ <act_window domain="[('user_id', '=', user_id)]" id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
+
</data>
</openerp>