odoo/addons/hr_timesheet_sheet/report/timesheet_report_view.xml

120 lines
6.6 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="view_timesheet_report_graph" model="ir.ui.view">
<field name="name">timesheet.report.graph</field>
<field name="model">timesheet.report</field>
<field name="type">graph</field>
<field name="arch" type="xml">
<graph string="Timesheet" type="bar">
<field name="name" />
<field name="total_att" operator = "+"/>
<field name="total_ts" operator = "+"/>
<field name="user_id" group = "True"/>
</graph>
</field>
</record>
<record id="view_timesheet_report_tree" model="ir.ui.view">
<field name="name">timesheet.report.tree</field>
<field name="model">timesheet.report</field>
<field name="type">tree</field>
<field name="arch" type="xml">
<tree string="Timesheet">
<field name="date_current" invisible="1"/>
<field name="name" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="date_from" invisible="1"/>
<field name="date_to" invisible="1"/>
<field name="total_att" sum="Total Timesheet"/>
<field name="total_diff" sum="Total Attendance"/>
<field name="total_ts" sum="Difference"/>
<field name="state" invisible="1"/>
<field name="department_id" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="day" invisible="1"/>
<field name="month" invisible="1"/>
</tree>
</field>
</record>
<record id="view_timesheet_report_search" model="ir.ui.view">
<field name="name">timesheet.report.search</field>
<field name="model">timesheet.report</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Timesheet">
<group col="10" colspan="4">
<filter icon="terp-hr" string="This Year"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')),('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this year"/>
<filter icon="terp-hr" string="This Month"
name="month"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet in this month"/>
<filter icon="gtk-media-rewind"
string=" 7 Days "
separator="1"
domain="[('date_current','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date_current','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]"
help="Timesheet during last 7 days"/>
<separator orientation="vertical"/>
<filter icon="terp-hr"
string="Draft"
domain="[('state','=','draft')]"/>
<filter icon="terp-hr"
string="Confirmed"
domain="[('state','=','confirm')]"/>
<filter icon="terp-hr"
string="Done"
domain="[('state','=','done')]"/>
<separator orientation="vertical"/>
<field name="user_id" widget="selection">
<filter icon="terp-hr"
string="My timesheet"
help = "My timesheet "
domain="[('user_id','=',uid)]" />
<filter icon="terp-hr"
string="Non Assigned timesheets to users"
help="Non Assigned timesheets to users"
domain="[('user_id','=',False)]"/>
</field>
<field name="company_id" widget="selection" groups="base.group_multi_company"/>
</group>
<newline/>
<group expand="0" string="Extended filters..." colspan="10" col="12" groups="base.group_extended">
<filter icon="terp-hr"
string="New"
domain="[('state','=','new')]"/>
<separator orientation="vertical"/>
<field name="department_id" widget="selection"/>
<separator orientation="vertical"/>
<field name="date_from"/>
<field name="date_to"/>
</group>
<newline/>
<group expand="1" string="Group By..." colspan="10" col="12">
<filter string="User" name="User" icon="terp-hr" context="{'group_by':'user_id'}"/>
<filter string="Company" icon="terp-hr" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
<separator orientation="vertical"/>
<filter string="Department" icon="terp-hr" context="{'group_by':'department_id'}"/>
<filter string="State" icon="terp-hr" context="{'group_by':'state'}"/>
<separator orientation="vertical"/>
<filter string="Day" icon="terp-hr" context="{'group_by':'day'}"/>
<filter string="Month" icon="terp-hr" context="{'group_by':'date_current'}"/>
<filter string="Year" icon="terp-hr" context="{'group_by':'year'}"/>
</group>
</search>
</field>
</record>
<record id="action_timesheet_report_stat_all" model="ir.actions.act_window">
<field name="name">Timesheet</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">tree,graph</field>
<field name="context">{'search_default_month':1,'search_default_User':1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="search_view_id" ref="view_timesheet_report_search"/>
</record>
<menuitem action="action_timesheet_report_stat_all" id="menu_timesheet_report_all" parent="hr.menu_hr_reporting"/>
</data>
</openerp>