Fixes issue 21639: Created new selector for managing large
authorDavid Miguelez <david.miguelez@openbravo.com>
Mon, 24 Sep 2012 16:44:28 +0200
changeset 18071 8d6028e7aba3
parent 18070 803d0686dbd3
child 18072 275e131b7c0c
Fixes issue 21639: Created new selector for managing large
amounts of data.
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/OBUISEL_SELECTOR.xml
src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml
src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Fri Sep 28 11:24:29 2012 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Mon Sep 24 16:44:28 2012 +0200
@@ -4729,6 +4729,18 @@
 <!--7039147A5B49457DA3D13F807EC8E01F-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
 <!--7039147A5B49457DA3D13F807EC8E01F--></AD_REFERENCE>
 
+<!--712D9821BE8246AC95E6C16D8BEEBE5E--><AD_REFERENCE>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <AD_REFERENCE_ID><![CDATA[712D9821BE8246AC95E6C16D8BEEBE5E]]></AD_REFERENCE_ID>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <NAME><![CDATA[ProductSimple]]></NAME>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <ISBASEREFERENCE><![CDATA[N]]></ISBASEREFERENCE>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <PARENTREFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></PARENTREFERENCE_ID>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E-->  <ISVALUEDISPLAYED><![CDATA[N]]></ISVALUEDISPLAYED>
+<!--712D9821BE8246AC95E6C16D8BEEBE5E--></AD_REFERENCE>
+
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4--><AD_REFERENCE>
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <AD_REFERENCE_ID><![CDATA[725CD8C6882C40AFB4D1C27B1AEF8BB4]]></AD_REFERENCE_ID>
 <!--725CD8C6882C40AFB4D1C27B1AEF8BB4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Fri Sep 28 11:24:29 2012 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml	Mon Sep 24 16:44:28 2012 +0200
@@ -126,6 +126,32 @@
 <!--A35B6EC33A2243018915908AEB1B3F5E-->  <CUSTOM_QUERY><![CDATA[N]]></CUSTOM_QUERY>
 <!--A35B6EC33A2243018915908AEB1B3F5E--></OBUISEL_SELECTOR>
 
+<!--EB3C41F0973A4EDA91E475833792A6D4--><OBUISEL_SELECTOR>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <NAME><![CDATA[ProductSimple]]></NAME>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <AD_REFERENCE_ID><![CDATA[712D9821BE8246AC95E6C16D8BEEBE5E]]></AD_REFERENCE_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <AD_TABLE_ID><![CDATA[208]]></AD_TABLE_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <FILTER_EXPRESSION><![CDATA[if (OB.getParameters().get('inpcCurrencyId')){ " pl.salesPriceList = " + OB.isSalesTransaction()  + " AND c.id = '" + OB.getParameters().get('inpcCurrencyId') + "'" }]]></FILTER_EXPRESSION>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <VALUEFIELD_ID><![CDATA[EDADAD64A1634FDEA50343CE1AAAF1FB]]></VALUEFIELD_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <DISPLAYFIELD_ID><![CDATA[797E2E6C7A6D4A349491B85A1C1ACB7D]]></DISPLAYFIELD_ID>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <SUGGESTIONTEXTMATCHSTYLE><![CDATA[startsWith]]></SUGGESTIONTEXTMATCHSTYLE>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <POPUPTEXTMATCHSTYLE><![CDATA[startsWith]]></POPUPTEXTMATCHSTYLE>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <HQL><![CDATA[select p.searchKey as searchKey, p.id as id, plv as priceListVersion, plv.name as priceListVersionName, c.id as currency, pp.priceLimit as priceLimit, p.name as productName,p.uOM as uOM, pp.standardPrice as standardPrice, pp.listPrice as netListPrice, pl.salesPriceList as salesPriceList
+from PricingProductPrice pp
+join pp.product p
+join pp.priceListVersion plv
+join plv.priceList pl
+left join pl.currency c
+where @additional_filters@]]></HQL>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <ENTITY_ALIAS><![CDATA[pp]]></ENTITY_ALIAS>
+<!--EB3C41F0973A4EDA91E475833792A6D4-->  <CUSTOM_QUERY><![CDATA[Y]]></CUSTOM_QUERY>
+<!--EB3C41F0973A4EDA91E475833792A6D4--></OBUISEL_SELECTOR>
+
 <!--F132874BE0954A9B8C1301BE20704730--><OBUISEL_SELECTOR>
 <!--F132874BE0954A9B8C1301BE20704730-->  <OBUISEL_SELECTOR_ID><![CDATA[F132874BE0954A9B8C1301BE20704730]]></OBUISEL_SELECTOR_ID>
 <!--F132874BE0954A9B8C1301BE20704730-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Fri Sep 28 11:24:29 2012 +0200
