Skip to content

Stock not de-allocated on Cancel Action against an order for a custom Workflow #47

@brainOut

Description

@brainOut

Actually, with the default Workflow (WF), it is not possible to cancel an order after pick and pack transition.

If, for specific needs, you declare the cancel_action available on other transitions, AFTER the pick and pack transition, the stock management is wrong.

What it is expected :
Once an order is canceled, if a stock has been allocated, then, this allocation should be de-allocated.

What it is actually done :
If an order is cancelled after the pick and pack transition, the allocated stock is not released.

That’s the InventoryUpdateContext that’s created when going into the CancelAction. But the last boolean (true) is for setting the context to ‘virtual’, which basically means it will ‘handle’ the balancedInventory instead of the ‘normal’ one….
credits @24198


EDIT

This also happens when the allocation is set to a transition prior to pick and pack

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions