[OBCQL] Added ability to filter the grid on maximized view using the filter's row.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 11 Jan 2011 18:54:40 +0100
changeset 9705 4a45559183de
parent 9704 08a7da53ce77
child 9706 a78cafd05b94
[OBCQL] Added ability to filter the grid on maximized view using the filter's row.
modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_ELEMENT.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_QUERY_COLUMN.xml
modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java
modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java
modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js
--- a/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/model/tables/OBCQL_QUERY_COLUMN.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -81,6 +81,14 @@
         <default/>
         <onCreateDefault/>
       </column>
+      <column name="CAN_BE_FILTERED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault><![CDATA['N']]></onCreateDefault>
+      </column>
+      <column name="WHERECLAUSE_LEFT_PART" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_TAB" name="OBCQL_QUERY_COLUMN_ADTAB">
         <reference local="AD_TAB_ID" foreign="AD_TAB_ID"/>
       </foreign-key>
@@ -99,6 +107,8 @@
       <foreign-key foreignTable="AD_REFERENCE" name="OBCQL_QUERY_COLUMN_REFERENCE">
         <reference local="AD_REFERENCE_ID" foreign="AD_REFERENCE_ID"/>
       </foreign-key>
+      <check name="OBCQL_COLUMN_CANBEFILTERED_CHK"><![CDATA[CAN_BE_FILTERED IN ('Y', 'N')]]></check>
+      <check name="OBCQL_COLUMN_WHERECLAUSE_CHK"><![CDATA[(CAN_BE_FILTERED = 'Y' AND WHERECLAUSE_LEFT_PART IS NOT NULL) OR CAN_BE_FILTERED = 'N']]></check>
       <check name="OBCQL_QUERY_COLUMN_ACTIVECHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="OBCQL_QUERY_COLUMN_HASLINK"><![CDATA[HAS_LINK IN ('Y', 'N')]]></check>
     </table>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_COLUMN.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -1412,4 +1412,71 @@
 <!--97735A85B531BEE5E040007F0100334A-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--97735A85B531BEE5E040007F0100334A--></AD_COLUMN>
 
+<!--998FF6ADFBCB705DE040007F01006349--><AD_COLUMN>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_COLUMN_ID><![CDATA[998FF6ADFBCB705DE040007F01006349]]></AD_COLUMN_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBCB705DE040007F01006349-->  <NAME><![CDATA[Can be filtered]]></NAME>
+<!--998FF6ADFBCB705DE040007F01006349-->  <HELP><![CDATA[This flag sets whether it is possible to filter the grid by this column or not on maximized view. To be able to filter it is also needed to set on the HQL Code where clause the display expression between @ symbols that will be replaced on execution by the filter clause in case it is being filtered or "1=1" when it is not.
+
+For example: having the following HQL "select product.name as prodcutName from product". To be able to filter by product name it is needed to include a  "where @productName@" in the where clause: "select product.name as prodcutName from product where @productName@"]]></HELP>
+<!--998FF6ADFBCB705DE040007F01006349-->  <COLUMNNAME><![CDATA[Can_Be_Filtered]]></COLUMNNAME>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_TABLE_ID><![CDATA[8EE7634FA71B40FDB9ADF85374264BF6]]></AD_TABLE_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--998FF6ADFBCB705DE040007F01006349-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--998FF6ADFBCB705DE040007F01006349-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_ELEMENT_ID><![CDATA[998FF6ADFBCD705DE040007F01006349]]></AD_ELEMENT_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--998FF6ADFBCB705DE040007F01006349-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--998FF6ADFBCB705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBCB705DE040007F01006349-->  <POSITION><![CDATA[21]]></POSITION>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--998FF6ADFBCB705DE040007F01006349-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--998FF6ADFBCB705DE040007F01006349-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--998FF6ADFBCB705DE040007F01006349--></AD_COLUMN>
+
+<!--998FF6ADFBCC705DE040007F01006349--><AD_COLUMN>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_COLUMN_ID><![CDATA[998FF6ADFBCC705DE040007F01006349]]></AD_COLUMN_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBCC705DE040007F01006349-->  <NAME><![CDATA[Where Clause Left Part]]></NAME>
+<!--998FF6ADFBCC705DE040007F01006349-->  <HELP><![CDATA[Left part of the where clause needed to filter by a value of this column on the maximized view.]]></HELP>
+<!--998FF6ADFBCC705DE040007F01006349-->  <COLUMNNAME><![CDATA[Whereclause_Left_Part]]></COLUMNNAME>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_TABLE_ID><![CDATA[8EE7634FA71B40FDB9ADF85374264BF6]]></AD_TABLE_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <FIELDLENGTH><![CDATA[255]]></FIELDLENGTH>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--998FF6ADFBCC705DE040007F01006349-->  <SEQNO><![CDATA[220]]></SEQNO>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_ELEMENT_ID><![CDATA[998FF6ADFBCF705DE040007F01006349]]></AD_ELEMENT_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--998FF6ADFBCC705DE040007F01006349-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--998FF6ADFBCC705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBCC705DE040007F01006349-->  <POSITION><![CDATA[22]]></POSITION>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--998FF6ADFBCC705DE040007F01006349-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--998FF6ADFBCC705DE040007F01006349-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--998FF6ADFBCC705DE040007F01006349--></AD_COLUMN>
+
 </data>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -113,4 +113,30 @@
 <!--977365E5A94B3B33E040007F010031AE-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
 <!--977365E5A94B3B33E040007F010031AE--></AD_ELEMENT>
 
