Example #1
0
def execute_event(event, object=None):
    site = getSite()
    try:
        qi = site.portal_quickinstaller
    except AttributeError:
        return
    if qi.isProductInstalled('collective.auditlog'):
        execute_rules(event)
Example #2
0
def execute_event(obj, event=None):
    if event is None:
        # ActionSuceededEvent does not send an object first
        event = obj
        obj = event.object
    executor = None
    for ev in get_automatic_events():
        if ev.providedBy(event) and obj is not None:
            executor = AuditActionExecutor(None, None, event)
            executor()
            break
    if executor is None:
        # plone sends some events twice, first wrapped. Ignore those.
        if getattr(event, 'object', None) is not None:
            execute_rules(event)
def moved(event):
    """
    When a booking is moved, execute the rules assigned to his parent.
    """
    execute_rules(event)
Example #4
0
def usefulness_rated(event):
    execute_rules(event)
Example #5
0
def moved(event):
    """
    When a booking is moved, execute the rules assigned to his parent.
    """
    execute_rules(event)
Example #6
0
def trigger_contentrules(event):
    execute_rules(event)
Example #7
0
def trigger_contentrules(event):
    execute_rules(event)