+++ b/src-db/database/sourcedata/OBUISEL_SELECTOR_FIELD.xml	Mon Sep 24 16:44:28 2012 +0200
@@ -67,6 +67,28 @@
 <!--1A3CADEA9ED94D039A6667599E0E63C0-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--1A3CADEA9ED94D039A6667599E0E63C0--></OBUISEL_SELECTOR_FIELD>
 
+<!--1E2A8D7793C64421814CAD979FFBB1FB--><OBUISEL_SELECTOR_FIELD>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[1E2A8D7793C64421814CAD979FFBB1FB]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <NAME><![CDATA[Unit Price]]></NAME>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SORT><![CDATA[Y]]></SORT>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SORTNO><![CDATA[40]]></SORTNO>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <ISOUTFIELD><![CDATA[Y]]></ISOUTFIELD>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SUFFIX><![CDATA[_PSTD]]></SUFFIX>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <DISPLAY_EXPRESSION><![CDATA[standardPrice]]></DISPLAY_EXPRESSION>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <CLAUSE_LEFT_PART><![CDATA[p.standardPrice]]></CLAUSE_LEFT_PART>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <AD_REFERENCE_ID><![CDATA[800008]]></AD_REFERENCE_ID>
+<!--1E2A8D7793C64421814CAD979FFBB1FB-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--1E2A8D7793C64421814CAD979FFBB1FB--></OBUISEL_SELECTOR_FIELD>
+
 <!--1FFD5B1F3D7248DCAFA8225E92D17606--><OBUISEL_SELECTOR_FIELD>
 <!--1FFD5B1F3D7248DCAFA8225E92D17606-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[1FFD5B1F3D7248DCAFA8225E92D17606]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--1FFD5B1F3D7248DCAFA8225E92D17606-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
@@ -158,6 +180,28 @@
 <!--3203B0B55E504F2BB6EF533075441F1A-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--3203B0B55E504F2BB6EF533075441F1A--></OBUISEL_SELECTOR_FIELD>
 
+<!--32244F2B9B414FD4B3AB8607DC91EA3A--><OBUISEL_SELECTOR_FIELD>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[32244F2B9B414FD4B3AB8607DC91EA3A]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <NAME><![CDATA[List Price]]></NAME>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SORT><![CDATA[Y]]></SORT>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SORTNO><![CDATA[50]]></SORTNO>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <ISOUTFIELD><![CDATA[Y]]></ISOUTFIELD>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SUFFIX><![CDATA[_PLIST]]></SUFFIX>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <DISPLAY_EXPRESSION><![CDATA[netListPrice]]></DISPLAY_EXPRESSION>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <CLAUSE_LEFT_PART><![CDATA[p.netListPrice]]></CLAUSE_LEFT_PART>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <AD_REFERENCE_ID><![CDATA[800008]]></AD_REFERENCE_ID>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--32244F2B9B414FD4B3AB8607DC91EA3A--></OBUISEL_SELECTOR_FIELD>
+
 <!--3425E56A245B47519498AFD14B8C1408--><OBUISEL_SELECTOR_FIELD>
 <!--3425E56A245B47519498AFD14B8C1408-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[3425E56A245B47519498AFD14B8C1408]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--3425E56A245B47519498AFD14B8C1408-->  <OBUISEL_SELECTOR_ID><![CDATA[2E64F551C7C4470C80C29DBA24B34A5F]]></OBUISEL_SELECTOR_ID>
