[Erp5-dev] [Erp5-report] r20588 - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateItem/p...
Łukasz Nowak
lukasz.nowak at ventis.com.pl
Thu Apr 17 11:19:31 CEST 2008
Hello,
(...)
> > Would it be possible to have some kind of configuration, like
> > 'default_accounting_workflow' somewhere or fetching possible state
> > list based on object/portal type? I seen many commits, which was
> > avoiding workflow id hardcoding after some requests, but right now
> > this habit is coming back...
> >
> I think it has already been discussed on this list but no solutions
> has been retained for now.
> For my case I will make a library specific to order so that if you
> have to change the default workflow id to use yours, you will only
> need to do it in the library.
Well - it is possible to fetch workflow based possible list in context
of object associated with workflow. I was thinking about to write such
script:
def Base_getPossibleStateList(state_name='simulation_state'):
workflow = context.Base_getWorkflowForState(state_name=state_name)
return workflow.getPossibleStateList()
It might need to be proxy to manager or even use external
method. What do you think about such idea? They might use caching,
etc.
And BTW - same situation is in tests and system still.
Is it something wrong with invoking:
portal.doActionFor(object,'confirm_action')
instead (it might be found in tests, eg. testPackingList,
stepSplitAndDeferPackingList):
portal.doActionFor(object,'confirm_action',workflow_id='workflow_name')
Regards,
Luke
--
Łukasz Nowak R&D Ventis http://www.ventis.com.pl/
tel: +48 32 768 16 85 fax: +48 32 392 10 61
``Use the Source, Luke...'' I am only craftsman.
More information about the Erp5-dev
mailing list