<div class="oe_title">
<label for="employee_id" class="oe_edit_only"/>
<h1><field name="employee_id" on_change="onchange_employee_id(employee_id)" class="oe_inline"/></h1>
+ <field name="user_id" invisible="1"/>
</div>
<group>
<group>
<field name="total_attendance" widget="float_time"/>
<field name="total_timesheet" widget="float_time"/>
<field name="total_difference" widget="float_time"/>
- <field name="user_id" invisible="1"/>
</group>
</group>
<notebook>
<page string="Summary">
- <widget type="weekly_timesheet">
+ <widget type="weekly_timesheet" attrs="{'readonly': [['state', 'not in', ['new', 'draft']]]}">
</widget>
</page>
<page string="Details">
- <field context="{'user_id':user_id}" name="timesheet_ids" nolabel="1">
+ <field context="{'employee_id': employee_id, 'user_id':user_id, 'timesheet_date_from': date_from, 'timesheet_date_to': date_to}" name="timesheet_ids" nolabel="1">
<tree editable="top" string="Timesheet Activities">
<field name="date"/>
<field domain="[('type','in',['normal', 'contract']), ('state', '<>', 'close'),('use_timesheets','=',1)]" name="account_id" on_change="on_change_account_id(account_id, user_id)" context="{'default_use_timesheets': 1}"/>
<field name="name"/>
- <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time" string="Hours"/>
+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)" widget="float_time" string="Hours" sum="Hours"/>
<field name="to_invoice" widget="selection"/>
<field invisible="1" name="journal_id"/>
<field invisible="1" name="product_id" domain="[('type','=','service')]" on_change="on_change_unit_amount(product_id, unit_amount, False, product_uom_id,journal_id)"/>
</page>
<page string="Attendances" groups="base.group_hr_attendance">
<group>
- <field context="{'user_id':user_id}" name="attendances_ids" nolabel="1">
+ <field context="{'employee_id': employee_id, 'user_id':user_id}" name="attendances_ids" nolabel="1">
<tree string="Attendances" editable="bottom">
<field name="name"/>
<field name="action"/>
<field name="period_ids">
<tree colors="red:total_difference<0.1;blue:total_difference>=0.1" string="Period">
<field name="name"/>
- <field name="total_attendance" widget="float_time"/>
- <field name="total_timesheet" widget="float_time"/>
- <field name="total_difference" widget="float_time"/>
+ <field name="total_attendance" widget="float_time" sum="Attendances"/>
+ <field name="total_timesheet" widget="float_time" sum="Timesheets"/>
+ <field name="total_difference" widget="float_time" sum="Differences"/>
</tree>
</field>
</page>
</notebook>
</sheet>
<div class="oe_chatter">
- <field name="message_ids" colspan="4" widget="mail_thread" nolabel="1"/>
+ <field name="message_ids" widget="mail_thread"/>
<field name="message_follower_ids" widget="mail_followers"/>
</div>
</form>
</record>
<act_window
- 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"/>
+ context="{'search_default_sheet_id': [active_id]}"
+ id="act_hr_timesheet_sheet_sheet_by_account"
+ name="Timesheet by Account"
+ groups="base.group_hr_attendance"
+ res_model="hr_timesheet_sheet.sheet.account"
+ src_model="hr_timesheet_sheet.sheet"/>
<act_window
- 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"/>
+ context="{'search_default_sheet_id': [active_id]}"
+ id="act_hr_timesheet_sheet_sheet_by_day"
+ name="Timesheet by Day"
+ groups="base.group_hr_attendance"
+ res_model="hr_timesheet_sheet.sheet.day"
+ src_model="hr_timesheet_sheet.sheet"/>
+
<record id="hr_timesheet_sheet_tree_simplified" model="ir.ui.view">
<field name="name">hr.timesheet.sheet.tree</field>
<field name="model">hr_timesheet_sheet.sheet</field>