+<!--998FF6ADFBCD705DE040007F01006349--><AD_ELEMENT>
+<!--998FF6ADFBCD705DE040007F01006349-->  <AD_ELEMENT_ID><![CDATA[998FF6ADFBCD705DE040007F01006349]]></AD_ELEMENT_ID>
+<!--998FF6ADFBCD705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBCD705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBCD705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBCD705DE040007F01006349-->  <COLUMNNAME><![CDATA[Can_Be_Filtered]]></COLUMNNAME>
+<!--998FF6ADFBCD705DE040007F01006349-->  <NAME><![CDATA[Can be filtered]]></NAME>
+<!--998FF6ADFBCD705DE040007F01006349-->  <PRINTNAME><![CDATA[Can be filtered]]></PRINTNAME>
+<!--998FF6ADFBCD705DE040007F01006349-->  <HELP><![CDATA[This flag sets whether it is possible to filter the grid by this column or not on maximized view. To be able to filter it is also needed to set on the HQL Code where clause the display expression between @ symbols that will be replaced on execution by the filter clause in case it is being filtered or "1=1" when it is not.
+
+For example: having the following HQL "select product.name as prodcutName from product". To be able to filter by product name it is needed to include a  "where @productName@" in the where clause: "select product.name as prodcutName from product where @productName@"]]></HELP>
+<!--998FF6ADFBCD705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBCD705DE040007F01006349--></AD_ELEMENT>
+
+<!--998FF6ADFBCF705DE040007F01006349--><AD_ELEMENT>
+<!--998FF6ADFBCF705DE040007F01006349-->  <AD_ELEMENT_ID><![CDATA[998FF6ADFBCF705DE040007F01006349]]></AD_ELEMENT_ID>
+<!--998FF6ADFBCF705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBCF705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBCF705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBCF705DE040007F01006349-->  <COLUMNNAME><![CDATA[Whereclause_Left_Part]]></COLUMNNAME>
+<!--998FF6ADFBCF705DE040007F01006349-->  <NAME><![CDATA[Where Clause Left Part]]></NAME>
+<!--998FF6ADFBCF705DE040007F01006349-->  <PRINTNAME><![CDATA[Where Clause Left Part]]></PRINTNAME>
+<!--998FF6ADFBCF705DE040007F01006349-->  <HELP><![CDATA[Left part of the where clause needed to filter by a value of this column on the maximized view.]]></HELP>
+<!--998FF6ADFBCF705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBCF705DE040007F01006349--></AD_ELEMENT>
+
 </data>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_FIELD.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -761,4 +761,57 @@
 <!--97735A85B534BEE5E040007F0100334A-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
 <!--97735A85B534BEE5E040007F0100334A--></AD_FIELD>
 
+<!--998FF6ADFBD6705DE040007F01006349--><AD_FIELD>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_FIELD_ID><![CDATA[998FF6ADFBD6705DE040007F01006349]]></AD_FIELD_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBD6705DE040007F01006349-->  <NAME><![CDATA[Can be filtered]]></NAME>
+<!--998FF6ADFBD6705DE040007F01006349-->  <HELP><![CDATA[This flag sets whether it is possible to filter the grid by this column or not on maximized view. To be able to filter it is also needed to set on the HQL Code where clause the display expression between @ symbols that will be replaced on execution by the filter clause in case it is being filtered or "1=1" when it is not.
+
+For example: having the following HQL "select product.name as prodcutName from product". To be able to filter by product name it is needed to include a  "where @productName@" in the where clause: "select product.name as prodcutName from product where @productName@"]]></HELP>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_TAB_ID><![CDATA[15F16613CF764D948B2B2163F7A9CFF8]]></AD_TAB_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_COLUMN_ID><![CDATA[998FF6ADFBCB705DE040007F01006349]]></AD_COLUMN_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--998FF6ADFBD6705DE040007F01006349-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--998FF6ADFBD6705DE040007F01006349-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--998FF6ADFBD6705DE040007F01006349-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--998FF6ADFBD6705DE040007F01006349-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--998FF6ADFBD6705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBD6705DE040007F01006349-->  <GRID_SEQNO><![CDATA[130]]></GRID_SEQNO>
+<!--998FF6ADFBD6705DE040007F01006349-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--998FF6ADFBD6705DE040007F01006349-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--998FF6ADFBD6705DE040007F01006349--></AD_FIELD>
+
+<!--998FF6ADFBD8705DE040007F01006349--><AD_FIELD>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_FIELD_ID><![CDATA[998FF6ADFBD8705DE040007F01006349]]></AD_FIELD_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--998FF6ADFBD8705DE040007F01006349-->  <NAME><![CDATA[Where Clause Left Part]]></NAME>
+<!--998FF6ADFBD8705DE040007F01006349-->  <HELP><![CDATA[Left part of the where clause needed to filter by a value of this column on the maximized view.]]></HELP>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_TAB_ID><![CDATA[15F16613CF764D948B2B2163F7A9CFF8]]></AD_TAB_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_COLUMN_ID><![CDATA[998FF6ADFBCC705DE040007F01006349]]></AD_COLUMN_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--998FF6ADFBD8705DE040007F01006349-->  <DISPLAYLOGIC><![CDATA[@can_be_filtered@='Y']]></DISPLAYLOGIC>
+<!--998FF6ADFBD8705DE040007F01006349-->  <DISPLAYLENGTH><![CDATA[255]]></DISPLAYLENGTH>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--998FF6ADFBD8705DE040007F01006349-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--998FF6ADFBD8705DE040007F01006349-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--998FF6ADFBD8705DE040007F01006349-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--998FF6ADFBD8705DE040007F01006349-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--998FF6ADFBD8705DE040007F01006349-->  <GRID_SEQNO><![CDATA[140]]></GRID_SEQNO>
+<!--998FF6ADFBD8705DE040007F01006349-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--998FF6ADFBD8705DE040007F01006349-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--998FF6ADFBD8705DE040007F01006349--></AD_FIELD>
+
 </data>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -1,5 +1,16 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <data>
