Changeset 12340 for main/waeup.ikoba/trunk
- Timestamp:
- 30 Dec 2014, 09:05:47 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/vocabularies.py
r12329 r12340 187 187 188 188 def getValues(self, context): 189 product = getattr(context, 'product_object', None) 190 if product is None: 191 return [] 192 return product.options 189 options = [] 190 recent_options = getattr( 191 getattr(context, 'product_object', None), 'options', []) 192 # Check and add stored options first before adding recent 193 # product options. 194 if context.product_options: 195 for stored_option in context.product_options: 196 if stored_option not in recent_options: 197 options.append(stored_option) 198 options += recent_options 199 return options 193 200 194 201 def getToken(self, context, value):
Note: See TracChangeset for help on using the changeset viewer.