details: https://code.openbravo.com/erp/stable/2.50/rev/84ea12989539
changeset: 9648:84ea12989539
user: Javier Etxarri <javier.echarri <at> openbravo.com>
date: Fri Sep 02 12:10:51 2011 +0200
summary: Fixes issue 18281: The Product selector does not filter the price
list version properly
diffstat:
src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql | 3 +++
src/org/openbravo/erpCommon/info/Product.java | 9 +++++----
2 files changed, 8 insertions(+), 4 deletions(-)
diffs (59 lines):
diff -r 4a0016445109 -r 84ea12989539
src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql
--- a/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql Thu Sep
01 16:53:00 2011 +0200
+++ b/src/org/openbravo/erpCommon/info/PriceListVersionCombo_data.xsql Fri Sep
02 12:10:51 2011 +0200
@@ -34,10 +34,13 @@
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
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"/>
</SqlMethod>
<SqlMethod name="selectActual" type="preparedStatement" return="multiple">
diff -r 4a0016445109 -r 84ea12989539
src/org/openbravo/erpCommon/info/Product.java
--- a/src/org/openbravo/erpCommon/info/Product.java Thu Sep 01 16:53:00
2011 +0200
+++ b/src/org/openbravo/erpCommon/info/Product.java Fri Sep 02 12:10:51
2011 +0200
@@ -103,9 +103,10 @@
String strPriceListVersion = getPriceListVersion(vars, strPriceList,
strDate);
vars.setSessionValue("Product.priceListVersion", strPriceListVersion);
+ String strOrg = vars.getGlobalVariable("inpAD_Org_ID",
"Product.adorgid", "");
printPage(response, vars, "", strNameValue, strWarehouse, strPriceList,
strPriceListVersion,
- windowId, "paramName");
+ windowId, "paramName", strOrg);
} else if (vars.commandIn("KEY")) {
removePageSessionVariables(vars);
String strKeyValue = vars.getRequestGlobalVariable("inpNameValue",
"Product.key");
@@ -172,7 +173,7 @@
printPageKey(response, vars, data, strWarehouse, strPriceListVersion);
else
printPage(response, vars, strKeyValue, "", strWarehouse, strPriceList,
strPriceListVersion,
- windowId, "paramKey");
+ windowId, "paramKey", strOrg);
} else if (vars.commandIn("STRUCTURE")) {
printGridStructure(response, vars);
} else if (vars.commandIn("DATA")) {
@@ -226,7 +227,7 @@
private void printPage(HttpServletResponse response, VariablesSecureApp
vars, String strKeyValue,
String strNameValue, String strWarehouse, String strPriceList, String
strPriceListVersion,
- String windowId, String focusedId) throws IOException, ServletException {
+ String windowId, String focusedId, String strOrg) throws IOException,
ServletException {
if (log4j.isDebugEnabled())
log4j.debug("Output: Frame 1 of the products seeker");
String[] discard = new String[1];
@@ -262,7 +263,7 @@
.getClient()));
xmlDocument.setData("structure2", PriceListVersionComboData.select(this,
strPriceList, Utility
- .getContext(this, vars, "#User_Client", "Product")));
+ .getContext(this, vars, "#User_Client", "Product"), strOrg,
vars.getClient()));
response.setContentType("text/html; charset=UTF-8");
PrintWriter out = response.getWriter();
------------------------------------------------------------------------------
Special Offer -- Download ArcSight Logger for FREE!
Finally, a world-class log management solution at an even better
price-free! And you'll get a free "Love Thy Logs" t-shirt when you
download Logger. Secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsisghtdev2dev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits