Commit 449d5e67 authored by Romain Courteaud's avatar Romain Courteaud

slapos_crm: stop setting person as source_project

parent 77808337
...@@ -16,7 +16,7 @@ ticket_portal_type = "Regularisation Request" ...@@ -16,7 +16,7 @@ ticket_portal_type = "Regularisation Request"
ticket = portal.portal_catalog.getResultValue( ticket = portal.portal_catalog.getResultValue(
portal_type=ticket_portal_type, portal_type=ticket_portal_type,
default_source_project_uid=person.getUid(), default_destination_uid=person.getUid(),
simulation_state=['suspended', 'validated'], simulation_state=['suspended', 'validated'],
) )
...@@ -51,7 +51,6 @@ if int(outstanding_amount) > 0: ...@@ -51,7 +51,6 @@ if int(outstanding_amount) > 0:
portal.portal_preferences.getPreferredRegularisationRequestTemplate()) portal.portal_preferences.getPreferredRegularisationRequestTemplate())
ticket = regularisation_request_template.Base_createCloneDocument(batch_mode=1) ticket = regularisation_request_template.Base_createCloneDocument(batch_mode=1)
ticket.edit( ticket.edit(
source_project_value=context,
title='Account regularisation expected for "%s"' % context.getTitle(), title='Account regularisation expected for "%s"' % context.getTitle(),
destination_decision_value=context, destination_decision_value=context,
destination_value=context, destination_value=context,
......
...@@ -4,7 +4,7 @@ if REQUEST is not None: ...@@ -4,7 +4,7 @@ if REQUEST is not None:
ticket = context ticket = context
state = ticket.getSimulationState() state = ticket.getSimulationState()
person = ticket.getSourceProjectValue(portal_type="Person") person = ticket.getDestinationDecisionValue(portal_type="Person")
if (state == 'suspended') and \ if (state == 'suspended') and \
(person is not None) and \ (person is not None) and \
(ticket.getResource() == 'service_module/slapos_crm_delete_acknowledgement'): (ticket.getResource() == 'service_module/slapos_crm_delete_acknowledgement'):
......
...@@ -3,7 +3,7 @@ if REQUEST is not None: ...@@ -3,7 +3,7 @@ if REQUEST is not None:
raise Unauthorized raise Unauthorized
state = context.getSimulationState() state = context.getSimulationState()
person = context.getSourceProjectValue(portal_type="Person") person = context.getDestinationDecisionValue(portal_type="Person")
if (state not in ('suspended', 'validated')) or \ if (state not in ('suspended', 'validated')) or \
(person is None): (person is None):
return return
......
...@@ -4,7 +4,7 @@ if REQUEST is not None: ...@@ -4,7 +4,7 @@ if REQUEST is not None:
ticket = context ticket = context
state = ticket.getSimulationState() state = ticket.getSimulationState()
person = ticket.getSourceProjectValue(portal_type="Person") person = ticket.getDestinationDecisionValue(portal_type="Person")
if (state == 'suspended') and \ if (state == 'suspended') and \
(person is not None) and \ (person is not None) and \
(ticket.getResource() in ['service_module/slapos_crm_stop_acknowledgement', 'service_module/slapos_crm_delete_reminder', 'service_module/slapos_crm_delete_acknowledgement']): (ticket.getResource() in ['service_module/slapos_crm_stop_acknowledgement', 'service_module/slapos_crm_delete_reminder', 'service_module/slapos_crm_delete_acknowledgement']):
......
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