- Timestamp:
- 28 Oct 2005, 19:44:25 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/skins/waeup_student/add_accommodation.py
r107 r119 16 16 lt = context.portal_layouts 17 17 18 accofolder = getattr(context,"Accommodation",None)19 if accofolder is None:20 context.invokeFactory('AccoFolder','Accommodation')21 accofolder = getattr(context,"Accommodation")22 context.notifyCPSDocumentCreation(ob=accofolder)23 24 25 18 res,psm,ds = lt.renderLayout(layout_id= 'accommodation', 26 19 schema_id = 'accommodation', … … 45 38 elif psm == 'valid': 46 39 oid = "%s" % ds.get('heading').replace(' ','') 47 accofolder.invokeFactory(type_name,oid)48 object = getattr( accofolder,oid)40 context.invokeFactory(type_name,oid) 41 object = getattr(context,oid) 49 42 object.getContent().edit(mapping=ds) 50 43 context.notifyCPSDocumentCreation(ob=object) 51 44 psm = 'new %s created' % oid 52 context_ti = context.portal_types[context.portal_type] 45 context_ti = context.portal_types[context.portal_type] 53 46 index = context_ti.getActionById('view','university_view') 54 47 return getattr(context,index)(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.