<field name="model">hr.attendance</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Employee attendances">
- <field name="employee_id" />
- <field name="name" />
- <field name="action" />
- <field name="action_desc" />
+ <form string="Employee attendances" version="7.0">
+ <sheet>
+ <group>
+ <field name="employee_id"/>
+ <field name="name"/>
+ <field name="action"/>
+ <field name="action_desc"/>
+ </group>
+ </sheet>
</form>
</field>
</record>
<search string="Hr Attendance Search">
<filter icon="terp-stock_align_left_24" string="My Attendance" domain="[('employee_id.user_id.id', '=', uid)]" />
<separator orientation="vertical"/>
- <filter icon="terp-go-today" string="Today" name="today" domain="[('name','>=',current_date),('name','<=',current_date)]" />
+ <filter icon="terp-go-today" string="Today" name="today" domain="[('name','>=',time.strftime('%%Y-%%m-%%d')),('name','<=',time.strftime('%%Y-%%m-%%d'))]" />
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="name"/>
<field name="model">hr.action.reason</field>
<field name="type">form</field>
<field name="arch" type="xml">
- <form string="Define attendance reason">
- <field colspan="4" name="name" select="1"/>
- <field name="action_type" select="1"/>
+ <form string="Define attendance reason" version="7.0">
+ <group col="4">
+ <field name="name"/>
+ <field name="action_type"/>
+ </group>
</form>
</field>
</record>
<menuitem
sequence="35" id="hr.menu_open_view_attendance_reason_new_config" parent="hr.menu_hr_configuration" name="Attendance"
groups="base.group_no_one"/>
- <menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" />
+ <menuitem action="open_view_attendance_reason" id="menu_open_view_attendance_reason" parent="hr.menu_open_view_attendance_reason_new_config" groups="base.group_no_one"/>
<record id="hr_attendance_employee" model="ir.ui.view">
<field name="name">hr.employee.form1</field>
<field name="coach_id" position="after">
<group colspan="2">
<field name="state"/>
- <button name="attendance_action_change" states="present" string="Sign Out" type="object" icon="gtk-go-forward" context="{'type':'sign_out'}" groups="base.group_hr_user"/>
- <button name="attendance_action_change" states="absent" string="Sign In" type="object" icon="gtk-go-back" context="{'type':'sign_in'}" groups="base.group_hr_user"/>
+ <button name="attendance_action_change" states="present" type="object" string="Sign Out" groups="base.group_hr_manager"/>
+ <button name="attendance_action_change" states="absent" type="object" string="Sign In" groups="base.group_hr_manager"/>
</group>
</field>
</field>
</data>
</openerp>
+
+
<openerp>
<data>
- <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="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 layout="manual">
- <div class="oe_form_topbar">
+ <form string="Timesheet" version="7.0">
+ <header>
<button name="button_confirm" states="draft" string="Submited to Manager" type="object"/>
<button name="done" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user"/>
<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"/>
- <div class="oe_right">
- <field name="state" widget="statusbar" nolabel="1" statusbar_visible="new,confirm,done"/>
- </div>
- <div class="oe_clear"/>
- </div>
- <sheet string="Timesheet" layout="auto">
- <group colspan="4" col="6" class="oe_form_header">
- <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/>
+ <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"/>
+ <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"/>
</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"/>
- <button name="sign_out" string="Sign Out" type="object" icon="terp-gtk-jump-to-rtl"/>
+ <button name="attendance_action_change" attrs="{'invisible': ['|', ('state_attendance','=',False), ('state_attendance', '=', 'absent')]}" type="object" string="Sign Out" groups="base.group_hr_manager"/>
+ <button name="attendance_action_change" attrs="{'invisible': [('state_attendance', '=', 'present')]}" type="object" string="Sign In" groups="base.group_hr_manager"/>
<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">
<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"/>
<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" select="1"/>
+ <field name="sheet_id"/>
</field>
</field>
</record>
<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>
</tree>
</field>
</record>
- <record id="view_hr_timesheet_sheet_graph" model="ir.ui.view">
- <field name="name">hr.timesheet.sheet.sheet.graph</field>
- <field name="model">hr_timesheet_sheet.sheet</field>
- <field name="type">graph</field>
- <field name="arch" type="xml">
- <graph orientation="horizontal" string="Available Attendance" type="bar">
- <field name="name"/>
- <field name="total_attendance" operator="+"/>
- </graph>
- </field>
- </record>
<record id="hr_timesheet_day_tree" model="ir.ui.view">
<field name="name">hr.timesheet.day.tree</field>