erp5_core: fix KeyError: '..._action' in Module_listWorkflowTransitionItemList
When a workflow transition was not used by any state, calling some_module.Module_listWorkflowTransitionItemList was raising: [..] Module script, line 49, in Module_listWorkflowTransitionItemList - <PythonScript at /tsxx/Module_listWorkflowTransitionItemList used for /tsxx/some_module> - Line 49 result['listbox_parameter_dict'][transition_id] = [(state_variable, allowed_state_dict[transition_id])] Module AccessControl.ZopeGuards, line 83, in guarded_getitem v = object[index] KeyError: 'some_action' Now, pick transition among the allowed_state_dict instead of workflow.transitions. This also fixes mass change state dialog "??? ()" issue. This commit adds a transition that allows to reproduce that issue. And this line covers the case : bt5/erp5_web_renderjs_ui_test/PathTemplateItem/portal_tests/renderjs_ui_zuite/testMassWorkflowTransition.zpt (line 61) /reviewed-on nexedi/erp5!788
Showing
Please register or sign in to comment