+<!--51E3AB93D32F488E896F1E03654B89F3--><AD_MESSAGE>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <AD_MESSAGE_ID><![CDATA[51E3AB93D32F488E896F1E03654B89F3]]></AD_MESSAGE_ID>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <VALUE><![CDATA[obcql_column_whereclause_chk]]></VALUE>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <MSGTEXT><![CDATA['Where Clause Left Part' field is mandatory when the 'Can be filtered' flag is enabled.]]></MSGTEXT>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--51E3AB93D32F488E896F1E03654B89F3-->  <AD_MODULE_ID><![CDATA[0A060B2AF1974E8EAA8DB61388E9AECC]]></AD_MODULE_ID>
+<!--51E3AB93D32F488E896F1E03654B89F3--></AD_MESSAGE>
+
 <!--5E5284441DF84DD9805D53C571E2D05E--><AD_MESSAGE>
 <!--5E5284441DF84DD9805D53C571E2D05E-->  <AD_MESSAGE_ID><![CDATA[5E5284441DF84DD9805D53C571E2D05E]]></AD_MESSAGE_ID>
 <!--5E5284441DF84DD9805D53C571E2D05E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_QUERY_COLUMN.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_QUERY_COLUMN.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -13,6 +13,8 @@
 <!--01AA894DAA8040218F90CC3B9E73344B-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--01AA894DAA8040218F90CC3B9E73344B-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--01AA894DAA8040218F90CC3B9E73344B-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--01AA894DAA8040218F90CC3B9E73344B-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--01AA894DAA8040218F90CC3B9E73344B-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.outstandingAmount]]></WHERECLAUSE_LEFT_PART>
 <!--01AA894DAA8040218F90CC3B9E73344B--></OBCQL_QUERY_COLUMN>
 
 <!--15817E30D88A4E04ACA56D1E92D24FD7--><OBCQL_QUERY_COLUMN>
@@ -28,6 +30,8 @@
 <!--15817E30D88A4E04ACA56D1E92D24FD7-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--15817E30D88A4E04ACA56D1E92D24FD7-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--15817E30D88A4E04ACA56D1E92D24FD7-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--15817E30D88A4E04ACA56D1E92D24FD7-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--15817E30D88A4E04ACA56D1E92D24FD7-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.paymentDate]]></WHERECLAUSE_LEFT_PART>
 <!--15817E30D88A4E04ACA56D1E92D24FD7--></OBCQL_QUERY_COLUMN>
 
 <!--1FCFFA0840074019BF84BBD9E507CB91--><OBCQL_QUERY_COLUMN>
@@ -43,6 +47,8 @@
 <!--1FCFFA0840074019BF84BBD9E507CB91-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--1FCFFA0840074019BF84BBD9E507CB91-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--1FCFFA0840074019BF84BBD9E507CB91-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--1FCFFA0840074019BF84BBD9E507CB91-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--1FCFFA0840074019BF84BBD9E507CB91-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.invoiceDate]]></WHERECLAUSE_LEFT_PART>
 <!--1FCFFA0840074019BF84BBD9E507CB91--></OBCQL_QUERY_COLUMN>
 
 <!--366186B2156C445EA59FECA4E1B72F51--><OBCQL_QUERY_COLUMN>
@@ -58,6 +64,8 @@
 <!--366186B2156C445EA59FECA4E1B72F51-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
 <!--366186B2156C445EA59FECA4E1B72F51-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--366186B2156C445EA59FECA4E1B72F51-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--366186B2156C445EA59FECA4E1B72F51-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--366186B2156C445EA59FECA4E1B72F51-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.uOM.name]]></WHERECLAUSE_LEFT_PART>
 <!--366186B2156C445EA59FECA4E1B72F51--></OBCQL_QUERY_COLUMN>
 
 <!--379830F53AF44639B79DB5AB113A575F--><OBCQL_QUERY_COLUMN>
@@ -75,6 +83,8 @@
 <!--379830F53AF44639B79DB5AB113A575F-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--379830F53AF44639B79DB5AB113A575F-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--379830F53AF44639B79DB5AB113A575F-->  <AD_TAB_ID><![CDATA[263]]></AD_TAB_ID>
+<!--379830F53AF44639B79DB5AB113A575F-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--379830F53AF44639B79DB5AB113A575F-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.documentNo]]></WHERECLAUSE_LEFT_PART>
 <!--379830F53AF44639B79DB5AB113A575F--></OBCQL_QUERY_COLUMN>
 
 <!--379E3A62E4FF4007B32C6A96BEFDEFCC--><OBCQL_QUERY_COLUMN>
@@ -90,6 +100,8 @@
 <!--379E3A62E4FF4007B32C6A96BEFDEFCC-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
 <!--379E3A62E4FF4007B32C6A96BEFDEFCC-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--379E3A62E4FF4007B32C6A96BEFDEFCC-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--379E3A62E4FF4007B32C6A96BEFDEFCC-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--379E3A62E4FF4007B32C6A96BEFDEFCC-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.attributeSetValue.description]]></WHERECLAUSE_LEFT_PART>
 <!--379E3A62E4FF4007B32C6A96BEFDEFCC--></OBCQL_QUERY_COLUMN>
 
 <!--3C3DBC6021C94CFFA82AF855A7AF6C2F--><OBCQL_QUERY_COLUMN>
@@ -107,6 +119,8 @@
 <!--3C3DBC6021C94CFFA82AF855A7AF6C2F-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--3C3DBC6021C94CFFA82AF855A7AF6C2F-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--3C3DBC6021C94CFFA82AF855A7AF6C2F-->  <AD_TAB_ID><![CDATA[220]]></AD_TAB_ID>
+<!--3C3DBC6021C94CFFA82AF855A7AF6C2F-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--3C3DBC6021C94CFFA82AF855A7AF6C2F-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.businessPartner.name]]></WHERECLAUSE_LEFT_PART>
 <!--3C3DBC6021C94CFFA82AF855A7AF6C2F--></OBCQL_QUERY_COLUMN>
 
 <!--493479BFB7D94915889AA9BDD6BB3EA8--><OBCQL_QUERY_COLUMN>