@@ -263,6 +307,27 @@
 <!--3C4C59A1AB77437A959F10D42D32FDE7-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--3C4C59A1AB77437A959F10D42D32FDE7--></OBUISEL_SELECTOR_FIELD>
 
+<!--3E910632234C4C42AF49DCE8CC95A12B--><OBUISEL_SELECTOR_FIELD>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[3E910632234C4C42AF49DCE8CC95A12B]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <NAME><![CDATA[Search Key]]></NAME>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <SORT><![CDATA[Y]]></SORT>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <SEARCHINSUGGESTIONBOX><![CDATA[Y]]></SEARCHINSUGGESTIONBOX>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <SORTNO><![CDATA[10]]></SORTNO>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <DISPLAY_EXPRESSION><![CDATA[searchKey]]></DISPLAY_EXPRESSION>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <CLAUSE_LEFT_PART><![CDATA[p.searchKey]]></CLAUSE_LEFT_PART>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--3E910632234C4C42AF49DCE8CC95A12B-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--3E910632234C4C42AF49DCE8CC95A12B--></OBUISEL_SELECTOR_FIELD>
+
 <!--4028E61131FB4B1B0131FB53BDDB0012--><OBUISEL_SELECTOR_FIELD>
 <!--4028E61131FB4B1B0131FB53BDDB0012-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[4028E61131FB4B1B0131FB53BDDB0012]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--4028E61131FB4B1B0131FB53BDDB0012-->  <OBUISEL_SELECTOR_ID><![CDATA[4028E61131FB4B1B0131FB5307F1000C]]></OBUISEL_SELECTOR_ID>
@@ -576,6 +641,28 @@
 <!--5B2FA3B98CF64853A30AAE19AC8C8B78-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--5B2FA3B98CF64853A30AAE19AC8C8B78--></OBUISEL_SELECTOR_FIELD>
 
+<!--5C49AEF18F02402180E472E45E58C776--><OBUISEL_SELECTOR_FIELD>
+<!--5C49AEF18F02402180E472E45E58C776-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[5C49AEF18F02402180E472E45E58C776]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <NAME><![CDATA[Price Limit]]></NAME>
+<!--5C49AEF18F02402180E472E45E58C776-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SORT><![CDATA[Y]]></SORT>
+<!--5C49AEF18F02402180E472E45E58C776-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SORTNO><![CDATA[90]]></SORTNO>
+<!--5C49AEF18F02402180E472E45E58C776-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--5C49AEF18F02402180E472E45E58C776-->  <ISOUTFIELD><![CDATA[Y]]></ISOUTFIELD>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SUFFIX><![CDATA[_PLM]]></SUFFIX>
+<!--5C49AEF18F02402180E472E45E58C776-->  <DISPLAY_EXPRESSION><![CDATA[priceLimit]]></DISPLAY_EXPRESSION>
+<!--5C49AEF18F02402180E472E45E58C776-->  <CLAUSE_LEFT_PART><![CDATA[pp.priceLimit]]></CLAUSE_LEFT_PART>
+<!--5C49AEF18F02402180E472E45E58C776-->  <AD_REFERENCE_ID><![CDATA[800008]]></AD_REFERENCE_ID>
+<!--5C49AEF18F02402180E472E45E58C776-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--5C49AEF18F02402180E472E45E58C776--></OBUISEL_SELECTOR_FIELD>
+
 <!--63507B832CF94D8BB30286ED4369E55B--><OBUISEL_SELECTOR_FIELD>
 <!--63507B832CF94D8BB30286ED4369E55B-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[63507B832CF94D8BB30286ED4369E55B]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--63507B832CF94D8BB30286ED4369E55B-->  <OBUISEL_SELECTOR_ID><![CDATA[862F54CB1B074513BD791C6789F4AA42]]></OBUISEL_SELECTOR_ID>
