[IMP]setting click based on dependencies of modules in hr config wizard
bzr revid: dhr@tinyerp.com-20120605051031-kppbk64f4mi5a1iv
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
Reference in New Issue
Block a user