Changeset 12419 for main/waeup.ikoba/trunk/src
- Timestamp:
- 8 Jan 2015, 10:33:18 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/interfaces.py
r12378 r12419 120 120 return True 121 121 122 # Define a validation method for email addresses122 # Define a validation method for ids 123 123 class NotIdValue(schema.ValidationError): 124 124 __doc__ = u"Invalid id" -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/browser.py
r12413 r12419 197 197 @action(_('Save'), style='primary') 198 198 def save(self, **data): 199 # Remove unchanged product options from data200 new_options = data.get('options')201 if new_options and (len(new_options) == len (self.context.options)):202 new = False203 for i in range(len(new_options)):204 new_option_str = new_options[i].to_string()205 stored_options_str = self.context.options[i].to_string()206 if new_option_str != stored_options_str:207 new = True208 break209 if not new:210 del data['options']211 199 msave(self, **data) 212 200 # Save multilingual dict -
main/waeup.ikoba/trunk/src/waeup/ikoba/products/productoptions.py
r12378 r12419 77 77 return 78 78 79 def __eq__(self, obj): 80 default = object() 81 result = [] 82 for name in ('title', 'fee', 'currency',): 83 result.append( 84 getattr(self, name) == getattr(obj, name, default)) 85 return False not in result 86 79 87 def to_string(self): 80 88 """A string representation that can be used in exports.
Note: See TracChangeset for help on using the changeset viewer.