diff --git a/product/ERP5/Tool/SimulationTool.py b/product/ERP5/Tool/SimulationTool.py
index 1ab5ac35ef7f10a24d543855f23e3d958407eee0..abb8cb5826b02b52e605628ecd742f7a55ccd4a8 100644
--- a/product/ERP5/Tool/SimulationTool.py
+++ b/product/ERP5/Tool/SimulationTool.py
@@ -2015,6 +2015,7 @@ class SimulationTool(BaseTool):
       """
       kw['movement_list_mode'] = 1
       kw.update(self._getDefaultGroupByParameters(**kw))
+      kw['auto_extend_select_list'] = True
       sql_kw = self._generateSQLKeywordDict(**kw)
 
       return self.Resource_zGetMovementHistoryList(
diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
index 81ba23ea166ef2638c86206eac42022c82a17f5e..4869e0d92312948dbfe9ff783cad0ac1d1b81247 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Resource_zGetMovementHistoryList.xml
@@ -419,6 +419,7 @@
             <key> <string>arguments_src</string> </key>
             <value> <string>from_expression\r\n
 from_table_list:list\r\n
+select_expression\r\n
 where_expression\r\n
 order_by_expression\r\n
 group_by_expression\r\n
@@ -512,6 +513,9 @@ SELECT\n
   stock.payment_request_uid AS payment_request_uid,\n
   stock.node_uid AS node_uid,\n
   stock.section_uid AS section_uid\n
+<dtml-if select_expression>\n
+  ,<dtml-var select_expression>\n
+</dtml-if>\n
 FROM\n
 <dtml-if from_expression>\n
   <dtml-var from_expression>\n
@@ -623,6 +627,10 @@ LIMIT\n
 </dtml-if>\n
 \n
 ) AS q1\n
+<dtml-if order_by_expression>\n
+ORDER BY\n
+  <dtml-var order_by_expression>\n
+</dtml-if>\n
 
 
 ]]></string> </value>
diff --git a/product/ERP5/tests/testAccountingReports.py b/product/ERP5/tests/testAccountingReports.py
index 885166815927485ac610420145d31a2ca93d4b8f..7c60c2d60ad486ecadde3bdafe7142c043e4dad4 100644
--- a/product/ERP5/tests/testAccountingReports.py
+++ b/product/ERP5/tests/testAccountingReports.py
@@ -35,7 +35,6 @@ from DateTime import DateTime
 
 from Products.ERP5.tests.testAccounting import AccountingTestCase
 from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5ReportTestCase
-from Products.ERP5Type.tests.utils import todo_erp5
 from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
 
 class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
@@ -799,12 +798,9 @@ class TestAccountingReports(AccountingTestCase, ERP5ReportTestCase):
                      dict(source_value=account_module.goods_sales,
                           source_credit=300.0)))
 
-  @todo_erp5
   def test_Resource_zGetMovementHistoryList(self):
-    # TODO: Fix Resource_zGetMovementHistoryList so that we don't need to workaround
-    #       new behaviour of MariaDB.
-    #       Indeed, https://bugs.launchpad.net/maria/+bug/985828 has been marked
-    #       as WONTFIX.
+    # Check if Resource_zGetMovementHistoryList works fine with derived_merge optimizer.
+    # see https://bugs.launchpad.net/maria/+bug/985828
     q = self.portal.erp5_sql_connection.manage_test
     q("SET optimizer_switch = 'derived_merge=on'")
     try: