From 54e6589b272a82a0b1d1c2963f27837ff52f3066 Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Wed, 13 Oct 2010 11:33:37 +0200
Subject: [PATCH 1/2] [FIX] event: now check that Closing Date is after
Beginning Date
bzr revid: olt@tinyerp.com-20101013093337-jkmo3zx828o13m77
---
addons/event/event.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/addons/event/event.py b/addons/event/event.py
index 5c510ede613..192844f3f20 100644
--- a/addons/event/event.py
+++ b/addons/event/event.py
@@ -211,7 +211,7 @@ class event_event(osv.osv):
'register_current': fields.function(_get_register, method=True, string='Confirmed Registrations', multi='register_current',
help="Total of Open and Done Registrations"),
'register_prospect': fields.function(_get_register, method=True, string='Unconfirmed Registrations', multi='register_prospect',
- help="Total of Prospect Registrations"),
+ help="Total of Prospect Registrati./event/event.py:41:ons"),
'registration_ids': fields.one2many('event.registration', 'event_id', 'Registrations', readonly=False, states={'done': [('readonly', True)]}),
'date_begin': fields.datetime('Beginning date', required=True, help="Beginning Date of Event", readonly=True, states={'draft': [('readonly', False)]}),
'date_end': fields.datetime('Closing date', required=True, help="Closing Date of Event", readonly=True, states={'draft': [('readonly', False)]}),
@@ -262,8 +262,15 @@ class event_event(osv.osv):
return True
+ def _check_closing_date(self, cr, uid, ids):
+ for event in self.browse(cr, uid, ids):
+ if event.date_end < event.date_begin:
+ return False
+ return True
+
_constraints = [
- (_check_recursion, 'Error ! You cannot create recursive event.', ['parent_id'])
+ (_check_recursion, 'Error ! You cannot create recursive event.', ['parent_id']),
+ (_check_closing_date, 'Error ! Closing Date cannot be set before Beginning Date.', ['date_end']),
]
def do_team_change(self, cr, uid, ids, team_id, context=None):
From b3191afaf72ce6abd5f70d1dd439caf82c5db13c Mon Sep 17 00:00:00 2001
From: "olt@tinyerp.com" <>
Date: Wed, 13 Oct 2010 11:56:27 +0200
Subject: [PATCH 2/2] [FIX] hr_timesheet: removed duplicate 'journal_id' field
in view
bzr revid: olt@tinyerp.com-20101013095627-qn52st18zx8xtylr
---
addons/hr_timesheet/hr_timesheet_view.xml | 1 -
1 file changed, 1 deletion(-)
diff --git a/addons/hr_timesheet/hr_timesheet_view.xml b/addons/hr_timesheet/hr_timesheet_view.xml
index 664587b75a3..08ec23bd872 100644
--- a/addons/hr_timesheet/hr_timesheet_view.xml
+++ b/addons/hr_timesheet/hr_timesheet_view.xml
@@ -22,7 +22,6 @@
-