@@ -122,6 +136,8 @@
 <!--493479BFB7D94915889AA9BDD6BB3EA8-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
 <!--493479BFB7D94915889AA9BDD6BB3EA8-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--493479BFB7D94915889AA9BDD6BB3EA8-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--493479BFB7D94915889AA9BDD6BB3EA8-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--493479BFB7D94915889AA9BDD6BB3EA8-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.daysTillDue]]></WHERECLAUSE_LEFT_PART>
 <!--493479BFB7D94915889AA9BDD6BB3EA8--></OBCQL_QUERY_COLUMN>
 
 <!--4FE8DE4D7CF94B128CBA09973BD21C1D--><OBCQL_QUERY_COLUMN>
@@ -139,6 +155,8 @@
 <!--4FE8DE4D7CF94B128CBA09973BD21C1D-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--4FE8DE4D7CF94B128CBA09973BD21C1D-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--4FE8DE4D7CF94B128CBA09973BD21C1D-->  <AD_TAB_ID><![CDATA[C4B6506838E14A349D6717D6856F1B56]]></AD_TAB_ID>
+<!--4FE8DE4D7CF94B128CBA09973BD21C1D-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--4FE8DE4D7CF94B128CBA09973BD21C1D-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.documentNo]]></WHERECLAUSE_LEFT_PART>
 <!--4FE8DE4D7CF94B128CBA09973BD21C1D--></OBCQL_QUERY_COLUMN>
 
 <!--51429339D294475986634D7E876F4A53--><OBCQL_QUERY_COLUMN>
@@ -156,6 +174,8 @@
 <!--51429339D294475986634D7E876F4A53-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--51429339D294475986634D7E876F4A53-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--51429339D294475986634D7E876F4A53-->  <AD_TAB_ID><![CDATA[290]]></AD_TAB_ID>
+<!--51429339D294475986634D7E876F4A53-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--51429339D294475986634D7E876F4A53-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.documentNo]]></WHERECLAUSE_LEFT_PART>
 <!--51429339D294475986634D7E876F4A53--></OBCQL_QUERY_COLUMN>
 
 <!--5410706611F04069A9326D70425EAD22--><OBCQL_QUERY_COLUMN>
@@ -171,6 +191,8 @@
 <!--5410706611F04069A9326D70425EAD22-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--5410706611F04069A9326D70425EAD22-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--5410706611F04069A9326D70425EAD22-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--5410706611F04069A9326D70425EAD22-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--5410706611F04069A9326D70425EAD22-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.dueAmount]]></WHERECLAUSE_LEFT_PART>
 <!--5410706611F04069A9326D70425EAD22--></OBCQL_QUERY_COLUMN>
 
 <!--56DC401F52BF4BE593C782240AE4AB67--><OBCQL_QUERY_COLUMN>
@@ -187,6 +209,8 @@
 <!--56DC401F52BF4BE593C782240AE4AB67-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--56DC401F52BF4BE593C782240AE4AB67-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--56DC401F52BF4BE593C782240AE4AB67-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--56DC401F52BF4BE593C782240AE4AB67-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--56DC401F52BF4BE593C782240AE4AB67-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.amount]]></WHERECLAUSE_LEFT_PART>
 <!--56DC401F52BF4BE593C782240AE4AB67--></OBCQL_QUERY_COLUMN>
 
 <!--6B151041105E4DD0805AC2F709A7A81E--><OBCQL_QUERY_COLUMN>
@@ -202,6 +226,8 @@
 <!--6B151041105E4DD0805AC2F709A7A81E-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--6B151041105E4DD0805AC2F709A7A81E-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--6B151041105E4DD0805AC2F709A7A81E-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--6B151041105E4DD0805AC2F709A7A81E-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--6B151041105E4DD0805AC2F709A7A81E-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.paymentDate]]></WHERECLAUSE_LEFT_PART>
 <!--6B151041105E4DD0805AC2F709A7A81E--></OBCQL_QUERY_COLUMN>
 
 <!--70CEB497CA254F3C892AE0B68920897D--><OBCQL_QUERY_COLUMN>
@@ -219,6 +245,8 @@
 <!--70CEB497CA254F3C892AE0B68920897D-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--70CEB497CA254F3C892AE0B68920897D-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--70CEB497CA254F3C892AE0B68920897D-->  <AD_TAB_ID><![CDATA[220]]></AD_TAB_ID>
+<!--70CEB497CA254F3C892AE0B68920897D-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--70CEB497CA254F3C892AE0B68920897D-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.businessPartner.name]]></WHERECLAUSE_LEFT_PART>
 <!--70CEB497CA254F3C892AE0B68920897D--></OBCQL_QUERY_COLUMN>
 
 <!--742D993ADF7444318F8CAF38DDCB1997--><OBCQL_QUERY_COLUMN>
@@ -236,6 +264,8 @@
 <!--742D993ADF7444318F8CAF38DDCB1997-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--742D993ADF7444318F8CAF38DDCB1997-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--742D993ADF7444318F8CAF38DDCB1997-->  <AD_TAB_ID><![CDATA[220]]></AD_TAB_ID>
+<!--742D993ADF7444318F8CAF38DDCB1997-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--742D993ADF7444318F8CAF38DDCB1997-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.businessPartner.name]]></WHERECLAUSE_LEFT_PART>
 <!--742D993ADF7444318F8CAF38DDCB1997--></OBCQL_QUERY_COLUMN>
 
 <!--7DF4871F997942C1A51E064F022CF5E8--><OBCQL_QUERY_COLUMN>
@@ -251,6 +281,8 @@
 <!--7DF4871F997942C1A51E064F022CF5E8-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
 <!--7DF4871F997942C1A51E064F022CF5E8-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--7DF4871F997942C1A51E064F022CF5E8-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--7DF4871F997942C1A51E064F022CF5E8-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--7DF4871F997942C1A51E064F022CF5E8-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.salesOrder.businessPartner.name]]></WHERECLAUSE_LEFT_PART>
 <!--7DF4871F997942C1A51E064F022CF5E8--></OBCQL_QUERY_COLUMN>
 
 <!--7EFCCE042B4841D0B9377B54F11973E7--><OBCQL_QUERY_COLUMN>
