Commit d8a16a09 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Replace immediateReindexObject call

Probably incomplete as we need to check for activities.
parent 2891cfb9
...@@ -5,13 +5,20 @@ resource = portal.service_module.slapos_crm_information.getRelativeUrl() ...@@ -5,13 +5,20 @@ resource = portal.service_module.slapos_crm_information.getRelativeUrl()
# create Web message if needed for this ticket # create Web message if needed for this ticket
last_event = context.portal_catalog.getResultValue( last_event = context.portal_catalog.getResultValue(
title=message_title, title=message_title,
follow_up_uid=support_request.getUid(), follow_up_uid=support_request.getUid(),
sort_on=[('delivery.start_date', 'DESC')], sort_on=[('delivery.start_date', 'DESC')],
) )
if last_event: if last_event:
# User has already been notified for this problem. # User has already been notified for this problem.
return last_event return last_event
transactional_event = context.REQUEST.get("support_request_notified_item", None)
if transactional_event is not None:
if (transactional_event.getFollowUpUid() == support_request.getUid()) and \
(transactional_event.getTitle() == message_title):
return transactional_event
event = portal.event_module.slapos_crm_web_message_template.\ event = portal.event_module.slapos_crm_web_message_template.\
Base_createCloneDocument(batch_mode=1) Base_createCloneDocument(batch_mode=1)
...@@ -27,6 +34,7 @@ event.edit( ...@@ -27,6 +34,7 @@ event.edit(
event.stop() event.stop()
event.deliver() event.deliver()
event.immediateReindexObject() support_request.serialize()
context.REQUEST.set("support_request_notified_item", event)
return event return event
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment