details:   https://code.openbravo.com/erp/stable/2.50/rev/6343ecfcca6f
changeset: 9888:6343ecfcca6f
user:      Javier Etxarri <javier.echarri <at> openbravo.com>
date:      Wed Aug 22 13:32:59 2012 +0200
summary:   Fixes issue 21416: Is impossible to execute Information/product

diffstat:

 src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql |  9 ++++-----
 src/org/openbravo/erpCommon/info/Product.java                    |  7 ++++---
 2 files changed, 8 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 1506f11efe15 -r 6343ecfcca6f 
src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql
--- a/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql  Thu Aug 
09 18:45:57 2012 +0000
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql  Wed Aug 
22 13:32:59 2012 +0200
@@ -34,15 +34,14 @@
         AND p.C_Currency_ID=c.C_Currency_ID 
         AND M_PriceList_Version.IsActive='Y' 
         AND M_PriceList_Version.AD_Client_ID IN ('1') 
-        AND p.ad_org_id IN 
-        AND p.issopricelist = ?
+        AND 1=1 
+        AND 2=2
         ORDER BY M_PriceList_Version.Name
       ]]></Sql>
       <Parameter name="priceList" optional="true" after="AND 
M_PriceList_Version.IsActive='Y' " text="AND EXISTS (SELECT * FROM M_PriceList 
xp WHERE xp.M_PriceList_ID= ? AND p.C_Currency_ID=xp.C_Currency_ID)"/>
       <Parameter name="adUserClient" type="replace" optional="true" 
after="M_PriceList_Version.AD_Client_ID IN (" text="'1'"/>
-      <Parameter name="organizations" optional="true" after="AND p.ad_org_id 
IN " text="(select ad_org_id from AD_ORG O where ad_isorgincluded(?, 
o.ad_org_id, ?) != -1)"/>
-      <Parameter name="client_id"/>
-      <Parameter name="isSales"/> 
+      <Parameter name="organizations" optional="true" after="AND 1=1" text=" 
AND p.ad_org_id IN (select ad_org_id from AD_ORG O where ad_isorgincluded(?, 
o.ad_org_id, M_PriceList_Version.AD_Client_ID) != -1)"/>
+      <Parameter name="isSales" optional="true" after="AND 2=2" text=" AND 
p.issopricelist = ?"/> 
    </SqlMethod>
 
    <SqlMethod name="selectActual" type="preparedStatement" return="multiple">
diff -r 1506f11efe15 -r 6343ecfcca6f 
src/org/openbravo/erpCommon/info/Product.java
--- a/src/org/openbravo/erpCommon/info/Product.java     Thu Aug 09 18:45:57 
2012 +0000
+++ b/src/org/openbravo/erpCommon/info/Product.java     Wed Aug 22 13:32:59 
2012 +0200
@@ -263,11 +263,12 @@
     xmlDocument.setParameter("grid_SortDirs", "ASC");
     xmlDocument.setParameter("grid_Default", "0");
 
-    xmlDocument.setData("structure1", WarehouseComboData.select(this, 
vars.getRole(), vars
-        .getClient()));
+    xmlDocument.setData("structure1",
+        WarehouseComboData.select(this, vars.getRole(), vars.getClient()));
 
     xmlDocument.setData("structure2", PriceListVersionComboData.select(this, 
strPriceList, Utility
-        .getContext(this, vars, "#User_Client", "Product"), strOrg, 
vars.getClient(), isSales));
+        .getContext(this, vars, "#User_Client", "Product"), "".equals(strOrg) 
? null : strOrg, ""
+        .equals(isSales) ? null : isSales));
 
     response.setContentType("text/html; charset=UTF-8");
     PrintWriter out = response.getWriter();

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to