@@ -266,6 +298,8 @@
 <!--7EFCCE042B4841D0B9377B54F11973E7-->  <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID>
 <!--7EFCCE042B4841D0B9377B54F11973E7-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--7EFCCE042B4841D0B9377B54F11973E7-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--7EFCCE042B4841D0B9377B54F11973E7-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--7EFCCE042B4841D0B9377B54F11973E7-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.daysTillDue]]></WHERECLAUSE_LEFT_PART>
 <!--7EFCCE042B4841D0B9377B54F11973E7--></OBCQL_QUERY_COLUMN>
 
 <!--88104CDF6CC2418FB405A4B5BA74265D--><OBCQL_QUERY_COLUMN>
@@ -281,6 +315,8 @@
 <!--88104CDF6CC2418FB405A4B5BA74265D-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--88104CDF6CC2418FB405A4B5BA74265D-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--88104CDF6CC2418FB405A4B5BA74265D-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--88104CDF6CC2418FB405A4B5BA74265D-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--88104CDF6CC2418FB405A4B5BA74265D-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.salesOrder.scheduledDeliveryDate]]></WHERECLAUSE_LEFT_PART>
 <!--88104CDF6CC2418FB405A4B5BA74265D--></OBCQL_QUERY_COLUMN>
 
 <!--8B623EFDB1244BBDA320EDEE47FB6C21--><OBCQL_QUERY_COLUMN>
@@ -296,6 +332,8 @@
 <!--8B623EFDB1244BBDA320EDEE47FB6C21-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
 <!--8B623EFDB1244BBDA320EDEE47FB6C21-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--8B623EFDB1244BBDA320EDEE47FB6C21-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--8B623EFDB1244BBDA320EDEE47FB6C21-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--8B623EFDB1244BBDA320EDEE47FB6C21-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.product.name]]></WHERECLAUSE_LEFT_PART>
 <!--8B623EFDB1244BBDA320EDEE47FB6C21--></OBCQL_QUERY_COLUMN>
 
 <!--94B1051270614629B02531C5F894BCF1--><OBCQL_QUERY_COLUMN>
@@ -313,6 +351,8 @@
 <!--94B1051270614629B02531C5F894BCF1-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--94B1051270614629B02531C5F894BCF1-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--94B1051270614629B02531C5F894BCF1-->  <AD_TAB_ID><![CDATA[220]]></AD_TAB_ID>
+<!--94B1051270614629B02531C5F894BCF1-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--94B1051270614629B02531C5F894BCF1-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.businessPartner.name]]></WHERECLAUSE_LEFT_PART>
 <!--94B1051270614629B02531C5F894BCF1--></OBCQL_QUERY_COLUMN>
 
 <!--9F88542C3F944CDF867298D292C8113C--><OBCQL_QUERY_COLUMN>
@@ -328,6 +368,8 @@
 <!--9F88542C3F944CDF867298D292C8113C-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
 <!--9F88542C3F944CDF867298D292C8113C-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--9F88542C3F944CDF867298D292C8113C-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--9F88542C3F944CDF867298D292C8113C-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--9F88542C3F944CDF867298D292C8113C-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.paymentTerms.name]]></WHERECLAUSE_LEFT_PART>
 <!--9F88542C3F944CDF867298D292C8113C--></OBCQL_QUERY_COLUMN>
 
 <!--9FC7E75A21F34920AA2695261935FD06--><OBCQL_QUERY_COLUMN>
@@ -345,6 +387,8 @@
 <!--9FC7E75A21F34920AA2695261935FD06-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--9FC7E75A21F34920AA2695261935FD06-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--9FC7E75A21F34920AA2695261935FD06-->  <AD_TAB_ID><![CDATA[F7A52FDAAA0346EFA07D53C125B40404]]></AD_TAB_ID>
+<!--9FC7E75A21F34920AA2695261935FD06-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--9FC7E75A21F34920AA2695261935FD06-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.documentNo]]></WHERECLAUSE_LEFT_PART>
 <!--9FC7E75A21F34920AA2695261935FD06--></OBCQL_QUERY_COLUMN>
 
 <!--B1C95647F5AC45A3A3B4EC6BBFE8CD06--><OBCQL_QUERY_COLUMN>
@@ -360,6 +404,8 @@
 <!--B1C95647F5AC45A3A3B4EC6BBFE8CD06-->  <AD_REFERENCE_ID><![CDATA[29]]></AD_REFERENCE_ID>
 <!--B1C95647F5AC45A3A3B4EC6BBFE8CD06-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--B1C95647F5AC45A3A3B4EC6BBFE8CD06-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--B1C95647F5AC45A3A3B4EC6BBFE8CD06-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--B1C95647F5AC45A3A3B4EC6BBFE8CD06-->  <WHERECLAUSE_LEFT_PART><![CDATA[(select coalesce(sum(po.quantity),0)      from ProcurementPOInvoiceMatch po     where po.goodsShipmentLine is not null     and po.salesOrderLine = ol)]]></WHERECLAUSE_LEFT_PART>
 <!--B1C95647F5AC45A3A3B4EC6BBFE8CD06--></OBCQL_QUERY_COLUMN>
 
 <!--B1CA7F1719964CD2B9F2ECD4B7BD162B--><OBCQL_QUERY_COLUMN>
