summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordut-odoo <dut@odoo.com>2016-11-18 11:33:25 +0530
committerYannick Tivisse <yti@odoo.com>2017-01-10 15:45:21 +0100
commit1b82b3acb1f4ceea730ca7034f4b43ea32aefda8 (patch)
treec4eb10396a33162454822637b8cb3041ab86f8e9
parenta2319b431b3d4f12a932ac8cda1ce62ecd6b6d2f (diff)
[IMP] hr_timesheet: Improve the settings form view
-rw-r--r--addons/hr_timesheet/__init__.py1
-rw-r--r--addons/hr_timesheet/__manifest__.py1
-rw-r--r--addons/hr_timesheet/hr_timesheet_config_settings.py16
-rw-r--r--addons/hr_timesheet/hr_timesheet_config_settings_views.xml125
4 files changed, 143 insertions, 0 deletions
diff --git a/addons/hr_timesheet/__init__.py b/addons/hr_timesheet/__init__.py
index ef86c22b5c9..8047c518087 100644
--- a/addons/hr_timesheet/__init__.py
+++ b/addons/hr_timesheet/__init__.py
@@ -2,5 +2,6 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import hr_timesheet
+import hr_timesheet_config_settings
import project_timesheet
import report
diff --git a/addons/hr_timesheet/__manifest__.py b/addons/hr_timesheet/__manifest__.py
index b486c0e5b9e..efedc7384f0 100644
--- a/addons/hr_timesheet/__manifest__.py
+++ b/addons/hr_timesheet/__manifest__.py
@@ -25,6 +25,7 @@ up a management by affair.
'security/hr_timesheet_security.xml',
'security/ir.model.access.csv',
'hr_timesheet_view.xml',
+ 'hr_timesheet_config_settings_views.xml',
'project_timesheet_view.xml',
'report/hr_timesheet_report_view.xml',
'report/report_timesheet_templates.xml',
diff --git a/addons/hr_timesheet/hr_timesheet_config_settings.py b/addons/hr_timesheet/hr_timesheet_config_settings.py
new file mode 100644
index 00000000000..db75fa4fb3a
--- /dev/null
+++ b/addons/hr_timesheet/hr_timesheet_config_settings.py
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+# Part of Odoo. See LICENSE file for full copyright and licensing details.
+
+from odoo import fields, models
+
+
+class HrTimesheetConfiguration(models.TransientModel):
+ _name = 'hr.timesheet.config.settings'
+ _inherit = 'base.config.settings'
+
+ module_project_timesheet_synchro = fields.Boolean("Awesome Timesheet")
+ module_sale_timesheet = fields.Boolean("Time Billing")
+ module_project_forecast = fields.Boolean(string="Forecasts")
+ module_hr_expense = fields.Boolean("Expenses")
+ module_hr_holidays = fields.Boolean("Leave Management")
+ module_hr_timesheet_attendance = fields.Boolean("Attendances")
diff --git a/addons/hr_timesheet/hr_timesheet_config_settings_views.xml b/addons/hr_timesheet/hr_timesheet_config_settings_views.xml
new file mode 100644
index 00000000000..5024f6f0aef
--- /dev/null
+++ b/addons/hr_timesheet/hr_timesheet_config_settings_views.xml
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<odoo>
+ <menuitem id="hr_timesheet_menu_configuration" name="Configuration" parent="timesheet_menu_root"
+ groups="group_hr_timesheet_user" sequence="100"/>
+
+ <record id="hr_timesheet_config_settings_view_form" model="ir.ui.view">
+ <field name="name">hr.timesheet.config.settings.view.form</field>
+ <field name="model">hr.timesheet.config.settings</field>
+ <field name="arch" type="xml">
+ <form class="oe_form_configuration">
+ <header>
+ <button string="Save" type="object" name="execute" class="oe_highlight"/>
+ <button string="Cancel" type="object" name="cancel" class="oe_link"/>
+ </header>
+ <sheet>
+ <h2>Timesheet Apps</h2>
+ <div class="row mt16 o_settings_container">
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_project_timesheet_synchro" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_project_timesheet_synchro"/>
+ <div class="text-muted">
+ Synchronize time spent with web/mobile app
+ </div>
+ <div class="content-group">
+ <div class="row mt16 oe_center">
+ <div class="col-md-4">
+ <a href="http://www.odoo.com/page/timesheet?platform=chrome">
+ <img alt="Google Chrome Store" class="img img-responsive" src="project/static/src/img/chrome_store.png"/>
+ </a>
+ </div>
+ <div class="col-md-4">
+ <a href="http://www.odoo.com/page/timesheet?platform=ios">
+ <img alt="Apple App Store" class="img img-responsive" src="project/static/src/img/app_store.png"/>
+ </a>
+ </div>
+ <div class="col-md-4">
+ <a href="http://www.odoo.com/page/timesheet?platform=android">
+ <img alt="Google Play Store" class="img img-responsive" src="project/static/src/img/play_store.png"/>
+ </a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Billing</h2>
+ <div class="row mt16 o_settings_container">
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_sale_timesheet"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_sale_timesheet"/>
+ <div class="text-muted">
+ Sell services and invoice time spent
+ </div>
+ </div>
+ </div>
+ </div>
+ <h2>Recommended Apps</h2>
+ <div class="row mt16 o_settings_container">
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_project_forecast" widget="upgrade_boolean"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_project_forecast"/>
+ <div class="text-muted">
+ Manage your resources with Gantt charts
+ </div>
+ </div>
+ </div>
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_hr_expense"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_hr_expense"/>
+ <div class="text-muted">
+ Reimburse employee expenses and invoice customers
+ </div>
+ </div>
+ </div>
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_hr_holidays"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_hr_holidays"/>
+ <div class="text-muted">
+ Track leaves to optimize your scheduling
+ </div>
+ </div>
+ </div>
+ <div class="col-xs-12 col-md-6 o_setting_box">
+ <div class="o_setting_left_pane">
+ <field name="module_hr_timesheet_attendance"/>
+ </div>
+ <div class="o_setting_right_pane">
+ <label for="module_hr_timesheet_attendance"/>
+ <div class="text-muted">
+ Track attendances and compare with timesheets
+ </div>
+ </div>
+ </div>
+ </div>
+ </sheet>
+ </form>
+ </field>
+ </record>
+
+ <record id="hr_timesheet_config_settings_action" model="ir.actions.act_window">
+ <field name="name">Settings</field>
+ <field name="res_model">hr.timesheet.config.settings</field>
+ <field name="view_type">form</field>
+ <field name="view_mode">form</field>
+ <field name="target">inline</field>
+ </record>
+
+ <menuitem id="hr_timesheet_config_settings_menu_action" name="Settings" parent="hr_timesheet_menu_configuration"
+ action="hr_timesheet_config_settings_action" sequence="0"/>
+</odoo>