Changeset 12127 for main/waeup.ikoba/trunk/src/waeup
- Timestamp:
- 3 Dec 2014, 18:09:28 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/vocabularies.py
r12101 r12127 26 26 from zc.sourcefactory.basic import BasicSourceFactory 27 27 from zc.sourcefactory.contextual import BasicContextualSourceFactory 28 from waeup.ikoba.sourcefactory import SmartBasicContextualSourceFactory 28 29 from waeup.ikoba.interfaces import SimpleIkobaVocabulary, SUBMITTED, VERIFIED 29 30 from waeup.ikoba.interfaces import MessageFactory as _ … … 145 146 146 147 def getValues(self, context): 147 documents = context.customer['documents'].values() 148 # When checking conversion during import, contracts do not belong to 149 # customers. Thus all portal documents must be returned. 150 user_id = getattr(getattr(context, 'customer', None), 'user_id', None) 151 catalog = getUtility(ICatalog, name='documents_catalog') 152 results = catalog.searchResults(user_id=(user_id, user_id)) 148 153 resultlist = [ 149 value for value in documents if value.state in (SUBMITTED, VERIFIED)]154 value for value in results if value.state in (SUBMITTED, VERIFIED)] 150 155 return resultlist 151 156
Note: See TracChangeset for help on using the changeset viewer.