[IMP] hr related modules search views

bzr revid: mra@mra-laptop-20100809104010-mdsyd3lqxt2ntip4
This commit is contained in:
PSI(OpenERP)
2010-08-09 16:10:10 +05:30
committed by Mustufa Rangwala
parent d5c91c9a94
commit 57e7c51818
8 changed files with 54 additions and 45 deletions
@@ -39,6 +39,7 @@
<field name="employee_id"/>
<field name="name"/>
<field name="action"/>
<field name="day" invisible="1"/>
</tree>
</field>
</record>
+1
View File
@@ -29,6 +29,7 @@
<tree string="Expenses" colors="blue:state=='draft'">
<field name="date"/>
<field name="employee_id"/>
<field name="user_id" invisible="1"/>
<field name="department_id" groups="base.group_extended"/>
<field name="ref"/>
<field name="name"/>
@@ -10,6 +10,7 @@
<tree colors="blue:state in ('draft');black:state in ('confirm','accepted','invoiced','paid');gray:state in('cancelled')" string="Expenses Analysis">
<field name="date" invisible="1"/>
<field name="employee_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="year" invisible="1"/>
<field name="month" invisible="1"/>
<field name="day" invisible="1"/>
@@ -51,27 +52,27 @@
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Expenses Analysis">
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Expenses during last 7 year"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Expenses during last month"/>
<filter icon="terp-go-week" string=" 7 Days " separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Expenses during last 7 days"/>
<separator orientation="vertical"/>
<group>
<filter icon="terp-go-year" string=" 365 Days "
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')),('date','&gt;',(datetime.date.today()-datetime.timedelta(days=365)).strftime('%%Y-%%m-%%d'))]"
help="Expenses during last 7 year"/>
<filter icon="terp-go-month" string=" 30 Days "
name="month"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=30)).strftime('%%Y-%%m-%%d'))]"
help="Expenses during last month"/>
<filter icon="terp-go-week" string=" 7 Days " separator="1"
domain="[('date','&lt;=', time.strftime('%%Y-%%m-%%d')), ('date','&gt;',(datetime.date.today()-datetime.timedelta(days=7)).strftime('%%Y-%%m-%%d'))]" help="Expenses during last 7 days"/>
<separator orientation="vertical"/>
<filter string="Draft" icon="terp-document-new" domain="[('state','=','draft')]" help = "Draft Expenses"/>
<filter string="Waiting" icon="terp-gtk-media-pause" domain="[('state', '=' ,'confirm')]"
help = "Confirm Expenses"/>
help = "Confirm Expenses"/>
<filter string="Accepted" icon="terp-camera_test" domain="[('state','=','accepted')]"
help = "Accepted Expenses"/>
help = "Accepted Expenses"/>
<separator orientation="vertical"/>
<field name="employee_id"/>
<field name="department_id"/>
</group>
<newline/>
</group>
<newline/>
<group expand="0" string="Group By...">
<filter string="Employee" name="employee" icon="terp-personal" context="{'group_by':'employee_id'}"/>
<filter string="Department" icon="terp-personal+" context="{'group_by':'department_id'}"/>
+3
View File
@@ -137,6 +137,7 @@
<field name="name"/>
<field name="holiday_status_id"/>
<field name="manager_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="type"/>
<field name="state"/>
</tree>
@@ -194,6 +195,7 @@
<field name="name" invisible="1"/>
<field name="holiday_status_id"/>
<field name="manager_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="type" invisible="1"/>
<field name="state" invisible="1"/>
</tree>
@@ -215,6 +217,7 @@
<field name="name"/>
<field name="holiday_status_id"/>
<field name="manager_id" invisible="1"/>
<field name="user_id" invisible="1"/>
<field name="type"/>
<field name="state"/>
</tree>
+6 -4
View File
@@ -425,11 +425,13 @@
<tree colors="blue:state in ('draft');black:state in ('confirm','new','hr_check','accont_check');gray:state in('done','cancel')" string="Payslip">
<field name="number"/>
<field name="employee_id"/>
<field name="register_id" invisible="1"/>
<field name="name"/>
<field name="date"/>
<field name="grows"/>
<field name="net"/>
<field name="state"/>
<field name="company_id"/>
</tree>
</field>
</record>
@@ -529,10 +531,10 @@
</group>
<newline/>
<group col="8" colspan="4" expand="0" string="Group By...">
<filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'register_id':self}"/>
<filter string="Employees" icon="terp-partner" name="employee_id" context="{'employee_id':self}"/>
<filter string="Periods" name="period_id" icon="terp-go-month" context="{'period_id':self}"/>
<filter string="Staes" name="state" icon="terp-stock_effects-object-colorize" context="{'state':self}"/>
<filter string="Register" icon="terp-folder-yellow" name="register_id" context="{'group_by':'register_id'}"/>
<filter string="Employees" icon="terp-partner" name="employee_id" context="{'group_by':'employee_id'}"/>
<filter string="Companies" name="company_id" icon="terp-go-month" context="{'group_by':'company_id'}"/>
<filter string="States" name="state" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
</group>
</search>
</field>
+2 -3
View File
@@ -34,7 +34,6 @@
<newline/>
<field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)" required="1" domain="[('type','=','service')]"/>
<field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, product_uom_id)"/>
<field domain="[('type','=','normal'),('state', '&lt;&gt;', 'close')]" name="account_id" select="1"/>
<field name="amount"/>
<field name="general_account_id"/>
@@ -86,8 +85,8 @@
<field name="help">This functionality gives you a list of work done by user, product and analytic account (or project). A search tool allows you to make fine-grained analysis.</field>
</record>
<menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
<menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
<menuitem id="menu_project_working_hours" parent="base.menu_project_management_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
<menuitem id="menu_hr_working_hours" parent="hr_attendance.menu_hr_time_tracking" action="act_hr_timesheet_line_evry1_all_form"/>
<record id="hr_timesheet_employee_extd_form" model="ir.ui.view">
<field name="name">hr.timesheet.employee.extd_form</field>
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<record id="action_timesheet_report_all" model="ir.actions.act_window">
<field name="name">Timesheets by Month</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]</field>
<field name="view_id" ref="hr_timesheet_sheet.view_timesheet_report_graph"/>
</record>
<record id="action_timesheet_report_all" model="ir.actions.act_window">
<field name="name">Timesheets by Month</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">timesheet.report</field>
<field name="view_type">form</field>
<field name="view_mode">graph,tree</field>
<field name="domain">[('user_id','=',uid), ('month', '=' , time.strftime('%m')), ('year', '=', time.strftime('%Y'))]</field>
<field name="view_id" ref="hr_timesheet_sheet.view_timesheet_report_graph"/>
</record>
<record id="action_hr_timesheet_sheet_graph" model="ir.actions.act_window">
<record id="action_hr_timesheet_sheet_graph" model="ir.actions.act_window">
<field name="name">Timesheets</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">hr_timesheet_sheet.sheet</field>
@@ -23,12 +23,12 @@
<record id="board_hr_timesheet_form" model="ir.ui.view">
<field name="name">board.hr.timesheet.form</field>
<field name="model">board.board</field>
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="inherit_id" ref="hr.board_hr_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child2" position="inside">
<action colspan="4" height="220" name="%(action_hr_timesheet_sheet_graph)d" string="Timesheets by Month" />
</xpath>
<xpath expr="/form/hpaned/child2" position="inside">
<action colspan="4" height="220" name="%(action_hr_timesheet_sheet_graph)d" string="Timesheets by Month" />
</xpath>
</field>
</record>
<record id="hr_timesheet_sheet_tree" model="ir.ui.view">
@@ -39,6 +39,7 @@
<tree colors="blue:state in ('draft');black:state in ('confirm','new');gray:state in('done')" string="Timesheets">
<field name="date_from"/>
<field name="user_id"/>
<field name="department_id" invisible="1"/>
<field name="name"/>
<field name="total_attendance"/>
<field name="total_timesheet"/>
@@ -46,7 +47,7 @@
</tree>
</field>
</record>
<!-- Add in projectboard
<record id="act_hr_timesheet_sheet" model="ir.actions.act_window">
<field name="name">Timesheets</field>
@@ -54,16 +55,16 @@
<field name="domain">[('state','&lt;&gt;','done'),('user_id','in',department_users_get())]</field>
<field name="view_type">form</field>
<field name="view_id" ref="hr_timesheet_sheet_tree"/>
</record>
<record id="board_project_timesheet_form" model="ir.ui.view">
</record>
<record id="board_project_timesheet_form" model="ir.ui.view">
<field name="name">board.project.timesheet.form</field>
<field name="model">board.board</field>
<field name="inherit_id" ref="project.board_project_manager_form"/>
<field name="inherit_id" ref="project.board_project_manager_form"/>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="/form/hpaned/child1" position="inside">
<action colspan="4" height="150" name="%(act_hr_timesheet_sheet)d" string="User's timesheets" width="510"/>
</xpath>
<xpath expr="/form/hpaned/child1" position="inside">
<action colspan="4" height="150" name="%(act_hr_timesheet_sheet)d" string="User's timesheets" width="510"/>
</xpath>
</field>
</record>-->
</data>
@@ -338,6 +338,7 @@
<tree colors="blue:state in ('draft');black:state in ('confirm','new');gray:state in('done')" string="Timesheets">
<field name="date_from"/>
<field name="user_id"/>
<field name="department_id" invisible="1"/>
<field name="name"/>
<field name="total_attendance"/>
<field name="total_timesheet"/>
@@ -346,8 +347,8 @@
</field>
</record>
<!-- Timesheet Button on Employee Form -->
<act_window domain="[('user_id', '=', user_id)]" id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
<!-- Timesheet Button on Employee Form -->
<act_window domain="[('user_id', '=', user_id)]" id="act_hr_employee_2_hr_timesheet" name="Timesheets" res_model="hr_timesheet_sheet.sheet" src_model="hr.employee"/>
</data>
</openerp>