Commit 6a7f7fc3 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

workflow: now another workflow script should be accessed by...

workflow: now another workflow script should be accessed by container.script_<SCRIPT_ID>, instead of container.<SCRIPT_ID>.
parent f81cc864
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
because only validated accounts are displayed in the cache. because only validated accounts are displayed in the cache.
""" """
if sci['object'].getValidationState() == 'validated': if sci['object'].getValidationState() == 'validated':
container.Account_flushAccountListCache(sci) container.script_Account_flushAccountListCache(sci)
...@@ -13,7 +13,7 @@ section_portal_type_list = ['Person', 'Organisation'] ...@@ -13,7 +13,7 @@ section_portal_type_list = ['Person', 'Organisation']
invalid_state_list = ['invalidated', 'deleted'] invalid_state_list = ['invalidated', 'deleted']
# first of all, validate the transaction itself # first of all, validate the transaction itself
container.validateTransaction(state_change) container.script_validateTransaction(state_change)
# Check that all lines uses open accounts, and doesn't use invalid third # Check that all lines uses open accounts, and doesn't use invalid third
......
...@@ -24,4 +24,4 @@ for simulation_movement in simulation_movement_list: ...@@ -24,4 +24,4 @@ for simulation_movement in simulation_movement_list:
if simulation_movement.getOrder() == delivery_movement.getRelativeUrl(): if simulation_movement.getOrder() == delivery_movement.getRelativeUrl():
simulation_movement.setOrder(None) simulation_movement.setOrder(None)
context.DeliveryMovement_updateSimulation(state_change) container.script_DeliveryMovement_updateSimulation(state_change)
from Products.ERP5Type.Core.Workflow import ValidationFailed from Products.ERP5Type.Core.Workflow import ValidationFailed
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
container.Event_checkConsistency(sci) container.script_Event_checkConsistency(sci)
portal = sci.getPortal() portal = sci.getPortal()
portal_workflow = portal.portal_workflow portal_workflow = portal.portal_workflow
......
...@@ -15,4 +15,4 @@ if test_result.getPortalType() == 'Test Result Node': ...@@ -15,4 +15,4 @@ if test_result.getPortalType() == 'Test Result Node':
edit_kw[key] = key_value edit_kw[key] = key_value
test_result.edit(**edit_kw) test_result.edit(**edit_kw)
else: else:
context.TestResult_complete(sci) container.script_TestResult_complete(sci)
...@@ -3,14 +3,14 @@ portal = context.getPortalObject() ...@@ -3,14 +3,14 @@ portal = context.getPortalObject()
portal_type = ticket.getPortalType() portal_type = ticket.getPortalType()
if portal_type in ("Leave Request", "Leave Request Period"): if portal_type in ("Leave Request", "Leave Request Period"):
context.Alarm_safeTrigger( container.script_Alarm_safeTrigger(
portal.portal_alarms.create_representative_record_for_leave_request portal.portal_alarms.create_representative_record_for_leave_request
) )
elif portal_type in ("Expense Validation Request"): elif portal_type in ("Expense Validation Request"):
context.Alarm_safeTrigger( container.script_Alarm_safeTrigger(
portal.portal_alarms.create_representative_record_for_expense_validation_request portal.portal_alarms.create_representative_record_for_expense_validation_request
) )
elif portal_type in ("Travel Request"): elif portal_type in ("Travel Request"):
context.Alarm_safeTrigger( container.script_Alarm_safeTrigger(
portal.portal_alarms.create_representative_record_for_travel_request portal.portal_alarms.create_representative_record_for_travel_request
) )
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