From 0bdb90e5f164ffde3d21a4fb45efee4f15935873 Mon Sep 17 00:00:00 2001 From: "Dharti Ratani (OpenERP)" Date: Tue, 5 Jun 2012 10:40:31 +0530 Subject: [PATCH] [IMP]setting click based on dependencies of modules in hr config wizard bzr revid: dhr@tinyerp.com-20120605051031-kppbk64f4mi5a1iv --- addons/hr/res_config.py | 23 +++++++++++++++++++++++ addons/hr/res_config_view.xml | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/addons/hr/res_config.py b/addons/hr/res_config.py index fb48f020f24..57ddfabdbd3 100644 --- a/addons/hr/res_config.py +++ b/addons/hr/res_config.py @@ -46,4 +46,27 @@ class hr_config_settings(osv.osv_memory): help ="""This installs the module hr_payroll."""), } + def onchange_hr_timesheet(self, cr, uid, ids, timesheet, context=None): + if timesheet: + vals = {'value': { + 'module_hr_timesheet': timesheet, + 'module_hr_attendance': timesheet, + }} + if timesheet == False: + vals = {'value': { + 'module_hr_timesheet': timesheet, + }} + return vals + + def onchange_hr_attendance(self, cr, uid, ids, attendance, context=None): + if attendance: + vals = {'value': { + 'module_hr_attendance': attendance, + }} + if attendance == False: + vals = {'value': { + 'module_hr_attendance': attendance, + 'module_hr_timesheet': attendance, + }} + return vals # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/hr/res_config_view.xml b/addons/hr/res_config_view.xml index 739eaacdf79..371e5afc861 100644 --- a/addons/hr/res_config_view.xml +++ b/addons/hr/res_config_view.xml @@ -32,8 +32,8 @@ string="Install Country-Specific Payroll" icon="gtk-go-forward"/> - - + +