details: https://code.openbravo.com/erp/devel/main/rev/73971a64d21c changeset: 16279:73971a64d21c user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Wed May 02 13:25:44 2012 +0200 summary: Fixes issue 20168: It is possible select a products from price list with different currency to the header price list. The solution was wrong becasue exist one window 'MRP Forecast' where it does not exist the parameter inpCurrencyId
details: https://code.openbravo.com/erp/devel/main/rev/6be88b94fc06 changeset: 16280:6be88b94fc06 user: Javier Etxarri <javier.echarri <at> openbravo.com> date: Thu May 03 17:06:19 2012 +0200 summary: Fixes issue 20408: Manufacturing planning not work with product where safety stock is null or 0 details: https://code.openbravo.com/erp/devel/main/rev/9c32e9df4d80 changeset: 16281:9c32e9df4d80 user: Mikel Irurita <mikel.irurita <at> openbravo.com> date: Wed May 09 13:47:38 2012 +0200 summary: Related to issue 15092: hide * org in Payment execution window details: https://code.openbravo.com/erp/devel/main/rev/48e800f4341e changeset: 16282:48e800f4341e user: Antonio Moreno <antonio.moreno <at> openbravo.com> date: Fri May 04 12:31:22 2012 +0200 summary: Fixed issue 20413. Two changes have been made: - EmailServerConfiguration will be retrieved correctly. The client/org filter has been disabled, because background processes are executed with a 'system' context, and this caused the list of email servers to always be empty unless the configuration was on the 'system' client itself. - Also, the client will be picked from the alertrule instead of the first generated alert. This prevents strange problems when an alertrule generates alerts for different clients from happening. diffstat: modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java | 5 +++-- src-db/database/model/functions/MRP_RUN_INITIALIZE.xml | 5 +++-- src-db/database/sourcedata/OBUISEL_SELECTOR.xml | 2 +- src/org/openbravo/erpCommon/ad_process/AlertProcess.java | 8 ++++++-- src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql | 4 ++-- 5 files changed, 15 insertions(+), 9 deletions(-) diffs (95 lines): diff -r 7a9fe4909d68 -r 48e800f4341e modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java --- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java Mon May 14 05:38:23 2012 +0000 +++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/ad_forms/BatchPaymentExecution.java Fri May 04 12:31:22 2012 +0200 @@ -153,8 +153,9 @@ } try { ComboTableData comboTableData = new ComboTableData(vars, this, "TABLEDIR", "AD_Org_ID", "", - "", Utility.getContext(this, vars, "#User_Org", "BatchPaymentExecution"), - Utility.getContext(this, vars, "#User_Client", "BatchPaymentExecution"), 0); + "49DC1D6F086945AB82F84C66F5F13F16", Utility.getContext(this, vars, "#User_Org", + "BatchPaymentExecution"), Utility.getContext(this, vars, "#User_Client", + "BatchPaymentExecution"), 0); Utility.fillSQLParameters(this, vars, null, comboTableData, "PrintInvoices", ""); xmlDocument.setData("reportAD_ORGID", "liststructure", comboTableData.select(false)); comboTableData = null; diff -r 7a9fe4909d68 -r 48e800f4341e src-db/database/model/functions/MRP_RUN_INITIALIZE.xml --- a/src-db/database/model/functions/MRP_RUN_INITIALIZE.xml Mon May 14 05:38:23 2012 +0000 +++ b/src-db/database/model/functions/MRP_RUN_INITIALIZE.xml Fri May 04 12:31:22 2012 +0200 @@ -214,8 +214,9 @@ IF (v_Count = 0) THEN -- First time on this product v_ResultStr := 'Inserting stock lines product: ' || Cur_Product.M_Product_ID; - Mrp_Run_Insertlines(p_Client_ID, p_Org_ID, p_User_ID, p_Run, Cur_Product.M_Product_ID, (-1 * Cur_Product.STOCKMIN), 0, NULL, 'MS', 'Y', NULL, NULL, NULL, NULL, NULL, p_PlanningDate, NULL, p_Production, 'N', NULL, v_Aux_ID); - Mrp_Run_Insertlines(p_Client_ID, p_Org_ID, p_User_ID, p_Run, Cur_Product.M_Product_ID, v_QtyOnHand, 0, NULL, 'ST', 'Y', NULL, NULL, NULL, NULL, NULL, p_PlanningDate, NULL, p_Production, 'Y', NULL, v_Aux_ID); + + Mrp_Run_Insertlines(p_Client_ID, p_Org_ID, p_User_ID, p_Run, Cur_Product.M_Product_ID, (-1 * Cur_Product.STOCKMIN), 0, NULL, 'MS', 'Y', NULL, NULL, NULL, NULL, NULL, p_PlanningDate, NULL, p_Production, (CASE WHEN Cur_Product.STOCKMIN > 0 THEN 'N' ELSE 'Y' END), NULL, v_Aux_ID); + Mrp_Run_Insertlines(p_Client_ID, p_Org_ID, p_User_ID, p_Run, Cur_Product.M_Product_ID, v_QtyOnHand, 0, NULL, 'ST', 'Y', NULL, NULL, NULL, NULL, NULL, p_PlanningDate, NULL, p_Production, 'Y', NULL, v_Aux_ID); v_ResultStr := 'Inserting Order lines product: ' || Cur_Product.M_Product_ID; FOR Cur_OrderLine IN (SELECT Mrp_Check_Planningmethod(Cur_Product.MRP_PlanningMethod_ID, diff -r 7a9fe4909d68 -r 48e800f4341e src-db/database/sourcedata/OBUISEL_SELECTOR.xml --- a/src-db/database/sourcedata/OBUISEL_SELECTOR.xml Mon May 14 05:38:23 2012 +0000 +++ b/src-db/database/sourcedata/OBUISEL_SELECTOR.xml Fri May 04 12:31:22 2012 +0200 @@ -9,7 +9,7 @@ <!--2E64F551C7C4470C80C29DBA24B34A5F--> <AD_REFERENCE_ID><![CDATA[800060]]></AD_REFERENCE_ID> <!--2E64F551C7C4470C80C29DBA24B34A5F--> <AD_TABLE_ID><![CDATA[FF8080812DFFA1CF012DFFB889F40016]]></AD_TABLE_ID> <!--2E64F551C7C4470C80C29DBA24B34A5F--> <WHERECLAUSE><![CDATA[e.active='Y']]></WHERECLAUSE> -<!--2E64F551C7C4470C80C29DBA24B34A5F--> <FILTER_EXPRESSION><![CDATA[" e.productPrice.priceListVersion.priceList.salesPriceList = " + OB.isSalesTransaction() + " AND e.productPrice.priceListVersion.priceList.currency.id = '" + OB.getParameters().get('inpcCurrencyId') + "'"]]></FILTER_EXPRESSION> +<!--2E64F551C7C4470C80C29DBA24B34A5F--> <FILTER_EXPRESSION><![CDATA[if (OB.getParameters().get('inpcCurrencyId')){ " e.productPrice.priceListVersion.priceList.salesPriceList = " + OB.isSalesTransaction() + " AND e.productPrice.priceListVersion.priceList.currency.id = '" + OB.getParameters().get('inpcCurrencyId') + "'" }]]></FILTER_EXPRESSION> <!--2E64F551C7C4470C80C29DBA24B34A5F--> <OBCLKER_TEMPLATE_ID><![CDATA[9314DE8599AD44E7BFC4CC50699042AB]]></OBCLKER_TEMPLATE_ID> <!--2E64F551C7C4470C80C29DBA24B34A5F--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> <!--2E64F551C7C4470C80C29DBA24B34A5F--> <VALUEFIELD_ID><![CDATA[2CB91FE062B541ACB00D82AC69858446]]></VALUEFIELD_ID> diff -r 7a9fe4909d68 -r 48e800f4341e src/org/openbravo/erpCommon/ad_process/AlertProcess.java --- a/src/org/openbravo/erpCommon/ad_process/AlertProcess.java Mon May 14 05:38:23 2012 +0000 +++ b/src/org/openbravo/erpCommon/ad_process/AlertProcess.java Fri May 04 12:31:22 2012 +0200 @@ -140,8 +140,8 @@ // the 'Client' tab or in the 'Email Configuration' tab. // The SMTP server configured in 'Client' tab way is @Deprecated in 3.0 - final String adClientId = alert[0].adClientId; - final String adOrgId = alert[0].adOrgId; + final String adClientId = alertRule.adClientId; + final String adOrgId = alertRule.adOrgId; final String deprecatedMailHost = OBDal.getInstance().get(Client.class, adClientId) .getMailHost(); boolean isDeprecatedMode = false; @@ -162,6 +162,8 @@ .createCriteria(EmailServerConfiguration.class); mailConfigCriteria.add(Restrictions.eq(EmailServerConfiguration.PROPERTY_CLIENT, OBDal .getInstance().get(Client.class, adClientId))); + mailConfigCriteria.setFilterOnReadableClients(false); + mailConfigCriteria.setFilterOnReadableOrganization(false); final List<EmailServerConfiguration> mailConfigList = mailConfigCriteria.list(); if (mailConfigList.size() > 0) { @@ -194,6 +196,8 @@ .createCriteria(AlertRecipient.class); alertRecipientsCriteria.add(Restrictions.eq(AlertRecipient.PROPERTY_ALERTRULE, OBDal .getInstance().get(AlertRule.class, alertRule.adAlertruleId))); + alertRecipientsCriteria.setFilterOnReadableClients(false); + alertRecipientsCriteria.setFilterOnReadableOrganization(false); final List<AlertRecipient> alertRecipientsList = alertRecipientsCriteria.list(); diff -r 7a9fe4909d68 -r 48e800f4341e src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql --- a/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql Mon May 14 05:38:23 2012 +0000 +++ b/src/org/openbravo/erpCommon/ad_process/AlertProcess_data.xsql Fri May 04 12:31:22 2012 +0200 @@ -76,7 +76,7 @@ <SqlMethod name="selectSQL" type="preparedStatement" return="multiple"> <SqlMethodComment></SqlMethodComment> <Sql><![CDATA[ - SELECT AD_ALERTRULE_ID, SQL, NAME + SELECT AD_ALERTRULE_ID, SQL, NAME, AD_CLIENT_ID, AD_ORG_ID FROM AD_ALERTRULE WHERE ISACTIVE = 'Y' ]]></Sql> @@ -85,7 +85,7 @@ <SqlMethod name="selectSQL" type="preparedStatement" return="multiple"> <SqlMethodComment></SqlMethodComment> <Sql><![CDATA[ - SELECT AD_ALERTRULE_ID, SQL, NAME + SELECT AD_ALERTRULE_ID, SQL, NAME, AD_CLIENT_ID, AD_ORG_ID FROM AD_ALERTRULE WHERE ISACTIVE = 'Y' AND AD_CLIENT_ID = ? ------------------------------------------------------------------------------ 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 Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits