How may i add column to Sales -> Invoices grid?

2 Answers 2


This solution may be a bit more efficient and 100% tested working since it follows the native way of adding a column to the grid, and you won't have to load every order displayed on the page to obtain the column data (utilising the sales_invoice_grid table instead). The above is a great example of how to create a customised renderer though.


<!-- Add the column "custom_column" (Custom Column) to the sales invoice grid. -->
<listing xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Ui:etc/ui_configuration.xsd">
<columns name="sales_order_invoice_columns">
    <column name="custom_column">
        <argument name="data" xsi:type="array">
            <item name="config" xsi:type="array">
                <item name="filter" xsi:type="string">text</item>
                <item name="label" xsi:type="string" translate="true">Custom Column</item>

Please note that you must enable the column using the drop-down widget above the invoice grid before it appears.


<!-- Sync the column "custom_column" between the sales_invoice and sales_invoice_grid tables -->
<virtualType name="Magento\Sales\Model\ResourceModel\Order\Invoice\Grid">
        <argument name="columns">
            <item name="custom_column" xsi:type="string">sales_invoice.custom_column</item>

Sample setup code to add column to sales_invoice_grid table (use this in your install/upgrade script). The same code works for the sales_invoice table by the way.

            'type' => \Magento\Framework\DB\Ddl\Table::TYPE_TEXT,
            'length' => 255,
            'nullable' => true,
            'comment' => 'Custom Column'

For details information. Please check Add column in Sales Invoice/Order grid in Magento 2

Hope it helps you! :-)

  • how where you able to get this filtered?
    – xhallix
    Apr 30, 2017 at 17:44

Can you following below link for salse invoice inside custom filed create

sales invoice grid Code

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.