[Erp5-report] r21054 - /erp5/trunk/products/ERP5/PropertySheet/
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 21 12:05:25 CEST 2008
Author: jerome
Date: Wed May 21 12:05:21 2008
New Revision: 21054
URL: http://svn.erp5.org?rev=21054&view=rev
Log:
remove hardcoded state checks, this is not flexible and afterall not really
needed here. (Thanks Romain for pointing this out)
Modified:
erp5/trunk/products/ERP5/PropertySheet/CalendarConstraint.py
erp5/trunk/products/ERP5/PropertySheet/CalendarPeriodConstraint.py
erp5/trunk/products/ERP5/PropertySheet/IndividualCalendarConstraint.py
Modified: erp5/trunk/products/ERP5/PropertySheet/CalendarConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/CalendarConstraint.py?rev=21054&r1=21053&r2=21054&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/CalendarConstraint.py (original)
+++ erp5/trunk/products/ERP5/PropertySheet/CalendarConstraint.py Wed May 21 12:05:21 2008
@@ -37,27 +37,21 @@
'type' : 'ContentExistence',
'portal_type' : ('Presence Request Period', ),
'description' : 'No Presence Request Period created yet',
- 'condition' : 'python: object.getPortalType() == "Presence Request"'
- ' and object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
+ 'condition' : 'python: object.getPortalType() == "Presence Request"',
},
{ 'id' : 'leave_request_line',
'description' : 'Must contain at least one period',
'type' : 'ContentExistence',
'portal_type' : ('Leave Request Period', ),
'description' : 'No Leave Request Period created yet',
- 'condition' : 'python: object.getPortalType() == "Leave Request"'
- ' and object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
+ 'condition' : 'python: object.getPortalType() == "Leave Request"',
},
{ 'id' : 'group_request_line',
'description' : 'Must contain at least one period',
'type' : 'ContentExistence',
'portal_type' : ('Group Leave Period', 'Group Presence Period', ),
- 'description' : 'No Group Presence Period created yet',
- 'condition' : 'python: object.getPortalType() == "Group Calendar"'
- ' and object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
+ 'description' : 'No Calendar Line created yet',
+ 'condition' : 'python: object.getPortalType() == "Group Calendar"',
},
)
Modified: erp5/trunk/products/ERP5/PropertySheet/CalendarPeriodConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/CalendarPeriodConstraint.py?rev=21054&r1=21053&r2=21054&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/CalendarPeriodConstraint.py (original)
+++ erp5/trunk/products/ERP5/PropertySheet/CalendarPeriodConstraint.py Wed May 21 12:05:21 2008
@@ -37,8 +37,6 @@
'description': 'Date must be defined',
'message_property_not_set': 'Start date must be defined',
'message_no_such_property': 'Start date must be defined',
- 'condition' : 'python: object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
'type': 'PropertyExistence',
'start_date' : 1,
},
@@ -47,19 +45,14 @@
'description': 'Date must be defined',
'message_property_not_set': 'Stop date must be defined',
'message_no_such_property': 'Stop date must be defined',
- 'condition' : 'python: object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
'type': 'PropertyExistence',
'stop_date' : 1,
},
{ 'id': 'resource_existence',
'description': 'Type must be defined',
- 'message_category_not_set':
- 'Type must be defined',
+ 'message_category_not_set': 'Type must be defined',
'portal_type': (),
- 'condition' : 'python: object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
'type': 'CategoryExistence',
'resource' : 1,
},
Modified: erp5/trunk/products/ERP5/PropertySheet/IndividualCalendarConstraint.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/PropertySheet/IndividualCalendarConstraint.py?rev=21054&r1=21053&r2=21054&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/PropertySheet/IndividualCalendarConstraint.py (original)
+++ erp5/trunk/products/ERP5/PropertySheet/IndividualCalendarConstraint.py Wed May 21 12:05:21 2008
@@ -35,11 +35,8 @@
{ 'id': 'destination_existance',
'description': 'Person must be defined',
- 'message_category_not_set':
- 'Person must be defined',
+ 'message_category_not_set': 'Person must be defined',
'portal_type': ('Person',),
- 'condition' : 'python: object.getSimulationState() not'
- ' in ("cancelled", "deleted")',
'type': 'CategoryExistence',
'destination' : 1,
},
More information about the Erp5-report
mailing list