odoo/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml

187 lines
7.4 KiB
XML

<?xml version="1.0" ?>
<terp>
<data>
<record model="ir.ui.view" id="hr_timesheet_sheet_tree">
<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="Timesheet Sheet">
<field name="user_id"/>
<field name="date_from" />
<field name="date_to" />
<field name="name" />
<field name="total_attendance"/>
<field name="total_timesheet"/>
<field name="total_difference"/>
<field name="state"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="hr_timesheet_account_tree">
<field name="name">hr.timesheet.account.tree</field>
<field name="model">hr_timesheet_sheet.sheet.account</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Timesheet by accounts">
<field name="sheet_id"/>
<field name="name"/>
<field name="total"/>
</tree>
</field>
</record>
<record model="ir.ui.view" id="hr_timesheet_sheet_form">
<field name="name">hr.timesheet.sheet.form</field>
<field name="model">hr_timesheet_sheet.sheet</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Timesheet Sheet">
<field name="name" />
<field name="user_id"/>
<field name="date_from" />
<field name="date_to" />
<notebook colspan="4">
<page string="Daily view">
<group col="4" colspan="2">
<field name="date_current" nolabel="1"/>
<button icon="STOCK_MEDIA_PREVIOUS" string="" name="date_previous" type="object"/>
<button icon="STOCK_JUMP_TO" string="" name="date_today" type="object"/>
<button icon="STOCK_MEDIA_NEXT" string="" name="date_next" type="object"/>
</group>
<button string="Sign In" name="sign_in" type="object"/>
<button string="Sign Out" name="sign_out" type="object"/>
<field name="attendances_ids" colspan="4" nolabel="1">
<tree string="Attendances">
<field name="employee_id"/>
<field name="name"/>
<field name="action"/>
</tree>
</field>
<field name="state_attendance"/>
<field name="total_attendance_day"/>
<field name="timesheet_ids" colspan="4" nolabel="1" domain="[('name','=',date_current)]">
<tree string="Timesheet" editable="top">
<field name="user_id" required="1"/>
<field name="date" />
<field name="account_id" on_change="on_change_account_id(account_id)" domain="[('type','=','normal')]"/>
<field name="name" />
<field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" />
<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="to_invoice"/>
</tree>
</field>
<field name="total_difference_day"/>
<field name="total_timesheet_day"/>
<field name="state"/>
<group col="4" colspan="2">
<button string="Confirm" name="confirm" states="draft"/>
<button string="Cancel" name="cancel" states="done"/>
<button string="Refuse" name="cancel" states="confirm"/>
<button string="Accept" name="done" states="confirm"/>
</group>
</page><page string="By day">
<field name="period_ids" colspan="4" nolabel="1">
<tree string="Period" colors="red:total_difference&lt;=0.1;blue:total_difference&gt;=0.1">
<field name="name"/>
<field name="total_attendance"/>
<field name="total_timesheet"/>
<field name="total_difference"/>
</tree>
</field>
<field name="total_attendance"/>
<field name="total_timesheet"/>
<field name="total_difference"/>
</page><page string="By account">
<field name="account_ids" colspan="4" nolabel="1">
<tree string="Analytic accounts">
<field name="name"/>
<field name="total"/>
</tree>
</field>
</page>
</notebook>
</form>
</field>
</record>
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form">
<field name="name">hr.timesheet.sheet.form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_timesheet_sheet_form" />
</record>
<menuitem name="Human Resources/Timesheets/All timesheets"
id="menu_act_hr_timesheet_sheet_form"
action="act_hr_timesheet_sheet_form" />
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my">
<field name="name">hr.timesheet.sheet.form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="domain">[('user_id','=',uid)]</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<menuitem name="Human Resources/Timesheets/My timesheets"
id="menu_act_hr_timesheet_sheet_form_my"
action="act_hr_timesheet_sheet_form_my" />
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_my_confirm">
<field name="name">hr.timesheet.sheet.form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="domain">[('user_id','=',uid),('state','=','draft'),('date_to','&lt;=',time.strftime('%Y-%m-%d'))]</field>
<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"
id="menu_act_hr_timesheet_sheet_form_my_confirm"
action="act_hr_timesheet_sheet_form_my_confirm" />
<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"
id="menu_act_hr_timesheet_sheet_form_my_current"
action="act_hr_timesheet_sheet_form_my_current"
type="wizard"/>
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_confirm">
<field name="name">hr.timesheet.sheet.form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="domain">[('state','=','draft'),('date_to','&lt;=',time.strftime('%Y-%m-%d'))]</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<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" />
<record model="ir.actions.act_window" id="act_hr_timesheet_sheet_form_all_valid">
<field name="name">hr.timesheet.sheet.form</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
<field name="domain">[('state','=','confirm')]</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
</record>
<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" />
</data>
</terp>