OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Order Processing Workflow: Which form type for custom status select field?

This topic contains 2 replies, has 2 voices, and was last updated by  Frank 3 years, 4 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #41249


    Orocommerce 3.1.9

    Hi there,

    I am trying to set up a custom workflow for order processing.

    In order to be independent from default order status, I created my own order stage status field via admin-backend entity-manager:

    entity: order
    custom fieldname: manufac_status_1stage
    type: select
    – 0% (start)
    – 100% (ready)
    – pending approval
    – approved
    – not approved

    I have 3 steps:
    – open
    – in progress
    – closed

    And corresponding transitions:
    – open
    – start_progress
    – close

    For ‘start_progress’ transition I want to define some form-options for widget, which opens after clicking ‘Start Progress’-button.

    – How to define the ‘manufac_status_1stage’-attributes, and -transition-form options?
    – Do I have to create a custom OrderProcessingStageStatusSelectType-class??

    Thanks a lot.


Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #41282

    Andrey Yatsenko

    Hi Frank,
    You said that field name is manufac_status_1stage, but in a workflow you referencing manufacStatus1stage. First, make sure all the field name is referenced correctly.

    For enum fields, default form type guesser can be used, please try to render the field with form_type: ~
    If the built-in guesser doesn’t work as expected you’ll have to create a custom form type and use it in a workflow.



    Hi Andrey,

    thanks for your reply. I adapted the code:

    Clicking the ‘Start Progress-Button’ in a specific order record, it results in an error, like:

    ‘Loading widget content failed’


    Processor failed: “oro_workflow.transit.create_form.processor”. Reason: Parameter “form_type” must be defined for attribute “status” in workflow “dergraf_workflow_order_processing”.

    My questions:

    1) line #26
    custom order-entity field definition name is: manufac_status_1stage
    for attributes.status.propertyPath CalmelCase should be used, or not?
    both not working:
    attributes.status.propertyPath: order.manufac_status_stage1
    attributes.status.propertyPath: order.manufacStatusStage1

    2) line #49
    Is ‘status’ the right value aI have to use for?

    3) line #52
    I have used ‘stage_status’, which is a custom definition, used here only
    Is this right, or what I have to refer to?

    Some explanation would be great, even for other users, having similiar problems.

    Furthermore, it would be great, if you could adapt my code, including your experience to avoid missunderstanding.

    Thanks a lot!!!!

    Kind regards

    custom ‘dergraf_workflow_order_processing’ was created in direct analogy to oro’s
    ‘opportunity_flow’ provided by SalesBundle:

    – Custom dergraf_workflow_order_processing – attribute ‘status’ refers to custom order-entity-field ‘manufac_status_stage1’, created via backend-entity-manager, and in analogy corresponds to
    – System opportunity_flow – attribute ‘status’, refering to system opportunity-entity-field ‘status’.

    • This reply was modified 3 years, 4 months ago by  Frank.
Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top