<field name="model">hr_timesheet_sheet.sheet.account</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Timesheet by Accounts">
- <field name="sheet_id" select="1"/>
- <field name="name" select="1" groups="analytic.group_analytic_accounting"/>
- <field name="total" sum="Total"/>
- <field name="invoice_rate"/>
+ <form string="Timesheet by Accounts" version="7.0">
+ <group col="4">
+ <field name="sheet_id"/>
+ <field name="name" groups="analytic.group_analytic_accounting"/>
+ <field name="total" sum="Total"/>
+ <field name="invoice_rate"/>
+ </group>
</form>
</field>
</record>
<field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Timesheet">
- <group colspan="4" col="6">
- <field name="employee_id" on_change="onchange_employee_id(employee_id)"/>
- <field name="user_id" invisible="1"/>
- <field name="date_from"/>
- <field name="date_to"/>
- <newline/>
+ <form string="Timesheet" version="7.0">
+ <header>
+ <button name="button_confirm" states="draft" string="Submited to Manager" type="object" class="oe_highlight"/>
+ <button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
+ <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" />
+ <button name="cancel" states="confirm" string="Refuse" type="workflow" groups="base.group_hr_user" />
+ <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
+ </header>
+ <sheet>
+ <label for="employee_id" class="oe_edit_only"/>
+ <h1><field name="employee_id" on_change="onchange_employee_id(employee_id)"/></h1>
+ <label for="date_from" class="oe_edit_only" string="Timesheet Period"/>
+ <h2>
+ From <field name="date_from"/>
+ to <field name="date_to"/>
+ </h2>
+ <group col="4">
<field name="name"/>
- <field name="company_id" select="1" groups="base.group_multi_company"/>
- <field name="department_id" groups="base.group_extended"/>
+ <field name="department_id"/>
+ <field name="company_id" groups="base.group_multi_company"/>
+ <field name="user_id" invisible="1"/>
</group>
- <notebook colspan="4">
+ <notebook>
<page string="Daily">
<group col="6" colspan="4">
<button name="button_dummy" string="Go to:" type="object" icon="terp-gtk-jump-to-ltr"/>
</tree>
</field>
<group col="4" colspan="1">
- <field name="state_attendance"/>
- <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr" attrs="{'invisible':[('state_attendance','<>','absent')]}"/>
- <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl" attrs="{'invisible':[('state_attendance','<>','present')]}"/>
- <field name="total_attendance_day" widget="float_time" colspan="4"/>
+ <field name="state_attendance"/>
+ <button name="sign_in" string="Sign In" type="object" icon="terp-gtk-jump-to-ltr"/>
+ <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
+ <field name="total_attendance_day" widget="float_time" colspan="4"/>
</group>
<field colspan="4" context="{'date':date_current,'user_id':user_id}" domain="[('name','=',date_current)]" name="timesheet_ids" nolabel="1">
<tree editable="top" string="Timesheet Lines">
<field invisible="1" name="general_account_id"/>
<field invisible="1" name="user_id" required="1"/>
</tree>
- <form string="Timesheet Lines">
+ <form string="Timesheet Lines" version="7.0">
<field name="date"/>
<field domain="[('type','=','normal'), ('state', '<>', 'close')]" name="account_id" on_change="on_change_account_id(account_id)"/>
<field name="name"/>
</group>
</page>
</notebook>
- <group col="6" colspan="4">
- <field name="state" widget="statusbar" statusbar_visible="new,confirm,done"/>
- <button name="button_confirm" states="draft" string="Submited to Manager" type="object" icon="terp-check"/>
- <button name="action_set_to_draft" states="done" string="Set to Draft" type="object" icon="terp-stock_effects-object-colorize"/>
- <button name="cancel" states="confirm" string="Refuse" type="workflow" icon="gtk-cancel" groups="base.group_hr_user"/>
- <button name="done" states="confirm" string="Approve" type="workflow" icon="terp-camera_test" groups="base.group_hr_user"/>
- </group>
+ </sheet>
</form>
</field>
</record>
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="date_from"/>
- <field name="department_id" widget="selection">
- <filter icon="terp-personal+"
- domain="[('department_id','=',context.get('department_id',False))]"
- help="My Departments Timesheet"/>
- </field>
+ <field name="department_id" widget="selection"/>
</group>
<newline/>
<group expand="0" string="Group By...">
<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, }</field>
+ <field name="context">{'search_default_my_timesheet':1}</field>
<field name="search_view_id" ref="view_hr_timesheet_sheet_filter"/>
<field name="help">Check your timesheets for a specific period. You can also encode time spent on a project (i.e. an analytic account) thus generating costs in the analytic account concerned.</field>
</record>
</field>
</field>
</record>
+
+ <record id="hr_timesheet_line_search" model="ir.ui.view">
+ <field name="name">hr.analytic.timesheet.search</field>
+ <field name="model">hr.analytic.timesheet</field>
+ <field name="type">form</field>
+ <field name="inherit_id" ref="hr_timesheet.hr_timesheet_line_search"/>
+ <field name="arch" type="xml">
+ <field name="date" position="after">
+ <field name="sheet_id"/>
+ </field>
+ </field>
+ </record>
+
<!--
hr.attendance inheritancy
-->
<field name="inherit_id" ref="hr_attendance.view_hr_attendance_filter" />
<field name="arch" type="xml">
<field name="action" position="after">
- <field name="sheet_id" select="1" />
+ <field name="sheet_id" />
</field>
</field>
</record>
</record>
<act_window
- context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
- id="act_hr_timesheet_sheet_sheet_by_day"
+ context="{'search_default_sheet_id': [active_id]}"
+ id="act_hr_timesheet_sheet_sheet_by_account"
name="Timesheet by Account"
res_model="hr_timesheet_sheet.sheet.account"
src_model="hr_timesheet_sheet.sheet"/>
<act_window
- context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
+ context="{'search_default_sheet_id': [active_id]}"
+ id="act_hr_timesheet_sheet_sheet_by_day"
+ name="Timesheet by Day"
+ res_model="hr_timesheet_sheet.sheet.day"
+ src_model="hr_timesheet_sheet.sheet"/>
+
+ <act_window
+ context="{'search_default_sheet_id': [active_id]}"
id="act_hr_timesheet_sheet_sheet_2_hr_analytic_timesheet"
name="Timesheet Lines"
res_model="hr.analytic.timesheet"
<act_window
- context="{'search_default_sheet_id': [active_id], 'default_sheet_id': active_id}"
+ context="{'search_default_sheet_id': [active_id]}"
id="act_hr_timesheet_sheet_sheet_2_hr_attendance"
name="Attendances"
res_model="hr.attendance"
</graph>
</field>
</record>
+
+ <record id="hr_timesheet_day_tree" model="ir.ui.view">
+ <field name="name">hr.timesheet.day.tree</field>
+ <field name="model">hr_timesheet_sheet.sheet.day</field>
+ <field name="type">tree</field>
+ <field name="arch" type="xml">
+ <tree colors="blue:total_difference<0.1;red:total_difference>=0.1" string="Period">
+ <field name="name"/>
+ <field name="total_attendance" widget="float_time" sum="Total Attendances"/>
+ <field name="total_timesheet" widget="float_time" sum="Total Timesheet"/>
+ <field name="total_difference" widget="float_time" sum="Total Difference"/>
+ </tree>
+ </field>
+ </record>
+
<!-- Timesheet Button on Employee Form -->
<act_window
context="{'search_default_employee_id': [active_id], 'default_employee_id': active_id}"