summaryrefslogtreecommitdiff
path: root/addons/board_hr
diff options
context:
space:
mode:
authorHarry (Open ERP) <hmo@tinyerp.com>2010-02-02 12:15:45 +0530
committerHarry (Open ERP) <hmo@tinyerp.com>2010-02-02 12:15:45 +0530
commita6c831f4e01f3bbceca32b7afd7de416691d93f7 (patch)
tree29a27cefc04e97d70f74a5177603600c6a159195 /addons/board_hr
parentd6119cafe8e80d3a0af14ba0278ea4506466c1aa (diff)
parent4337af6389f9e39d39fd785fc8031ed190482d22 (diff)
[MERGE] dashboard
bzr revid: hmo@tinyerp.com-20100202064545-yihzfjkl95rwuo8d
Diffstat (limited to 'addons/board_hr')
-rw-r--r--addons/board_hr/__init__.py24
-rw-r--r--addons/board_hr/__terp__.py42
-rw-r--r--addons/board_hr/board_hr_view.xml72
3 files changed, 138 insertions, 0 deletions
diff --git a/addons/board_hr/__init__.py b/addons/board_hr/__init__.py
new file mode 100644
index 00000000000..e68279cad8d
--- /dev/null
+++ b/addons/board_hr/__init__.py
@@ -0,0 +1,24 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
+
diff --git a/addons/board_hr/__terp__.py b/addons/board_hr/__terp__.py
new file mode 100644
index 00000000000..80b00961dbe
--- /dev/null
+++ b/addons/board_hr/__terp__.py
@@ -0,0 +1,42 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# OpenERP, Open Source Management Solution
+# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Affero General Public License as
+# published by the Free Software Foundation, either version 3 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Affero General Public License for more details.
+#
+# You should have received a copy of the GNU Affero General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+##############################################################################
+
+
+{
+ 'name': 'Board for Human Reasources Management',
+ 'version': '1.0',
+ 'category': '',
+ 'description': """
+This module implements a dashboard for human resource management that includes:
+ * My Current Timesheet
+ * My Leaves
+ * My Expenses
+ """,
+ 'author': 'Tiny',
+ 'depends': [ 'crm_project','board','hr_expense','hr_timesheet_sheet','hr_holidays'
+ ],
+ 'update_xml': ['board_hr_view.xml'],
+ 'demo_xml': [],
+ 'installable': True,
+ 'active': False,
+ 'certificate': '',
+}
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
diff --git a/addons/board_hr/board_hr_view.xml b/addons/board_hr/board_hr_view.xml
new file mode 100644
index 00000000000..2e84eff0749
--- /dev/null
+++ b/addons/board_hr/board_hr_view.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <data>
+ <menuitem icon="terp-graph" id="base.dashboard" name="Dashboards" sequence="2" parent="base.reporting_menu"/>
+ <menuitem
+ id="menu_hr_deshboard"
+ name="Human Resources"
+ parent="base.dashboard"/>
+
+ <record id="action_my_expense" model="ir.actions.act_window">
+ <field name="name">My Expenses</field>
+ <field name="res_model">hr.expense.expense</field>
+ <field name="view_type">form</field>
+ <field name="domain">[('state','=','draft'),('user_id','=',uid)]</field>
+ <field name="view_id" ref="hr_expense.view_editable_expenses_tree"/>
+ </record>
+
+ <record id="act_hr_current_timesheet_sheet_form" 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>
+ <field name="view_type">form</field>
+ <field name="view_id" eval="False"/>
+ <field name="domain">[('date_to','&gt;=',time.strftime('%Y-%m-01')),('date_from','&lt;=',time.strftime('%Y-%m-01'))]</field>
+ <field name="search_view_id" ref="hr_timesheet_sheet.hr_timesheet_sheet_tree"/>
+ </record>
+
+ <record id="action_view_holiday_status_board" model="ir.actions.act_window">
+ <field name="name">My Leaves</field>
+ <field name="type">ir.actions.act_window</field>
+ <field name="res_model">hr.holidays.per.user</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">tree,form</field>
+ <field name="view_id" ref="hr_holidays.view_my_leave_board_tree"/>
+ </record>
+
+ <record id="board_hr_form" model="ir.ui.view">
+ <field name="name">board.hr.form</field>
+ <field name="model">board.board</field>
+ <field name="type">form</field>
+ <field name="arch" type="xml">
+ <form string="My Board">
+ <hpaned>
+ <child1>
+ <action colspan="4" height="220" name="%(act_hr_current_timesheet_sheet_form)d" string="My current timesheet" width="510"/>
+ </child1>
+ <child2>
+ <action colspan="4" height="220" name="%(action_view_holiday_status_board)d" string="My Leaves"/>
+ <action colspan="4" height="220" name="%(action_my_expense)d" string="My Expenses" />
+ </child2>
+ </hpaned>
+ </form>
+ </field>
+ </record>
+
+ <record id="open_board_hr" model="ir.actions.act_window">
+ <field name="name">Human Resources Dashboard</field>
+ <field name="res_model">board.board</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ <field name="usage">menu</field>
+ <field name="view_id" ref="board_hr_form"/>
+ </record>
+
+ <menuitem
+ action="open_board_hr"
+ icon="terp-graph"
+ id="menu_hr_project"
+ parent="menu_hr_deshboard"
+ sequence="4"/>
+ </data>
+</openerp>