@@ -619,6 +706,28 @@
 <!--6416523431E04149891BC4AE749AA725-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--6416523431E04149891BC4AE749AA725--></OBUISEL_SELECTOR_FIELD>
 
+<!--681AD87159544997B999B254DD4F97EC--><OBUISEL_SELECTOR_FIELD>
+<!--681AD87159544997B999B254DD4F97EC-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[681AD87159544997B999B254DD4F97EC]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <NAME><![CDATA[UOM]]></NAME>
+<!--681AD87159544997B999B254DD4F97EC-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--681AD87159544997B999B254DD4F97EC-->  <SORT><![CDATA[Y]]></SORT>
+<!--681AD87159544997B999B254DD4F97EC-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--681AD87159544997B999B254DD4F97EC-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--681AD87159544997B999B254DD4F97EC-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--681AD87159544997B999B254DD4F97EC-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--681AD87159544997B999B254DD4F97EC-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--681AD87159544997B999B254DD4F97EC-->  <ISOUTFIELD><![CDATA[Y]]></ISOUTFIELD>
+<!--681AD87159544997B999B254DD4F97EC-->  <SUFFIX><![CDATA[_UOM]]></SUFFIX>
+<!--681AD87159544997B999B254DD4F97EC-->  <DISPLAY_EXPRESSION><![CDATA[uOM]]></DISPLAY_EXPRESSION>
+<!--681AD87159544997B999B254DD4F97EC-->  <CLAUSE_LEFT_PART><![CDATA[p.uOM]]></CLAUSE_LEFT_PART>
+<!--681AD87159544997B999B254DD4F97EC-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--681AD87159544997B999B254DD4F97EC-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--681AD87159544997B999B254DD4F97EC--></OBUISEL_SELECTOR_FIELD>
+
 <!--7167B12683FD4B8C99FA777C92A39BC5--><OBUISEL_SELECTOR_FIELD>
 <!--7167B12683FD4B8C99FA777C92A39BC5-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[7167B12683FD4B8C99FA777C92A39BC5]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--7167B12683FD4B8C99FA777C92A39BC5-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
@@ -640,6 +749,27 @@
 <!--7167B12683FD4B8C99FA777C92A39BC5-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--7167B12683FD4B8C99FA777C92A39BC5--></OBUISEL_SELECTOR_FIELD>
 
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D--><OBUISEL_SELECTOR_FIELD>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[797E2E6C7A6D4A349491B85A1C1ACB7D]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <NAME><![CDATA[Name]]></NAME>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <SORT><![CDATA[Y]]></SORT>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <SEARCHINSUGGESTIONBOX><![CDATA[Y]]></SEARCHINSUGGESTIONBOX>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <SORTNO><![CDATA[20]]></SORTNO>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <DISPLAY_EXPRESSION><![CDATA[productName]]></DISPLAY_EXPRESSION>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <CLAUSE_LEFT_PART><![CDATA[p.name]]></CLAUSE_LEFT_PART>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--797E2E6C7A6D4A349491B85A1C1ACB7D--></OBUISEL_SELECTOR_FIELD>
+
 <!--7A814E72DF9240E280BA6B2AEFF9405A--><OBUISEL_SELECTOR_FIELD>
 <!--7A814E72DF9240E280BA6B2AEFF9405A-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[7A814E72DF9240E280BA6B2AEFF9405A]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--7A814E72DF9240E280BA6B2AEFF9405A-->  <OBUISEL_SELECTOR_ID><![CDATA[2E64F551C7C4470C80C29DBA24B34A5F]]></OBUISEL_SELECTOR_ID>
@@ -910,6 +1040,27 @@
 <!--9835921A3AA54B8D8D0126B3696F8354-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--9835921A3AA54B8D8D0126B3696F8354--></OBUISEL_SELECTOR_FIELD>
 
