{% if entity is defined and entity is not empty %}
    {% set entity_class = oro_class_name(entity) %}
{% endif %}
{% if entity_class is defined and has_workflows(entity) and resource_granted('oro_workflow') %}
    {{
        oro_widget_render({
            'widgetType': 'buttons',
            'url': path('oro_workflow_widget_buttons', {
                entityClass: entity_class,
                entityId: entity is defined ? entity.id : 0
            }),
            'alias': 'workflow_buttons'
        })
    }}
{% endif %}

{% if entity is defined and entity is not empty %}
    {% set entity_class = oro_class_name(entity) %}
{% endif %}

{% if entity_class is defined and entity is defined and has_workflows(entity) and resource_granted('oro_workflow') %}
    {{
        oro_widget_render({
            'widgetType': 'buttons',
            'url': path('oro_workflow_widget_buttons', {
                entityClass: entity_class,
                entityId: entity is defined ? entity.id : 0
            }),
            'alias': 'workflow_buttons'
        })
    }}
{% endif %}

Enable Leads & Opportunities as a feature - fix error on the Sales Funnel grid
CRM-6332: Enable Leads & Opportunities as a feature
 - fix error on the Sales Funnel grid
