summaryrefslogtreecommitdiff
path: root/addons/hr_timesheet_sheet
diff options
context:
space:
mode:
authorMartin Geubelle <mge@odoo.com>2015-05-12 13:29:29 +0200
committerMartin Geubelle <mge@odoo.com>2015-05-12 18:00:08 +0200
commit0aa5bb7ada9a32ca632c74c85a8d69a236bef740 (patch)
tree4b410b008e66309f01e98cfb479201b6423967a4 /addons/hr_timesheet_sheet
parentedd7e9b6872b014c57f74c4fd460f1dc972af4b4 (diff)
[ADD] hr, hr_*: new dashboard view for hr departments
Diffstat (limited to 'addons/hr_timesheet_sheet')
-rw-r--r--addons/hr_timesheet_sheet/__openerp__.py1
-rw-r--r--addons/hr_timesheet_sheet/hr_dashboard.xml39
-rw-r--r--addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml24
3 files changed, 40 insertions, 24 deletions
diff --git a/addons/hr_timesheet_sheet/__openerp__.py b/addons/hr_timesheet_sheet/__openerp__.py
index 43d89c9af71..f3cbb90d771 100644
--- a/addons/hr_timesheet_sheet/__openerp__.py
+++ b/addons/hr_timesheet_sheet/__openerp__.py
@@ -56,6 +56,7 @@ The validation can be configured in the company:
'hr_timesheet_sheet_data.xml',
'res_config_view.xml',
'views/hr_timesheet_sheet.xml',
+ 'hr_dashboard.xml',
],
'demo': [
'hr_timesheet_sheet_demo.xml',
diff --git a/addons/hr_timesheet_sheet/hr_dashboard.xml b/addons/hr_timesheet_sheet/hr_dashboard.xml
new file mode 100644
index 00000000000..fac145ae89d
--- /dev/null
+++ b/addons/hr_timesheet_sheet/hr_dashboard.xml
@@ -0,0 +1,39 @@
+<odoo>
+ <!--Hr Department Inherit Kanban view-->
+ <record id="hr_department_view_kanban" model="ir.ui.view">
+ <field name="name">hr.department.kanban.inherit</field>
+ <field name="model">hr.department</field>
+ <field name="inherit_id" ref="hr.hr_department_view_kanban"/>
+ <field name="arch" type="xml">
+ <data>
+ <xpath expr="//templates" position="before">
+ <field name="timesheet_to_approve_count"/>
+ </xpath>
+
+ <xpath expr="//div[contains(@class, 'o_kanban_primary_right')]" position="inside">
+ <div t-if="record.timesheet_to_approve_count.raw_value > 0" class="row">
+ <div class="col-xs-9">
+ <a name="%(hr_timesheet_action_from_department)d" type="action">
+ Timesheets
+ </a>
+ </div>
+ <div class="col-xs-3">
+ <t t-esc="record.timesheet_to_approve_count.raw_value"/>
+ </div>
+ </div>
+ </xpath>
+
+ <xpath expr="//div[contains(@class, 'o_kanban_manage_to_approve')]" position="inside">
+ <div class="row">
+ <div class="col-xs-12 text-left">
+ <a name="%(hr_timesheet_action_from_department)d" type="action">
+ <t t-esc="record.timesheet_to_approve_count.raw_value or 0"/> Timesheets
+ </a>
+ </div>
+ </div>
+ </xpath>
+
+ </data>
+ </field>
+ </record>
+</odoo> \ No newline at end of file
diff --git a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
index daedf0686f0..40022afcda4 100644
--- a/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
+++ b/addons/hr_timesheet_sheet/hr_timesheet_sheet_view.xml
@@ -402,29 +402,5 @@
</field>
</record>
- <!--Hr Department Inherit Kanban view-->
- <record id="hr_department_view_kanban" model="ir.ui.view">
- <field name="name">hr.department.kanban.inherit</field>
- <field name="model">hr.department</field>
- <field name="inherit_id" ref="hr.hr_department_view_kanban"/>
- <field name="arch" type="xml">
- <data>
- <xpath expr="//templates" position="before">
- <field name="timesheet_to_approve_count"/>
- </xpath>
- <xpath expr="//div[@name='to_approve']" position="attributes">
- <attribute name="class">col-md-6 col-xs-6</attribute>
- </xpath>
- <xpath expr="//div[@name='to_approve']" position="inside">
- <div>
- <a name="%(hr_timesheet_action_from_department)d" type="action">
- <t t-esc="record.timesheet_to_approve_count.raw_value or 0"/> Timesheet
- </a>
- </div>
- </xpath>
- </data>
- </field>
- </record>
-
</data>
</openerp>