Changeset 12096 for main/waeup.ikoba/trunk/src/waeup
- Timestamp:
- 30 Nov 2014, 11:53:40 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/customers
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/applications.py
r12095 r12096 163 163 164 164 @grok.subscribe(IApplication, grok.IObjectAddedEvent) 165 def handle_ document_added(application, event):165 def handle_application_added(application, event): 166 166 """If an application is added the transition create is fired. 167 167 The latter produces a logging message. -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py
r12095 r12096 67 67 if changed_fields: 68 68 changed_fields = reduce(lambda x,y: x+y, changed_fields.values()) 69 if 'product' in changed_fields :69 if 'product' in changed_fields and data['product'] is not None: 70 70 view.context.last_product_id = data['product'].product_id 71 notify(grok.ObjectModifiedEvent(view.context)) 71 72 fields_string = ' + '.join(changed_fields) 72 73 view.flash(_('Form has been saved.')) 73 74 if fields_string: 74 75 view.context.writeLogMessage( 75 view, ' saved %s: %s' % (view.context.__name__, fields_string))76 view, '%s - saved: %s' % (view.context.__name__, fields_string)) 76 77 return 77 78 -
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py
r12094 r12096 860 860 self.assertTrue( 861 861 'INFO - zope.mgr - customers.browser.DocumentManageFormPage ' 862 '- K1000000 - saved d102: title'862 '- K1000000 - d102 - saved: title' 863 863 in logcontent) 864 864 self.assertTrue( … … 1101 1101 self.assertTrue( 1102 1102 'INFO - zope.mgr - customers.browser.ApplicationManageFormPage ' 1103 '- K1000000 - saved a102: title'1103 '- K1000000 - a102 - saved: title' 1104 1104 in logcontent) 1105 1105 self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.