+<!--9AB014C04115417395A89F1371848698--><OBUISEL_SELECTOR_FIELD>
+<!--9AB014C04115417395A89F1371848698-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[9AB014C04115417395A89F1371848698]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--9AB014C04115417395A89F1371848698-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--9AB014C04115417395A89F1371848698-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--9AB014C04115417395A89F1371848698-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--9AB014C04115417395A89F1371848698-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--9AB014C04115417395A89F1371848698-->  <NAME><![CDATA[PriceListVersionID]]></NAME>
+<!--9AB014C04115417395A89F1371848698-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--9AB014C04115417395A89F1371848698-->  <SORT><![CDATA[Y]]></SORT>
+<!--9AB014C04115417395A89F1371848698-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--9AB014C04115417395A89F1371848698-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--9AB014C04115417395A89F1371848698-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--9AB014C04115417395A89F1371848698-->  <SORTNO><![CDATA[100]]></SORTNO>
+<!--9AB014C04115417395A89F1371848698-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--9AB014C04115417395A89F1371848698-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--9AB014C04115417395A89F1371848698-->  <DEFAULT_EXPRESSION><![CDATA[OB.getFilterExpression('org.openbravo.erpCommon.info.PriceListVersionFilterExpression');]]></DEFAULT_EXPRESSION>
+<!--9AB014C04115417395A89F1371848698-->  <DISPLAY_EXPRESSION><![CDATA[priceListVersion]]></DISPLAY_EXPRESSION>
+<!--9AB014C04115417395A89F1371848698-->  <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID>
+<!--9AB014C04115417395A89F1371848698-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--9AB014C04115417395A89F1371848698--></OBUISEL_SELECTOR_FIELD>
+
 <!--9D9998D878F2442BB240A5872C8D6A8E--><OBUISEL_SELECTOR_FIELD>
 <!--9D9998D878F2442BB240A5872C8D6A8E-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[9D9998D878F2442BB240A5872C8D6A8E]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--9D9998D878F2442BB240A5872C8D6A8E-->  <OBUISEL_SELECTOR_ID><![CDATA[F132874BE0954A9B8C1301BE20704730]]></OBUISEL_SELECTOR_ID>
@@ -1275,6 +1426,28 @@
 <!--DCA048BA81224FFB95F8870E059DF69F-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--DCA048BA81224FFB95F8870E059DF69F--></OBUISEL_SELECTOR_FIELD>
 
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F--><OBUISEL_SELECTOR_FIELD>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[E2614E6C77B74F888D0D7C26DFAEDA1F]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <NAME><![CDATA[Currency]]></NAME>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SORT><![CDATA[Y]]></SORT>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <ISOUTFIELD><![CDATA[Y]]></ISOUTFIELD>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SUFFIX><![CDATA[_CURR]]></SUFFIX>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <DISPLAY_EXPRESSION><![CDATA[currency]]></DISPLAY_EXPRESSION>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <CLAUSE_LEFT_PART><![CDATA[c.id]]></CLAUSE_LEFT_PART>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--E2614E6C77B74F888D0D7C26DFAEDA1F--></OBUISEL_SELECTOR_FIELD>
+
 <!--E357F858B44C4203BFB7CF0B14B89626--><OBUISEL_SELECTOR_FIELD>
 <!--E357F858B44C4203BFB7CF0B14B89626-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[E357F858B44C4203BFB7CF0B14B89626]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--E357F858B44C4203BFB7CF0B14B89626-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
@@ -1363,6 +1536,26 @@
 <!--EB0A95320BF845DD8146274BE02DABBC-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--EB0A95320BF845DD8146274BE02DABBC--></OBUISEL_SELECTOR_FIELD>
 
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB--><OBUISEL_SELECTOR_FIELD>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[EDADAD64A1634FDEA50343CE1AAAF1FB]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <NAME><![CDATA[ProductID]]></NAME>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <SORT><![CDATA[Y]]></SORT>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <DISPLAY_EXPRESSION><![CDATA[id]]></DISPLAY_EXPRESSION>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--EDADAD64A1634FDEA50343CE1AAAF1FB--></OBUISEL_SELECTOR_FIELD>
+
 <!--F0DB30CF17844041AE30FF506441B1A9--><OBUISEL_SELECTOR_FIELD>
 <!--F0DB30CF17844041AE30FF506441B1A9-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[F0DB30CF17844041AE30FF506441B1A9]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--F0DB30CF17844041AE30FF506441B1A9-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
