Creating Operations

This Operations take no Goods records as inputs, and have one or several of them as outcomes.

Model.Wms.Operation.Arrival

class 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 Goods: properties, code… These are copied over to the corresponding Goods 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:

  • maybe the application won’t use the planned state at all, and will only create Arrival after checking them,
  • maybe the application will inspect the Arrival properties, compare them to reality, update them on the created Goods and cancel downstream operations if needed, before calling execute().

TODO maybe provide higher level facilities for validation scenarios.

Fields and their semantics

id = <anyblok.column.Integer object>

Primary key.

goods_type = <anyblok.relationship.Many2One object>

Expected Goods Type.

goods_code = <anyblok.column.Text object>

Expected Goods code.

Can be None in case the arrival process issues the code only at the time of actual arrival.

goods_properties = <anyblok_postgres.column.Jsonb object>

Expected Properties.

They are copied over to the newly created Goods as soon as the Arrival is planned, and aren’t updated by execute(). Matching them with reality is the concern of separate validation processes, and this field can serve for later assessments after the fact.

Specific members

inputs_number = 0

This Operation is a purely creative one.

Mandatory methods of Operation subclasses

after_insert()[source]
execute_planned()[source]