@@ -375,6 +421,8 @@
 <!--B1CA7F1719964CD2B9F2ECD4B7BD162B-->  <AD_REFERENCE_ID><![CDATA[29]]></AD_REFERENCE_ID>
 <!--B1CA7F1719964CD2B9F2ECD4B7BD162B-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--B1CA7F1719964CD2B9F2ECD4B7BD162B-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--B1CA7F1719964CD2B9F2ECD4B7BD162B-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--B1CA7F1719964CD2B9F2ECD4B7BD162B-->  <WHERECLAUSE_LEFT_PART><![CDATA[(select ol.orderedQuantity-coalesce(sum(po2.quantity),0) from ProcurementPOInvoiceMatch po2     where po2.goodsShipmentLine is not null     and po2.salesOrderLine = ol)]]></WHERECLAUSE_LEFT_PART>
 <!--B1CA7F1719964CD2B9F2ECD4B7BD162B--></OBCQL_QUERY_COLUMN>
 
 <!--BBBF2F44391C43F98B4FDEAF62BE81D1--><OBCQL_QUERY_COLUMN>
@@ -390,6 +438,8 @@
 <!--BBBF2F44391C43F98B4FDEAF62BE81D1-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--BBBF2F44391C43F98B4FDEAF62BE81D1-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--BBBF2F44391C43F98B4FDEAF62BE81D1-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--BBBF2F44391C43F98B4FDEAF62BE81D1-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--BBBF2F44391C43F98B4FDEAF62BE81D1-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.invoiceDate]]></WHERECLAUSE_LEFT_PART>
 <!--BBBF2F44391C43F98B4FDEAF62BE81D1--></OBCQL_QUERY_COLUMN>
 
 <!--C13ADACEAEC74C1FA77151F5DA0D3965--><OBCQL_QUERY_COLUMN>
@@ -405,6 +455,8 @@
 <!--C13ADACEAEC74C1FA77151F5DA0D3965-->  <AD_REFERENCE_ID><![CDATA[29]]></AD_REFERENCE_ID>
 <!--C13ADACEAEC74C1FA77151F5DA0D3965-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--C13ADACEAEC74C1FA77151F5DA0D3965-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--C13ADACEAEC74C1FA77151F5DA0D3965-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--C13ADACEAEC74C1FA77151F5DA0D3965-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.orderedQuantity]]></WHERECLAUSE_LEFT_PART>
 <!--C13ADACEAEC74C1FA77151F5DA0D3965--></OBCQL_QUERY_COLUMN>
 
 <!--C31C48F4A17D43B291BA6762D05E75B4--><OBCQL_QUERY_COLUMN>
@@ -422,6 +474,8 @@
 <!--C31C48F4A17D43B291BA6762D05E75B4-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--C31C48F4A17D43B291BA6762D05E75B4-->  <HAS_LINK><![CDATA[Y]]></HAS_LINK>
 <!--C31C48F4A17D43B291BA6762D05E75B4-->  <AD_TAB_ID><![CDATA[294]]></AD_TAB_ID>
+<!--C31C48F4A17D43B291BA6762D05E75B4-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--C31C48F4A17D43B291BA6762D05E75B4-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.salesOrder.documentNo]]></WHERECLAUSE_LEFT_PART>
 <!--C31C48F4A17D43B291BA6762D05E75B4--></OBCQL_QUERY_COLUMN>
 
 <!--CDC05CE5642E4327BA12FEA50597A8A3--><OBCQL_QUERY_COLUMN>
@@ -438,6 +492,8 @@
 <!--CDC05CE5642E4327BA12FEA50597A8A3-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--CDC05CE5642E4327BA12FEA50597A8A3-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--CDC05CE5642E4327BA12FEA50597A8A3-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--CDC05CE5642E4327BA12FEA50597A8A3-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--CDC05CE5642E4327BA12FEA50597A8A3-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.grandTotalAmount]]></WHERECLAUSE_LEFT_PART>
 <!--CDC05CE5642E4327BA12FEA50597A8A3--></OBCQL_QUERY_COLUMN>
 
 <!--D8C77A2A8B934351ACF38542FD807183--><OBCQL_QUERY_COLUMN>
@@ -453,6 +509,8 @@
 <!--D8C77A2A8B934351ACF38542FD807183-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--D8C77A2A8B934351ACF38542FD807183-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--D8C77A2A8B934351ACF38542FD807183-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--D8C77A2A8B934351ACF38542FD807183-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--D8C77A2A8B934351ACF38542FD807183-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.outstandingAmount]]></WHERECLAUSE_LEFT_PART>
 <!--D8C77A2A8B934351ACF38542FD807183--></OBCQL_QUERY_COLUMN>
 
 <!--DFFE8FF0D0D8414796B134FA89E07F43--><OBCQL_QUERY_COLUMN>
@@ -468,6 +526,8 @@
 <!--DFFE8FF0D0D8414796B134FA89E07F43-->  <AD_REFERENCE_ID><![CDATA[15]]></AD_REFERENCE_ID>
 <!--DFFE8FF0D0D8414796B134FA89E07F43-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--DFFE8FF0D0D8414796B134FA89E07F43-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--DFFE8FF0D0D8414796B134FA89E07F43-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--DFFE8FF0D0D8414796B134FA89E07F43-->  <WHERECLAUSE_LEFT_PART><![CDATA[ol.salesOrder.orderDate]]></WHERECLAUSE_LEFT_PART>
 <!--DFFE8FF0D0D8414796B134FA89E07F43--></OBCQL_QUERY_COLUMN>
 
 <!--F582F7725D3F40469A956945A85A67AD--><OBCQL_QUERY_COLUMN>
@@ -483,6 +543,8 @@
 <!--F582F7725D3F40469A956945A85A67AD-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--F582F7725D3F40469A956945A85A67AD-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--F582F7725D3F40469A956945A85A67AD-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--F582F7725D3F40469A956945A85A67AD-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--F582F7725D3F40469A956945A85A67AD-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.dueAmount]]></WHERECLAUSE_LEFT_PART>
 <!--F582F7725D3F40469A956945A85A67AD--></OBCQL_QUERY_COLUMN>
 
 <!--F62EBD9018364D61A8F6D4A5CC0E52E6--><OBCQL_QUERY_COLUMN>
