Can anyone let me know how to remove existing columns from Admin->Sales->Order->View->Items Grid? Moreover, I also need to add a new column in the same grid, please find attached screenshot for your reference:
I have tried to override vendor/magento/module-sales/view/adminhtml/layout/sales_order_view.xml file in my module and removed some of the columns but it throws the following error.
[2018-10-02 09:18:58] main.CRITICAL: The element 'order_items' already has a child with alias 'default' {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): The element 'order_items' already has a child with alias 'default' at /var/www/html/bannerbuzzmagento2/vendor/magento/framework/Data/Structure.php:611)"} []
[2018-10-02 09:18:59] main.CRITICAL: Invalid block type: Namespace\Module\Block\Adminhtml\DefaultRenderer {"exception":"[object] (Magento\\Framework\\Exception\\LocalizedException(code: 0): Invalid block type: Namespace\\Module\\Block\\Adminhtml\\DefaultRenderer at /var/www/html/bannerbuzzmagento2/vendor/magento/framework/View/Layout/Generator/Block.php:275, ReflectionException(code: -1): Class Namespace\\Module\\Block\\Adminhtml\\DefaultRenderer does not exist at /var/www/html/bannerbuzzmagento2/vendor/magento/framework/Code/Reader/ClassReader.php:19)"} []
Best Answer
You can Try this its work for me.
Add sales_order_view.xml file in your custom module Packagename/Modulename/view/adminhtml/layout and remove column as per your requirement.