In my custom extension i have tried modify section massaction name="listing_massaction"
. Just copy content from ui_component/sales_order_grid only keep actions neccessary but after clear cache, magento still combine all action from module magento_sales
Thinks i have done
Overwrite layout sales_order_index
in my directory adminhtml/layout
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<uiComponent name="sales_order_grid"/>
</referenceContainer>
</body>
ui_component/sales_order_grid
<massaction name="listing_massaction">
<action name="custom_print_orders" class="Company\Extension\Ui\Component\Action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">custom_print_orders</item>
<item name="label" xsi:type="string" translate="true">Custom PDF - Print Orders</item>
</item>
</argument>
</action>
<action name="custom_print_invoices" class="Company\Extension\Ui\Component\Action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">custom_print_invoices</item>
<item name="label" xsi:type="string" translate="true">Custom PDF - Print Invoices</item>
</item>
</argument>
</action>
<action name="custom_print_shipments" class="Company\Extension\Ui\Component\Action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">custom_print_shipments</item>
<item name="label" xsi:type="string" translate="true">Easy PDF - Print Shipments</item>
</item>
</argument>
</action>
<action name="custom_print_creditmemos" class="Company\Extension\Ui\Component\Action">
<argument name="data" xsi:type="array">
<item name="config" xsi:type="array">
<item name="type" xsi:type="string">custom_print_creditmemos</item>
<item name="label" xsi:type="string" translate="true">Custom PDF - Print Creditmemos</item>
</item>
</argument>
</action>
</massaction>
Is there a way to remove original or disable action in massaction grid ui ?