@@ -498,6 +560,8 @@
 <!--F62EBD9018364D61A8F6D4A5CC0E52E6-->  <AD_REFERENCE_ID><![CDATA[14]]></AD_REFERENCE_ID>
 <!--F62EBD9018364D61A8F6D4A5CC0E52E6-->  <INCLUDE_IN><![CDATA[M]]></INCLUDE_IN>
 <!--F62EBD9018364D61A8F6D4A5CC0E52E6-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--F62EBD9018364D61A8F6D4A5CC0E52E6-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--F62EBD9018364D61A8F6D4A5CC0E52E6-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.paymentTerms.name]]></WHERECLAUSE_LEFT_PART>
 <!--F62EBD9018364D61A8F6D4A5CC0E52E6--></OBCQL_QUERY_COLUMN>
 
 <!--FAB0DB1A67D948DB85AD5918B7845ABF--><OBCQL_QUERY_COLUMN>
@@ -514,6 +578,8 @@
 <!--FAB0DB1A67D948DB85AD5918B7845ABF-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--FAB0DB1A67D948DB85AD5918B7845ABF-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--FAB0DB1A67D948DB85AD5918B7845ABF-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--FAB0DB1A67D948DB85AD5918B7845ABF-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--FAB0DB1A67D948DB85AD5918B7845ABF-->  <WHERECLAUSE_LEFT_PART><![CDATA[inv.grandTotalAmount]]></WHERECLAUSE_LEFT_PART>
 <!--FAB0DB1A67D948DB85AD5918B7845ABF--></OBCQL_QUERY_COLUMN>
 
 <!--FE9812790C0943C584999CEAAD93E95D--><OBCQL_QUERY_COLUMN>
@@ -530,6 +596,8 @@
 <!--FE9812790C0943C584999CEAAD93E95D-->  <AD_REFERENCE_ID><![CDATA[12]]></AD_REFERENCE_ID>
 <!--FE9812790C0943C584999CEAAD93E95D-->  <INCLUDE_IN><![CDATA[W]]></INCLUDE_IN>
 <!--FE9812790C0943C584999CEAAD93E95D-->  <HAS_LINK><![CDATA[N]]></HAS_LINK>
+<!--FE9812790C0943C584999CEAAD93E95D-->  <CAN_BE_FILTERED><![CDATA[Y]]></CAN_BE_FILTERED>
+<!--FE9812790C0943C584999CEAAD93E95D-->  <WHERECLAUSE_LEFT_PART><![CDATA[p.amount]]></WHERECLAUSE_LEFT_PART>
 <!--FE9812790C0943C584999CEAAD93E95D--></OBCQL_QUERY_COLUMN>
 
 </data>
--- a/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src-db/database/sourcedata/OBCQL_WIDGET_QUERY.xml	Tue Jan 11 18:54:40 2011 +0100
@@ -18,6 +18,7 @@
       and inv.paymentComplete = false
       and inv.salesTransaction = true
       and inv.client.id = :client
+      and @optional_filters@
 order by inv.invoiceDate]]></HQL>
 <!--1EF87E8E961A4E5BA3B41E1AB772B47C--></OBCQL_WIDGET_QUERY>
 
@@ -39,6 +40,7 @@
       and inv.paymentComplete = false
       and inv.salesTransaction = false
       and inv.client.id = :client
+      and @optional_filters@
 order by inv.invoiceDate]]></HQL>
 <!--58BCB96595FA45678CC1423402238309--></OBCQL_WIDGET_QUERY>
 
@@ -58,6 +60,7 @@
       and p.processed = true
       and p.receipt = true
       and p.status = 'RPAE'
+      and @optional_filters@
 order by p.paymentDate]]></HQL>
 <!--E5A0DC8536134185AC8B1897F15DB816--></OBCQL_WIDGET_QUERY>
 
@@ -89,6 +92,7 @@
 and ol.product.name like :productname
 and ol.salesOrder.businessPartner.name like :suppliername
 and ol.salesOrder.documentNo like :documentno
+and @optional_filters@
 order by ol.salesOrder.scheduledDeliveryDate, ol.salesOrder.documentNo]]></HQL>
 <!--F5DEE669DD8047FB831A12064BB277BE--></OBCQL_WIDGET_QUERY>
 
@@ -108,6 +112,7 @@
       and p.processed = true
       and p.receipt = false
       and p.status = 'RPAE'
+      and @optional_filters@
 order by p.paymentDate]]></HQL>
 <!--F94AEB4680AD4AD48255071903000A43--></OBCQL_WIDGET_QUERY>
 
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListDataSource.java	Tue Jan 11 18:54:40 2011 +0100
@@ -21,6 +21,7 @@
 import java.sql.Timestamp;
 import java.text.SimpleDateFormat;
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.LinkedHashMap;
@@ -28,6 +29,11 @@
 import java.util.Map;
 
 import org.hibernate.Query;
+import org.openbravo.base.model.ModelProvider;
+import org.openbravo.base.model.domaintype.BigDecimalDomainType;
+import org.openbravo.base.model.domaintype.DateDomainType;
+import org.openbravo.base.model.domaintype.DomainType;
+import org.openbravo.base.model.domaintype.LongDomainType;
 import org.openbravo.base.model.domaintype.PrimitiveDomainType;
 import org.openbravo.client.application.Parameter;
 import org.openbravo.client.application.ParameterUtils;
