6

I have created a custom column to filter in sales order and the filters have been move to the bottom of the page. How could I move to the top? enter image description here

  • Is this a custom grid. Try clearing cache. – Sumit Verma Jun 9 '17 at 8:53
  • @SumitVerma it is not a custom grid, it is the order grid. I have cleaned cache and it doesn't work. – raumatbel Jun 9 '17 at 9:03
  • Can you provide your column declaration? Maybe there is something missing. – misterge Jun 9 '17 at 9:22
12

You need to define dependency in your module.xml

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

disable and re enable your module and check.

  • I have defined the dependency, I have cleaned cache, I have run static content deploy in backend and I have even truncated the table ui_bookmark and it doesn't work. – raumatbel Jun 9 '17 at 9:16
  • check the sequence of your module in app/etc/config.php if its above the Magento_Sales try placing below it and check – Priyank Jun 9 '17 at 9:19
  • Still the same :( – raumatbel Jun 9 '17 at 9:27
  • Thanks. It's works. I had dependencies in my module.xml badly written. – raumatbel Jun 9 '17 at 9:34
  • 1
    @Priyank Yes, I agree with you. I've already added dependency in module.xml as above and that too worked for me. (y) – Deeps Dec 19 '18 at 7:09
4

Please define dependencies in your module so that your module will load after the dependent one.

Add this code into your module.xml file

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

Please refresh the cache after this.

  • I have defined the dependency, I have cleaned cache, I have run static content deploy in backend and I have even truncated the table ui_bookmark and it doesn't work. – raumatbel Jun 9 '17 at 9:16
  • Thanks. It's works. I had dependencies in my module.xml badly written. – raumatbel Jun 9 '17 at 9:34
  • @raumatbel Can you please share how did you added dependencies in your module.xml? I'm facing the same issue. – Deeps May 17 '18 at 9:35
  • @Deeps if you are adding a custom column in sales order, the dependency is the one described in the solution. Where do you want add your custom column? – raumatbel May 17 '18 at 9:40
  • @raumatbel Dependency didn't worked for me. Solution given by Priyank in above thread worked for me. I made the changes in config.php and placed my custom module after Magento_sales. – Deeps May 18 '18 at 8:32

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.