<tree string="Attendances">
<field name="name"/>
<field name="action"/>
- <field name="employee_id" invisible="True"/>
+ <field name="employee_id" invisible="1"/>
</tree>
</field>
<group col="1" colspan="1">
<field name="total_attendance_day" widget="float_time"/>
<field name="timesheet_ids" colspan="4" nolabel="1" domain="[('name','=',date_current)]" context="date=date_current,user_id=user_id">
<tree string="Timesheet" editable="top">
- <field name="date" />
- <field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal')]"/>
+ <field name="date" readonly="1"/>
+ <field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal'), ('state', '<>', 'close')]"/>
<field name="name" />
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" widget="float_time"/>
<field name="to_invoice"/>
- <field name="journal_id" invisible="True"/>
- <field name="product_id" invisible="True"/>
- <field name="product_uom_id" invisible="True" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
- <field name="amount" invisible="True"/>
- <field name="general_account_id" invisible="True"/>
- <field name="journal_id" invisible="True"/>
- <field name="user_id" required="1" invisible="True"/>
+ <field name="journal_id" invisible="1"/>
+ <field name="product_id" invisible="1"/>
+ <field name="product_uom_id" invisible="1" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
+ <field name="amount" invisible="1"/>
+ <field name="general_account_id" invisible="1"/>
+ <field name="journal_id" invisible="1"/>
+ <field name="user_id" required="1" invisible="1"/>
</tree>
</field>
<field name="total_difference_day" widget="float_time"/>
<field name="state"/>
<group col="4" colspan="2">
<button string="Confirm" name="button_confirm" states="draft" type="object"/>
- <button string="Cancel" name="cancel" states="done"/>
+ <button string="Set to Draft" name="action_set_to_draft" states="done" type="object"/>
<button string="Refuse" name="cancel" states="confirm"/>
<button string="Accept" name="done" states="confirm"/>
</group>
<field name="view_type">form</field>
<field name="view_id" ref="hr_timesheet_sheet_form" />
</record>
- <menuitem name="Human Resources/Timesheets/All timesheets"
+ <menuitem name="Human Resources/Timesheets/All Timesheets"
id="menu_act_hr_timesheet_sheet_form"
action="act_hr_timesheet_sheet_form" />
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
- <menuitem name="Human Resources/Timesheets/My timesheets"
+ <menuitem name="Human Resources/Timesheets/My Timesheets"
id="menu_act_hr_timesheet_sheet_form_my"
action="act_hr_timesheet_sheet_form_my" />
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
- <menuitem name="Human Resources/Timesheets/My timesheets/My timesheets to confirm"
+ <menuitem name="Human Resources/Timesheets/My Timesheets/My Timesheets to Confirm"
id="menu_act_hr_timesheet_sheet_form_my_confirm"
action="act_hr_timesheet_sheet_form_my_confirm" />
+ <wizard string="My department's timesheet"
+ model="hr.employee"
+ name="hr_timesheet_sheet.department.open"
+ id="act_hr_timesheet_sheet_form_department_current"/>
+ <menuitem name="Human Resources/Timesheets/My Department's Timesheets"
+ id="menu_act_hr_timesheet_sheet_form_department_current"
+ action="act_hr_timesheet_sheet_form_department_current"
+ icon="STOCK_JUSTIFY_FILL"
+ type="wizard"/>
+
+ <wizard string="My department's timesheet"
+ model="hr.employee"
+ name="hr_timesheet_sheet.department.validate.open"
+ id="act_hr_timesheet_sheet_form_department_validate"/>
+ <menuitem name="Human Resources/Timesheets/My Department's Timesheets/Timesheets to Validate"
+ id="menu_act_hr_timesheet_sheet_form_department_validate"
+ action="act_hr_timesheet_sheet_form_department_validate"
+ icon="STOCK_JUSTIFY_FILL"
+ type="wizard"/>
+
+
+ <wizard string="My department's timesheet"
+ model="hr.employee"
+ name="hr_timesheet_sheet.department.confirm.open"
+ id="act_hr_timesheet_sheet_form_department_confirm"/>
+ <menuitem name="Human Resources/Timesheets/My Department's Timesheets/Timesheets to Confirm"
+ id="menu_act_hr_timesheet_sheet_form_department_confirm"
+ action="act_hr_timesheet_sheet_form_department_confirm"
+ icon="STOCK_JUSTIFY_FILL"
+ type="wizard"/>
+
+
+
+
<wizard string="My current timesheet"
model="hr.employee"
name="hr_timesheet_sheet.current.open"
id="act_hr_timesheet_sheet_form_my_current"/>
- <menuitem name="Human Resources/Timesheets/My timesheets/My current timesheet"
+ <menuitem name="Human Resources/Timesheets/My Timesheets/My Current Timesheet"
id="menu_act_hr_timesheet_sheet_form_my_current"
action="act_hr_timesheet_sheet_form_my_current"
+ icon="STOCK_NEW"
type="wizard"/>
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_confirm">
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
- <menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to confirm"
+ <menuitem name="Human Resources/Timesheets/All Timesheets/Timesheets to Confirm"
id="menu_act_hr_timesheet_sheet_form_all_confirm"
action="act_hr_timesheet_sheet_form_all_confirm" />
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
- <menuitem name="Human Resources/Timesheets/All timesheets/Timesheets to validate"
+ <menuitem name="Human Resources/Timesheets/All Timesheets/Timesheets to Validate"
id="menu_act_hr_timesheet_sheet_form_all_valid"
action="act_hr_timesheet_sheet_form_all_valid" />
src_model="hr_timesheet_sheet.sheet"
id="act_hr_timesheet_sheet_sheet_2_hr_attendance"/>
+ <record model="ir.ui.view" id="hr_timesheet_sheet_tree_simplified">
+ <field name="name">hr.timesheet.sheet.tree.simplified</field>
+ <field name="model">hr_timesheet_sheet.sheet</field>
+ <field name="type">tree</field>
+ <field name="priority" eval="20"/>
+ <field name="arch" type="xml">
+ <tree string="Timesheets">
+ <field name="date_from" />
+ <field name="user_id"/>
+ <field name="name" />
+ <field name="total_attendance"/>
+ <field name="total_timesheet"/>
+ <field name="state"/>
+ </tree>
+ </field>
+ </record>
+
+ <record model="ir.actions.act_window" id="act_hr_timesheet_sheet_unvalidate">
+ <field name="name">Unvalidated Timesheets</field>
+ <field name="res_model">hr_timesheet_sheet.sheet</field>
+ <field name="domain">[('state','<>','done'),('date_to','<',time.strftime('%Y-%m-%d'))]</field>
+ <field name="view_type">form</field>
+ <field name="view_id" ref="hr_timesheet_sheet_tree_simplified"/>
+ </record>
+
+ <menuitem name="Human Resources/Timesheets/All Timesheets/Timesheets Unvalidate"
+ id="menu_hr_timesheet_sheet_unvalidate"
+ action="act_hr_timesheet_sheet_unvalidate"/>
</data>
</terp>