@@ -52,6 +58,7 @@
  * @author gorkaion
  */
 public class QueryListDataSource extends ReadOnlyDataSourceService {
+  private static final String OPTIONAL_FILTERS = "@optional_filters@";
 
   /**
    * Returns the count of objects based on the passed parameters.
@@ -80,9 +87,14 @@
       boolean showAll = "true".equals(parameters.get("showAll"));
       String viewMode = parameters.get("viewMode");
       WidgetClass widgetClass = widgetInstance.getWidgetClass();
+      List<OBCQL_QueryColumn> columns = QueryListUtils.getColumns(widgetClass
+          .getOBCQLWidgetQueryList().get(0));
 
-      Query widgetQuery = OBDal.getInstance().getSession().createQuery(
-          widgetClass.getOBCQLWidgetQueryList().get(0).getHQL());
+      String HQL = widgetClass.getOBCQLWidgetQueryList().get(0).getHQL();
+      // Parse the HQL in case that optional filters are required
+      HQL = parseOptionalFilters(HQL, viewMode, parameters, columns, xmlDateFormat);
+
+      Query widgetQuery = OBDal.getInstance().getSession().createQuery(HQL);
       String[] queryAliases = widgetQuery.getReturnAliases();
 
       if (!isExport && "widget".equals(viewMode) && !showAll) {
@@ -115,18 +127,15 @@
         }
       }
 
-      List<OBCQL_QueryColumn> columns = QueryListUtils.getColumns(widgetClass
-          .getOBCQLWidgetQueryList().get(0));
-
       final List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
       for (Object objResult : widgetQuery.list()) {
         final Map<String, Object> data = new LinkedHashMap<String, Object>();
-
         Object[] resultList = new Object[1];
-        if (objResult instanceof Object[])
+        if (objResult instanceof Object[]) {
           resultList = (Object[]) objResult;
-        else
+        } else {
           resultList[0] = objResult;
+        }
 
         for (OBCQL_QueryColumn column : columns) {
           // TODO: throw an exception if the display expression doesn't match any returned alias.
@@ -181,6 +190,64 @@
     return parameterValues;
   }
 
+  private String parseOptionalFilters(String _HQL, String viewMode, Map<String, String> parameters,
+      List<OBCQL_QueryColumn> columns, SimpleDateFormat xmlDateFormat) {
+    StringBuffer optionalFilter = new StringBuffer(" 1=1 ");
+    String HQL = _HQL;
+
+    // Parse for columns filtered by grid's filter row on maximized view. If we are not on maximized
+    // view return the HQL without parsing.
+    if ("maximized".equals(viewMode)) {
+      for (OBCQL_QueryColumn column : columns) {
+        if (column.isCanBeFiltered()) {
+          String value = parameters.get(column.getDisplayExpression());
+          String whereClause = " 1=1 ";
+          if (value != null) {
+            whereClause = getWhereClause(value, column, xmlDateFormat);
+          }
+
+          if (HQL.contains("@" + column.getDisplayExpression() + "@")) {
+            HQL = HQL.replace("@" + column.getDisplayExpression() + "@", whereClause);
+          } else {
+            optionalFilter.append(" and " + whereClause);
+          }
+        }
+      }
+    }
+    HQL = HQL.replace(OPTIONAL_FILTERS, optionalFilter.toString());
+    return HQL;
+  }
+
+  private String getWhereClause(String value, OBCQL_QueryColumn column,
+      SimpleDateFormat xmlDateFormat) {
+    String whereClause = "";
+    DomainType domainType = ModelProvider.getInstance().getReference(column.getReference().getId())
+        .getDomainType();
+    if (domainType.getClass().getSuperclass().equals(BigDecimalDomainType.class)
+        || domainType.getClass().equals(LongDomainType.class)) {
+      whereClause = column.getWhereClauseLeftPart() + " = " + value;
+    } else if (domainType.getClass().equals(DateDomainType.class)) {
+      try {
+        final Calendar cal = Calendar.getInstance();
+        cal.setTime(xmlDateFormat.parse(value));
+        whereClause = " (day(" + column.getWhereClauseLeftPart() + ") = " + cal.get(Calendar.DATE);
+        whereClause += "\n and month(" + column.getWhereClauseLeftPart() + ") = "
+            + (cal.get(Calendar.MONTH) + 1);
+        whereClause += "\n and year(" + column.getWhereClauseLeftPart() + ") = "
+            + cal.get(Calendar.YEAR) + ") ";
+      } catch (Exception e) {
+        // ignore these errors, just don't filter then
+        // add a dummy whereclause to make the query format correct
+        whereClause = " 1=1 ";
+      }
+    } else {
+      whereClause = "upper(" + column.getWhereClauseLeftPart() + ")";
+      whereClause += " LIKE ";
+      whereClause += "'%" + value.toUpperCase().replaceAll(" ", "%") + "%'";
+    }
+    return whereClause;
+  }
+
   public List<DataSourceProperty> getDataSourceProperties(Map<String, Object> parameters) {
     // note datasource properties are not cached as the component is
     // re-used within one request thread
--- a/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/src/org/openbravo/client/querylist/QueryListUtils.java	Tue Jan 11 18:54:40 2011 +0100
@@ -61,6 +61,8 @@
               reference);
           field.put("name", column.getDisplayExpression());
           field.put("type", uiDefinition.getName());
+          field.put("filterEditorType", uiDefinition.getFilterEditorType());
+          field.put("canFilter", column.isCanBeFiltered());
           if (column.isHasLink()) {
             field.put("isLink", true);
             field.put("OB_LinkExpression", column.getLinkExpression());
--- a/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Tue Jan 11 18:28:52 2011 +0100
+++ b/modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js	Tue Jan 11 18:54:40 2011 +0100
@@ -85,12 +85,11 @@
       styleName: ''
     }), url, params = {};
     
-// FIXME: not shown filters row until optional filter parameters are possible
-//    if (this.viewMode === 'maximized') {
-//      isc.addProperties(this.gridProperties, {
-//        showFilterEditor: true
-//      });
-//    }
+    if (this.viewMode === 'maximized') {
+      isc.addProperties(this.gridProperties, {
+        showFilterEditor: true
+      });
+    }
     
     this.grid = isc.OBQueryListGrid.create(isc.addProperties({
       dataSource: this.gridDataSource,
@@ -164,6 +163,11 @@
   canAutoFitFields: false,
   showGridSummary: true,
   
+  dataProperties: {
+    useClientFiltering: false,
+    useClientSorting: false
+  },
+  
   filterData: function(criteria, callback, requestProperties){
     var crit = criteria || {},
     reqProperties = requestProperties || {};