[FIX]calandar-event:validation

lp bug: https://launchpad.net/bugs/1020561 fixed

bzr revid: pna@tinyerp.com-20120704120649-5tm4qlducduc52ff
This commit is contained in:
Pinakin Nayi (OpenERP) 2012-07-04 17:36:49 +05:30
parent 7caadacccc
commit d1d191da05
1 changed files with 10 additions and 0 deletions

View File

@ -1111,6 +1111,16 @@ rule or repeating pattern of time to exclude from the recurring rule."),
'user_id': lambda self, cr, uid, ctx: uid,
'organizer': default_organizer,
}
def _check_closing_date(self, cr, uid, ids, context=None):
for event in self.browse(cr, uid, ids, context=context):
if event.date_deadline < event.date:
return False
return True
_constraints = [
(_check_closing_date, 'Error ! Closing Date cannot be set before Beginning Date.', ['date_deadline']),
]
def get_recurrent_ids(self, cr, uid, select, domain, limit=100, context=None):
"""Gives virtual event ids for recurring events based on value of Recurrence Rule