@@ -1427,6 +1620,27 @@
 <!--F91FD25B57A74BD587AEDB091A0FD53D-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
 <!--F91FD25B57A74BD587AEDB091A0FD53D--></OBUISEL_SELECTOR_FIELD>
 
+<!--F9AE747C37D1488C8683771629B6BD9E--><OBUISEL_SELECTOR_FIELD>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[F9AE747C37D1488C8683771629B6BD9E]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <NAME><![CDATA[Sales Price List]]></NAME>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <SORT><![CDATA[Y]]></SORT>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <SHOWINGRID><![CDATA[N]]></SHOWINGRID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <SORTNO><![CDATA[0]]></SORTNO>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <DISPLAY_EXPRESSION><![CDATA[salesPriceList]]></DISPLAY_EXPRESSION>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <CLAUSE_LEFT_PART><![CDATA[pp.salesPriceList]]></CLAUSE_LEFT_PART>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--F9AE747C37D1488C8683771629B6BD9E-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--F9AE747C37D1488C8683771629B6BD9E--></OBUISEL_SELECTOR_FIELD>
+
 <!--FB43216FCC1A473AA41E051E567D9490--><OBUISEL_SELECTOR_FIELD>
 <!--FB43216FCC1A473AA41E051E567D9490-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[FB43216FCC1A473AA41E051E567D9490]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--FB43216FCC1A473AA41E051E567D9490-->  <OBUISEL_SELECTOR_ID><![CDATA[F132874BE0954A9B8C1301BE20704730]]></OBUISEL_SELECTOR_ID>
@@ -1448,6 +1662,28 @@
 <!--FB43216FCC1A473AA41E051E567D9490-->  <SHOWINPICKLIST><![CDATA[Y]]></SHOWINPICKLIST>
 <!--FB43216FCC1A473AA41E051E567D9490--></OBUISEL_SELECTOR_FIELD>
 
+<!--FEC924F6B1894D2092859C85342FF705--><OBUISEL_SELECTOR_FIELD>
+<!--FEC924F6B1894D2092859C85342FF705-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[FEC924F6B1894D2092859C85342FF705]]></OBUISEL_SELECTOR_FIELD_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <OBUISEL_SELECTOR_ID><![CDATA[EB3C41F0973A4EDA91E475833792A6D4]]></OBUISEL_SELECTOR_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <NAME><![CDATA[Price List Version]]></NAME>
+<!--FEC924F6B1894D2092859C85342FF705-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
+<!--FEC924F6B1894D2092859C85342FF705-->  <SORT><![CDATA[Y]]></SORT>
+<!--FEC924F6B1894D2092859C85342FF705-->  <FILTER><![CDATA[Y]]></FILTER>
+<!--FEC924F6B1894D2092859C85342FF705-->  <SEARCHINSUGGESTIONBOX><![CDATA[N]]></SEARCHINSUGGESTIONBOX>
+<!--FEC924F6B1894D2092859C85342FF705-->  <SHOWINGRID><![CDATA[Y]]></SHOWINGRID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <SORTNO><![CDATA[55]]></SORTNO>
+<!--FEC924F6B1894D2092859C85342FF705-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--FEC924F6B1894D2092859C85342FF705-->  <ISOUTFIELD><![CDATA[N]]></ISOUTFIELD>
+<!--FEC924F6B1894D2092859C85342FF705-->  <DEFAULT_EXPRESSION><![CDATA[OB.getFilterExpression('org.openbravo.erpCommon.info.PriceListVersionFilterExpressionName');]]></DEFAULT_EXPRESSION>
+<!--FEC924F6B1894D2092859C85342FF705-->  <DISPLAY_EXPRESSION><![CDATA[priceListVersionName]]></DISPLAY_EXPRESSION>
+<!--FEC924F6B1894D2092859C85342FF705-->  <CLAUSE_LEFT_PART><![CDATA[plv.name]]></CLAUSE_LEFT_PART>
+<!--FEC924F6B1894D2092859C85342FF705-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--FEC924F6B1894D2092859C85342FF705-->  <SHOWINPICKLIST><![CDATA[N]]></SHOWINPICKLIST>
+<!--FEC924F6B1894D2092859C85342FF705--></OBUISEL_SELECTOR_FIELD>
+
 <!--FF8080812E77708D012E7796A94B0017--><OBUISEL_SELECTOR_FIELD>
 <!--FF8080812E77708D012E7796A94B0017-->  <OBUISEL_SELECTOR_FIELD_ID><![CDATA[FF8080812E77708D012E7796A94B0017]]></OBUISEL_SELECTOR_FIELD_ID>
 <!--FF8080812E77708D012E7796A94B0017-->  <OBUISEL_SELECTOR_ID><![CDATA[4C8BC3E8E56441F4B8C98C684A0C9212]]></OBUISEL_SELECTOR_ID>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionFilterExpressionName.java	Mon Sep 24 16:44:28 2012 +0200
