Commit 7a07cc37 authored by iv's avatar iv

ERP5Workflow: fix id access on transition + rename abreviated variable

parent 6cd8c706
...@@ -28,10 +28,10 @@ def get_obj_and_reference_list(business_field): ...@@ -28,10 +28,10 @@ def get_obj_and_reference_list(business_field):
result.append((wf, wf_id, 'workflow')) result.append((wf, wf_id, 'workflow'))
for state in wf.getStateValueList(): for state in wf.getStateValueList():
result.append((state, state.getReference(), 'state')) result.append((state, state.getReference(), 'state'))
for trans in wf.getTransitionValueList(): for transition in wf.getTransitionValueList():
result.append((trans, trans.getReference(), 'transition')) result.append((transition, transaction.getReference(), 'transition'))
if trans.trigger_type == 1 and trans.actbox_name: # 1 == TRIGGER_USER_ACTION if transition.trigger_type == 1 and transaction.actbox_name: # 1 == TRIGGER_USER_ACTION
result.append((trans, "%s_actbox_name" % trans_id, 'action')) result.append((transition, "%s_actbox_name" % transaction.getReference(), 'action'))
return result return result
business_field_list = [i for i in business_field_list if i] business_field_list = [i for i in business_field_list if i]
......
...@@ -28,10 +28,10 @@ def get_obj_and_reference_list(business_field): ...@@ -28,10 +28,10 @@ def get_obj_and_reference_list(business_field):
result.append((wf, wf_id, 'workflow')) result.append((wf, wf_id, 'workflow'))
for state in wf.getStateValueList(): for state in wf.getStateValueList():
result.append((state, state.getReference(), 'state')) result.append((state, state.getReference(), 'state'))
for trans in wf.getTransitionValueList(): for transition in wf.getTransitionValueList():
result.append((trans, trans.getReference(), 'transition')) result.append((transition, transition.getReference(), 'transition'))
if trans.trigger_type == 1 and trans.actbox_name: # 1 == TRIGGER_USER_ACTION if transition.trigger_type == 1 and transition.actbox_name: # 1 == TRIGGER_USER_ACTION
result.append((trans, "%s_actbox_name" % trans_id, 'action')) result.append((transition, "%s_actbox_name" % transition.getReference(), 'action'))
return result return result
business_field_list = [i for i in business_field_list if i] business_field_list = [i for i in business_field_list if i]
......
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