These Operations have no inputs, and have one or several outcomes.
anyblok_wms_base.core.operation.arrival.
Arrival
[source]¶Operation to describe physical arrival of goods in some location.
Arrivals store data about the expected or arrived physical objects: properties, code… These are copied over to the corresponding PhysObj records in all cases and stay inert after the fact.
In case the Arrival state is planned
,
these are obviously only unchecked values,
but in case it is done
, the actual meaning can depend
on the application:
planned
state at all, and
will only create Arrival after checking them,execute()
.TODO maybe provide higher level facilities for validation scenarios.
id
= <anyblok.column.Integer object>¶Primary key.
goods_type
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_type
was goods_type
.
This does not extend to compatibility of the former low level
goods_type_id
column.
goods_code
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_code
was goods_code
.
goods_properties
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_properties
was goods_properties
.
inputs_number
= 0¶This Operation is a purely creative one.
refine_with_trailing_unpack
(arrivals, pack_type, dt_pack_arrival=None, dt_unpack=None, pack_properties=None, pack_code=None)[source]¶Replace some Arrivals by the Arrival of a pack followed by an Unpack.
This is useful in cases where it is impossible to predict ahead how incoming goods will actually be packed: the arrivals of individual items can first be planned, and once more is known about the form of delivery, this classmethod can replace some of them with the Arrival of a parcel and the subsequent Unpack.
Together with refine_with_trailing_move
,
this can handle the use case detailed in
Superseding of planned operations.
Parameters: |
|
---|
anyblok_wms_base.core.operation.apparition.
Apparition
[source]¶Inventory Operation to record unexpected physical objects.
This is similar to Arrival, but has a distinct functional meaning.
Apparitions can exist only in the done
state.
Another difference with Arrivals is that Apparitions have a
quantity
field.
id
= <anyblok.column.Integer object>¶Primary key.
quantity
= <anyblok.column.Integer object>¶The number of identical PhysObj that have appeared.
Here, identical means “same type, code and properties”
location
= <anyblok.relationship.Many2One object>¶Location of appeared PhysObj.
This will be the location of the initial Avatars.
goods_type
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_type
was goods_type
.
This does not extend to compatibility of the former low level
goods_type_id
column.
goods_code
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_code
was goods_code
.
goods_properties
= <anyblok.field.Function object>¶Compatibility wrapper.
Before version 0.9.0, physobj_properties
was goods_properties
.
inputs_number
= 0¶This Operation is a purely creative one.
check_create_conditions
(state, dt_execution, location=None, **kwargs)[source]¶Forbid creation with wrong states, check location is a container.
Raises: |
|
---|
after_insert
()[source]¶Create the PhysObj and their Avatars.
In the wms-core
implementation, the quantity
field
gives rise to as many PhysObj records.
check_create_conditions
(state, dt_execution, location=None, **kwargs)[source]Forbid creation with wrong states, check location is a container.
Raises: |
|
---|