Changeset 12096


Ignore:
Timestamp:
30 Nov 2014, 11:53:40 (10 years ago)
Author:
Henrik Bettermann
Message:

Adjust logging formats.

Inform applicants_catalog when last_product_id has been changed.

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  
    163163
    164164@grok.subscribe(IApplication, grok.IObjectAddedEvent)
    165 def handle_document_added(application, event):
     165def handle_application_added(application, event):
    166166    """If an application is added the transition create is fired.
    167167    The latter produces a logging message.
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/browser.py

    r12095 r12096  
    6767    if changed_fields:
    6868        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:
    7070        view.context.last_product_id = data['product'].product_id
     71        notify(grok.ObjectModifiedEvent(view.context))
    7172    fields_string = ' + '.join(changed_fields)
    7273    view.flash(_('Form has been saved.'))
    7374    if fields_string:
    7475        view.context.writeLogMessage(
    75             view, 'saved %s: %s' % (view.context.__name__, fields_string))
     76            view, '%s - saved: %s' % (view.context.__name__, fields_string))
    7677    return
    7778
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/tests/test_browser.py

    r12094 r12096  
    860860        self.assertTrue(
    861861            'INFO - zope.mgr - customers.browser.DocumentManageFormPage '
    862             '- K1000000 - saved d102: title'
     862            '- K1000000 - d102 - saved: title'
    863863            in logcontent)
    864864        self.assertTrue(
     
    11011101        self.assertTrue(
    11021102            'INFO - zope.mgr - customers.browser.ApplicationManageFormPage '
    1103             '- K1000000 - saved a102: title'
     1103            '- K1000000 - a102 - saved: title'
    11041104            in logcontent)
    11051105        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.