@@ -0,0 +1,163 @@
+package org.openbravo.erpCommon.info;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.Map;
+import java.util.Set;
+
+import javax.servlet.http.HttpSession;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.time.DateUtils;
+import org.apache.log4j.Logger;
+import org.hibernate.criterion.Restrictions;
+import org.openbravo.client.application.FilterExpression;
+import org.openbravo.client.application.OBBindingsConstants;
+import org.openbravo.client.kernel.RequestContext;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBCriteria;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.dal.service.OBDao;
+import org.openbravo.model.common.enterprise.Organization;
+import org.openbravo.model.pricing.pricelist.PriceList;
+import org.openbravo.model.pricing.pricelist.PriceListVersion;
+
+public class PriceListVersionFilterExpressionName implements FilterExpression {
+  private Logger log = Logger.getLogger(PriceListVersionFilterExpressionName.class);
+  private Map<String, String> requestMap;
+  private HttpSession httpSession;
+  private String windowId;
+
+  @Override
+  public String getExpression(Map<String, String> _requestMap) {
+    requestMap = _requestMap;
+    httpSession = RequestContext.get().getSession();
+    windowId = requestMap.get(OBBindingsConstants.WINDOW_ID_PARAM);
+    final PriceList priceList = getPriceList();
+    if (priceList == null) {
+      log.warn("No PriceList found");
+      return "";
+    }
+    Date date = getDate();
+    PriceListVersion priceListVersion = getPriceListVersion(priceList, date);
+    if (priceListVersion != null) {
+      return priceListVersion.getName();
+    }
+    return "";
+  }
+
+  private PriceList getPriceList() {
+    PriceList priceList = null;
+    if (requestMap.containsKey("inpmPricelistId")) {
+      priceList = OBDal.getInstance().get(PriceList.class, requestMap.get("inpmPricelistId"));
+    }
+    if (priceList != null) {
+      return priceList;
+    }
+    String mPriceListId = (String) httpSession.getAttribute(windowId + "|" + "M_PRICELIST_ID");
+    if (StringUtils.isNotEmpty(mPriceListId)) {
+      priceList = OBDal.getInstance().get(PriceList.class, mPriceListId);
+      if (priceList != null) {
+        log.debug("Return priceList obtained from window's session: " + priceList.getIdentifier());
+        return priceList;
+      }
+    }
+    priceList = getDefaultPriceList(isSalesTransaction());
+    return priceList;
+  }
+
+  private PriceList getDefaultPriceList(boolean salesTransaction) {
+    final OBCriteria<PriceList> priceListCrit = OBDal.getInstance().createCriteria(PriceList.class);
+    priceListCrit.add(Restrictions.eq(PriceList.PROPERTY_SALESPRICELIST, salesTransaction));
+    priceListCrit.add(Restrictions.eq(PriceList.PROPERTY_DEFAULT, true));
+    String orgs = getOrgs();
+    if (StringUtils.isNotEmpty(orgs)) {
+      priceListCrit.add(Restrictions.in(PriceList.PROPERTY_ORGANIZATION,
+          OBDao.getOBObjectListFromString(Organization.class, orgs)));
+      priceListCrit.setFilterOnReadableOrganization(false);
+    }
+    if (priceListCrit.count() > 0) {
+      log.debug("Return client's default PriceList: " + priceListCrit.list().get(0).getIdentifier());
+      return priceListCrit.list().get(0);
+    }
+    return null;
+  }
+
+  private Date getDate() {
+    Date date = parseDate(requestMap.get("inpDate"));
+    if (date != null) {
+      log.debug("Return date ordered from request." + date.toString());
+      return date;
+    }
+    date = parseDate((String) httpSession.getAttribute(windowId + "|" + "DATEORDERED"));
+    if (date != null) {
+      log.debug("Return date ordered from window's session: " + date.toString());
+      return date;
+    }
+    date = parseDate((String) httpSession.getAttribute(windowId + "|" + "DATEINVOICED"));
+    if (date != null) {
+      log.debug("Return date invoiced from window's session: " + date.toString());
+      return date;
+    }
+    return DateUtils.truncate(new Date(), Calendar.DATE);
+  }
+
+  private PriceListVersion getPriceListVersion(PriceList priceList, Date date) {
+    OBCriteria<PriceListVersion> plVersionCrit = OBDal.getInstance().createCriteria(
+        PriceListVersion.class);
+    plVersionCrit.add(Restrictions.eq(PriceListVersion.PROPERTY_PRICELIST, priceList));
+    plVersionCrit.add(Restrictions.le(PriceListVersion.PROPERTY_VALIDFROMDATE, date));
+    if (plVersionCrit.count() > 0) {
+      plVersionCrit.addOrderBy(PriceListVersion.PROPERTY_VALIDFROMDATE, false);
+      return plVersionCrit.list().get(0);
+    }
+    return null;
+  }
+
+  private boolean isSalesTransaction() {
+    if (requestMap.get(OBBindingsConstants.SO_TRX_PARAM) == null) {
+      return true;
+    }
+    return "Y".equalsIgnoreCase(requestMap.get(OBBindingsConstants.SO_TRX_PARAM));
+  }
+
+  private Date parseDate(String date) {
+    if (StringUtils.isEmpty(date) || date.equals("null")) {
+      return null;
+    }
+    final SimpleDateFormat dateFormat = new SimpleDateFormat(
+        (String) httpSession.getAttribute("#AD_JAVADATEFORMAT"));
+    try {
+      Date result = dateFormat.parse(date);
+      return result;
+    } catch (Exception e) {
+      log.error("Error parsing string date " + date + " with format: " + dateFormat, e);
+    }
+    return null;
+  }
+
+  private String getOrgs() {
+    StringBuffer orgPart = new StringBuffer();
+    if (requestMap.containsKey("inpadOrgId")) {
+      String orgId = requestMap.get("inpadOrgId");
+
+      if (StringUtils.isNotEmpty(orgId)) {
+        final Set<String> orgSet = OBContext.getOBContext().getOrganizationStructureProvider()
+            .getNaturalTree(orgId);
+        if (orgSet.size() > 0) {
+          boolean addComma = false;
+          for (String org : orgSet) {
+            if (addComma) {
+              orgPart.append(",");
+            }
+            orgPart.append("'" + org + "'");
+            addComma = true;
+          }
+        }
+      }
+    }
+    return orgPart.toString();
+  }
+
+}