[FIX] duplicate a holiday request.
bzr revid: nco@tinyerp.com-20121221102056-ojgcvllqtnxeuk8e
This commit is contained in:
parent
3024249a47
commit
555b2cbd26
|
@ -182,6 +182,16 @@ class hr_holidays(osv.osv):
|
|||
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be anterior to the end date."),
|
||||
('date_check', "CHECK ( number_of_days_temp >= 0 )", "The number of days must be greater than 0."),
|
||||
]
|
||||
|
||||
def copy(self, cr, uid, id, default=None, context=None):
|
||||
if default is None:
|
||||
default = {}
|
||||
if context is None:
|
||||
context = {}
|
||||
default = default.copy()
|
||||
default['date_from'] = False
|
||||
default['date_to'] = False
|
||||
return super(hr_holidays, self).copy(cr, uid, id, default, context=context)
|
||||
|
||||
def _create_resource_leave(self, cr, uid, leaves, context=None):
|
||||
'''This method will create entry in resource calendar leave object at the time of holidays validated '''
|
||||
|
|
Loading…
Reference in New Issue