Most Powerful Open Source ERP

Guideline Never Use DoActionFor In ERP5

Use transition methods to manually trigger workflow transitions.
  • Last Update:2017-04-05
  • Version:001
  • Language:en

Never Use DoActionFor In ERP5

Never use doActionFor to implement logic. ERP5 generates transition methods for all workflow transitions implemented as workflow methods. If you need to programmaticaly trigger a transition on a workflow, use transition methods. Transition methods are intended to represent the workflow logic, unlike workflow actions which should be used for user interface only.

Good Examples:

context.submit()

Bad Examples:

context.getPortalObject().portal_workflow.doActionFor(object, 'submit_action')