Various constants used throughout WMS applications.
This module defines several constants for use in Selection columns definitions. In this fundational library, we actually don’t care about the labels, since we have no specified user interaction.
However, the Selection column type forces us to define some, that’s why we
settled for labels than can themselves be used stably and without ambiguity
as keys for a display system (with i18n in mind), such as
wms_op_type_pack
.
anyblok_wms_base.constants.
CONTENTS_PROPERTY
= 'contents'¶Standard property used for containing Goods.
This is used in Unpack Operation to specify variable expected outcomes, i.e., those that aren’t specified by the Type behaviour.
This is also used in the Assembly Operation to record the components of the outcome.
anyblok_wms_base.constants.
DATE_TIME_INFINITY
= <object object>¶A marker used to represent +infinity date/time.
For instance, if a method is used to query Avatars for a given date, using this marker in the interface is more explicit than using None (which could also mean one does not care about dates).
anyblok_wms_base.constants.
DEFAULT_ASSEMBLY_NAME
= 'default'¶The default name to use for assemblies.
See Wms.Operation.Assembly
for more detail.
anyblok_wms_base.constants.
GOODS_STATES
= {'future': 'wms_goods_states_future', 'past': 'wms_goods_states_past', 'present': 'wms_goods_states_present'}¶This is the enumeration of possible values of the state
column of
the Wms.Goods
Model.
present
:past
:future
:anyblok_wms_base.constants.
OPERATION_STATES
= {'done': 'wms_wms_op_states_done', 'planned': 'wms_op_states_planned', 'started': 'wms_op_states_started'}¶This is the enumeration of possible values of the state
field of
the Wms.Operation
Model and its
subclasses.
See Lifecycle of operations for a full discussion of these values.
anyblok_wms_base.constants.
OPERATION_TYPES
= {'wms_aggregate': 'wms_op_types_aggregate', 'wms_arrival': 'wms_op_types_arrival', 'wms_assembly': 'wms_op_types_assembly', 'wms_departure': 'wms_op_types_departure', 'wms_move': 'wms_op_types_move', 'wms_split': 'wms_op_types_split', 'wms_unpack': 'wms_op_types_unpack'}¶The keys of this dict
are used for the polymorphism of
the Wms.Operation
Model.
As these keys
supposed to be unique among all polymorphic cases in the whole application,
they are prefixed with wms_
.