Discussion:
[Erp5-dev] Supported simulation_state values
Łukasz Nowak
2008-03-03 11:37:24 UTC
Permalink
Hello,

Where can I find supported simulation_state values and its implications
description?

As far as I find out for order-like documents simulation-states are:
draft, auto_planned, planned, ordered, confirmed, cancelled.

For delivery-like documents simulation-states are:
draft, planned, confirmed, ready, started, stopped, delivered

Are there any public available documents covering implications of those
simulation states?

FYI: I need to have additional state on my Purchase Invoices - more
than draft, but not planned yet - as simulation state will be used to
choose Purchase Invoices to be updated using delivery tool. If it is
not possible to insert such simulation state between, I'll use custom
workflow to differ planned invoices.

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.
Łukasz Nowak
2008-03-19 11:02:01 UTC
Permalink
Hello,

On 2008-03-03, 12:37:24
Post by Łukasz Nowak
Hello,
Where can I find supported simulation_state values and its
implications description?
I think that some kind of guessing might be made by such code snippet:

## Script (Python) "ERP5Site_showConfiguredSimulationStateList"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=
##title=
##
portal = context.getPortalObject()

for method_id in ['getPortalCurrentInventoryStateList',
'getPortalTransitInventoryStateList',
'getPortalDraftOrderStateList',
'getPortalPlannedOrderStateList',
'getPortalReservedInventoryStateList',
'getPortalFutureInventoryStateList',
'getPortalUpdatableAmortisationTransactionStateList']:
print method_id,getattr(portal,method_id)()


return printed


Which is returning on my site:
getPortalCurrentInventoryStateList ('started', 'delivered', 'stopped')
getPortalTransitInventoryStateList ()
getPortalDraftOrderStateList ('cancelled', 'draft', 'auto_planned')
getPortalPlannedOrderStateList ('ordered', 'planned')
getPortalReservedInventoryStateList ('ready', 'confirmed')
getPortalFutureInventoryStateList ('ordered', 'planned')
getPortalUpdatableAmortisationTransactionStateList ('draft',)

So - for invoices there is no unused state, which will still have
impact on inventory. (Unused - as planned state for
purchase/sale packing lists, which we used, to differentiate them).

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.
Loading...