Commit cb965c7c authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_crm: Alarm can cancel validated Regularisation Requests

   Regularisation Requests can be auto cancelled even if they are Operator assigned. This prevents extra unnecessary extra mensagens.
parent 974c16d3
portal = context.getPortalObject()
portal.portal_catalog.searchAndActivate(
portal_type="Regularisation Request",
simulation_state=["suspended"],
simulation_state=["suspended", "validated"],
method_id='RegularisationRequest_invalidateIfPersonBalanceIsOk',
activate_kw={'tag': tag}
)
......
......@@ -4,7 +4,7 @@ if REQUEST is not None:
state = context.getSimulationState()
person = context.getSourceProjectValue(portal_type="Person")
if (state != 'suspended') or \
if (state not in ('suspended', 'validated')) or \
(person is None):
return
......
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