details: https://code.openbravo.com/erp/devel/pi/rev/99c58f9b3fe1 changeset: 21985:99c58f9b3fe1 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Feb 05 15:11:08 2014 +0530 summary: Fixes Issue 25445 Error when using Manage Variants under some circumstances
details: https://code.openbravo.com/erp/devel/pi/rev/9da401159803 changeset: 21986:9da401159803 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Tue Feb 04 14:58:17 2014 +0530 summary: Fixes Issue 25114 RequisitionToOrder maintains order of requisition lines details: https://code.openbravo.com/erp/devel/pi/rev/c32dee722007 changeset: 21987:c32dee722007 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Mon Feb 10 18:05:01 2014 +0530 summary: Fixes Issue 25262: Account filter in trial balance is not working as expected details: https://code.openbravo.com/erp/devel/pi/rev/083d67ea235a changeset: 21988:083d67ea235a user: Atul Gaware <atul.gaware <at> openbravo.com> date: Wed Feb 12 23:36:09 2014 +0530 summary: Fixes Issue 25587 PendingGoodsReceipt fails if warehouse is not set in OrgWH tab diffstat: src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java | 5 +- src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql | 21 +++++- src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.html | 6 +- src/org/openbravo/erpCommon/info/AccountElementValue.java | 4 +- src/org/openbravo/event/ProductEventHandler.java | 33 +++++++++- 5 files changed, 58 insertions(+), 11 deletions(-) diffs (179 lines): diff -r 9d50bf45a6c9 -r 083d67ea235a src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java --- a/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java Wed Feb 12 18:42:08 2014 +0100 +++ b/src/org/openbravo/erpCommon/ad_forms/MaterialReceiptPending.java Wed Feb 12 23:36:09 2014 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2013 Openbravo SLU + * All portions are Copyright (C) 2001-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -302,7 +302,8 @@ continue; } } - if (!warehouseBelongsToOrg) { + String strIsSoTrx = vars.getSessionValue("isSOTrx"); + if (!warehouseBelongsToOrg && ("Y").equals(strIsSoTrx)) { OrderLine ol = OBDal.getInstance().get(OrderLine.class, strOrderlineId); myMessage.setType("Error"); myMessage.setTitle(Utility.messageBD(this, "Error", vars.getLanguage())); diff -r 9d50bf45a6c9 -r 083d67ea235a src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql --- a/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql Wed Feb 12 18:42:08 2014 +0100 +++ b/src/org/openbravo/erpCommon/ad_forms/RequisitionToOrder_data.xsql Wed Feb 12 23:36:09 2014 +0530 @@ -12,7 +12,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2008-2012 Openbravo SLU + * All portions are Copyright (C) 2008-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -68,7 +68,11 @@ AND M_REQUISITION.AD_CLIENT_ID IN ('1') AND M_REQUISITIONLINE.AD_ORG_ID IN ('1') AND 1=1 - ORDER BY M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID + GROUP BY M_REQUISITIONLINE.M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.QTY, M_REQUISITIONLINE.ORDEREDQTY, + QUANTITYORDER, C_UOM1.NAME, C_UOM.NAME, pl.istaxincluded, M_REQUISITIONLINE.GROSS_UNIT_PRICE, M_REQUISITIONLINE.PRICEACTUAL, + M_REQUISITIONLINE.C_BPARTNER_ID, M_REQUISITION.C_BPARTNER_ID, M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITION.M_PRICELIST_ID, + M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID, M_REQUISITION.AD_USER_ID + ORDER BY MIN(M_REQUISITIONLINE.LINE), M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID ]]></Sql> <Field name="rownum" value="count"/> <Parameter name="language"/> @@ -113,7 +117,12 @@ AND M_REQUISITIONLINE.LOCKDATE >= (now()-3) AND M_REQUISITION.AD_CLIENT_ID IN ('1') AND M_REQUISITIONLINE.AD_ORG_ID IN ('1') - ORDER BY VENDOR_ID, M_PRICELIST_ID + GROUP BY M_REQUISITIONLINE.M_REQUISITIONLINE_ID, M_REQUISITIONLINE.NEEDBYDATE, M_REQUISITIONLINE.QTY, + M_REQUISITIONLINE.ORDEREDQTY, M_REQUISITIONLINE.PRICELIST, C_UOM1.NAME, C_UOM.NAME, PL.ISTAXINCLUDED, + M_REQUISITION.C_BPARTNER_ID, M_REQUISITION.M_PRICELIST_ID, LOCKQTY, QUANTITYORDER, LOCKPRICE, + M_REQUISITIONLINE.GROSS_UNIT_PRICE, M_REQUISITIONLINE.PRICEACTUAL, M_REQUISITIONLINE.C_BPARTNER_ID, + M_REQUISITIONLINE.M_PRICELIST_ID, M_REQUISITIONLINE.M_PRODUCT_ID, M_REQUISITIONLINE.M_ATTRIBUTESETINSTANCE_ID + ORDER BY MIN(M_REQUISITIONLINE.LINE), VENDOR_ID, M_PRICELIST_ID ]]></Sql> <Field name="rownum" value="count"/> <Parameter name="language"/> @@ -155,7 +164,11 @@ LEFT JOIN m_pricelist_version on M_PRODUCTPRICE.M_PRICELIST_VERSION_ID = m_pricelist_version.M_PRICELIST_VERSION_ID LEFT JOIN m_pricelist on m_pricelist_version.m_pricelist_id = m_pricelist.m_pricelist_id WHERE 1=1 - ORDER BY M_REQUISITIONLINE.M_PRODUCT_ID, M_ATTRIBUTESETINSTANCE_ID, SUPPLIERNOTES, + GROUP BY M_REQUISITIONLINE.M_PRODUCT_ID, M_ATTRIBUTESETINSTANCE_ID, LOCKQTY, M_REQUISITIONLINE.DESCRIPTION, C_UOM_ID, QUANTITYORDER, + M_PRODUCT_UOM_ID, M_REQUISITIONLINE_ID, M_PRODUCTPRICE.PRICELIST, M_REQUISITIONLINE.PRICELIST, LOCKPRICE, + M_PRODUCTPRICE.PRICELIMIT, M_PRODUCTPRICE.PRICESTD, M_Pricelist.istaxincluded, M_REQUISITIONLINE.needbydate, + M_REQUISITIONLINE.QTY, M_REQUISITIONLINE.ORDEREDQTY, SUPPLIERNOTES + ORDER BY MIN(M_REQUISITIONLINE.LINE), M_REQUISITIONLINE.M_PRODUCT_ID, M_ATTRIBUTESETINSTANCE_ID, SUPPLIERNOTES, ROUND(COALESCE(LOCKPRICE, M_PRODUCTPRICE.PRICESTD),(SELECT PRICEPRECISION FROM C_CURRENCY WHERE C_CURRENCY_ID = ?)) ]]></Sql> <Field name="rownum" value="count"/> diff -r 9d50bf45a6c9 -r 083d67ea235a src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.html --- a/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.html Wed Feb 12 18:42:08 2014 +0100 +++ b/src/org/openbravo/erpCommon/ad_reports/ReportTrialBalance.html Wed Feb 12 23:36:09 2014 +0530 @@ -13,7 +13,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2001-2013 Openbravo SLU + * All portions are Copyright (C) 2001-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -89,8 +89,8 @@ function onloadFunctions() { displayLogic(); - keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/AccountElementValue.html', 'SELECTOR_ACCOUNTELEMENTVALUE', false, 'frmMain', 'inpcElementValueIdFrom', 'inpElementValueIdFrom_DES', document.frmMain.inpElementValueIdFrom_DES.value, 'Command', 'KEY');", "inpElementValueIdFrom_DES", "null"); - keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/AccountElementValue.html', 'SELECTOR_ACCOUNTELEMENTVALUE', false, 'frmMain', 'inpcElementValueIdTo', 'inpElementValueIdTo_DES', document.frmMain.inpElementValueIdTo_DES.value, 'Command', 'KEY');", "inpElementValueIdTo_DES", "null"); + keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/AccountElementValue.html', 'SELECTOR_ACCOUNTELEMENTVALUE', false, 'frmMain', 'inpcElementValueIdFrom', 'inpElementValueIdFrom_DES', document.frmMain.inpElementValueIdFrom_DES.value, 'inpcAcctSchemaId', document.frmMain.inpcAcctSchemaId.value, 'Command', 'KEY');", "inpElementValueIdFrom_DES", "null"); + keyArray[keyArray.length] = new keyArrayItem("ENTER", "openSearch(null, null, '../info/AccountElementValue.html', 'SELECTOR_ACCOUNTELEMENTVALUE', false, 'frmMain', 'inpcElementValueIdTo', 'inpElementValueIdTo_DES', document.frmMain.inpElementValueIdTo_DES.value, 'inpcAcctSchemaId', document.frmMain.inpcAcctSchemaId.value, 'Command', 'KEY');", "inpElementValueIdTo_DES", "null"); } function validate() { diff -r 9d50bf45a6c9 -r 083d67ea235a src/org/openbravo/erpCommon/info/AccountElementValue.java --- a/src/org/openbravo/erpCommon/info/AccountElementValue.java Wed Feb 12 18:42:08 2014 +0100 +++ b/src/org/openbravo/erpCommon/info/AccountElementValue.java Wed Feb 12 23:36:09 2014 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2009-2011 Openbravo SLU + * All portions are Copyright (C) 2009-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -113,6 +113,8 @@ if (strAcctSchema.equals("")) { strAcctSchema = Utility.getContext(this, vars, "$C_AcctSchema_ID", "AccountElementValue"); vars.setSessionValue("AccountElementValue.cAcctschemaId", strAcctSchema); + } else { + vars.setSessionValue("$C_AcctSchema_ID", strAcctSchema); } vars.removeSessionValue("AccountElementValue.name"); vars.setSessionValue("AccountElementValue.value", strKeyValue + "%"); diff -r 9d50bf45a6c9 -r 083d67ea235a src/org/openbravo/event/ProductEventHandler.java --- a/src/org/openbravo/event/ProductEventHandler.java Wed Feb 12 18:42:08 2014 +0100 +++ b/src/org/openbravo/event/ProductEventHandler.java Wed Feb 12 23:36:09 2014 +0530 @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2013 Openbravo SLU + * All portions are Copyright (C) 2013-2014 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************* @@ -25,10 +25,15 @@ import org.openbravo.base.model.Entity; import org.openbravo.base.model.ModelProvider; import org.openbravo.base.model.Property; +import org.openbravo.base.provider.OBProvider; import org.openbravo.client.kernel.event.EntityPersistenceEventObserver; import org.openbravo.client.kernel.event.EntityUpdateEvent; +import org.openbravo.dal.service.OBDal; import org.openbravo.erpCommon.utility.OBMessageUtils; +import org.openbravo.model.common.plm.CharacteristicValue; import org.openbravo.model.common.plm.Product; +import org.openbravo.model.common.plm.ProductCharacteristic; +import org.openbravo.model.common.plm.ProductCharacteristicConf; public class ProductEventHandler extends EntityPersistenceEventObserver { private static Entity[] entities = { ModelProvider.getInstance().getEntity(Product.ENTITY_NAME) }; @@ -55,5 +60,31 @@ } } + if (newGeneric == true && oldGeneric == false) { + // check that whether the there are characteristic already define + final Product product = (Product) event.getTargetInstance(); + if (!product.getProductCharacteristicList().isEmpty()) { + for (ProductCharacteristic productCh : product.getProductCharacteristicList()) { + if (productCh.getProductCharacteristicConfList().isEmpty() + && productCh.getCharacteristicSubset() == null && productCh.isVariant()) { + // Create configuration based on Characteristic Values. + for (CharacteristicValue chValue : productCh.getCharacteristic() + .getCharacteristicValueList()) { + if (!chValue.isSummaryLevel()) { + ProductCharacteristicConf charConf = OBProvider.getInstance().get( + ProductCharacteristicConf.class); + charConf.setCharacteristicOfProduct(productCh); + charConf.setOrganization(productCh.getOrganization()); + charConf.setCharacteristicValue(chValue); + charConf.setCode(chValue.getCode()); + OBDal.getInstance().save(charConf); + } + } + } + // Subset Value cannot be set unless Generic Flag = Yes. + // so Create configuration based on Characteristic Subset Values is skipped + } + } + } } } \ No newline at end of file ------------------------------------------------------------------------------ Android apps run on BlackBerry 10 Introducing the new BlackBerry 10.2.1 Runtime for Android apps. Now with support for Jelly Bean, Bluetooth, Mapview and more. Get your Android app in front of a whole new audience. Start now. http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits