[IMP]setting click based on dependencies of modules in hr config wizard

bzr revid: dhr@tinyerp.com-20120605051031-kppbk64f4mi5a1iv
This commit is contained in:
Dharti Ratani (OpenERP)
2012-06-05 10:40:31 +05:30
parent 4a8a293bfb
commit 0bdb90e5f1
2 changed files with 25 additions and 2 deletions
+23
View File
@@ -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:
+2 -2
View File
@@ -32,8 +32,8 @@
string="Install Country-Specific Payroll" icon="gtk-go-forward"/>
<separator string="Timesheets" colspan="4"/>
<field name="module_hr_attendance"/>
<field name="module_hr_timesheet"/>
<field name="module_hr_attendance" on_change="onchange_hr_attendance(module_hr_attendance)"/>
<field name="module_hr_timesheet" on_change="onchange_hr_timesheet(module_hr_timesheet)"/>
<field name="module_hr_timesheet_sheet"/>
<group name="config_recruitment" colspan="4"/>