Hello everyone,

I'm trying to override the file sales_order_grid.xml to remove some print options from the mass action drop down in sales orders. I'm using Magento 2.4.2.

The original file is located here:

  1. Where should I put the file to override it?
  2. Do I need to to create a module?
  3. Can I just make a copy of the file somewhere in my custom theme?

Thank you very much,

  • Have you checked my answer? – ZealousWeb Apr 26 at 7:47

You have to do in your custom module. Please follow below steps.

Step 1: In your custom module's module.xml file you have to write below code. Path :- PackageName/Module/etc/module.xml

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="PackageName_Module" setup_version="1.0.0">
            <module name="Magento_Sales" />

Step 2: Create file sales_order_grid.xml file under PackageName/Module/view/adminhtml/ui_component/

<?xml version="1.0" encoding="UTF-8"?>
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
    <listingToolbar name="listing_top">
        <massaction name="listing_massaction">
            <action name="pdfinvoices_order">
                    <url path="sales/order/pdfinvoices"/>
                    <label translate="true">Print Invoices</label>
            <action name="pdfshipments_order">
                    <url path="sales/order/pdfshipments"/>
                    <label translate="true">Print Packing Slips</label>
            <action name="pdfcreditmemos_order">
                    <url path="sales/order/pdfcreditmemos"/>
                    <label translate="true">Print Credit Memos</label>
            <action name="pdfdocs_order">
                    <url path="sales/order/pdfdocs"/>
                    <label translate="true">Print All</label>
            <action name="print_shipping_label">
                    <url path="adminhtml/order_shipment/massPrintShippingLabel"/>
                    <label translate="true">Print Shipping Labels</label>

As per above code you can remove all print actions from mass actions from sales > orders gird.

Output will be in my case :- https://prnt.sc/122pzpl

Please check and let me know if you have any query.

  • 1
    Works like a charm, thank you very much :-) – Alldo Apr 26 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.