details:   https://code.openbravo.com/erp/devel/pi/rev/ea9223718539
changeset: 15874:ea9223718539
user:      Rafa de Miguel <rafael.demiguel <at> openbravo.com>
date:      Thu Mar 22 13:11:55 2012 +0100
summary:   Fixed bug 0019508: Wrong create product copy in process plan

details:   https://code.openbravo.com/erp/devel/pi/rev/18965fb2f4c0
changeset: 15875:18965fb2f4c0
user:      Rafa de Miguel <rafael.demiguel <at> openbravo.com>
date:      Thu Mar 22 14:00:11 2012 +0100
summary:   Fixed bug 0020084: Product Copy in Process Plan copy the UPC/EAN

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/SequenceProductCreate.java |  8 
++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (32 lines):

diff -r 2461ef609ca4 -r 18965fb2f4c0 
src/org/openbravo/erpCommon/ad_actionButton/SequenceProductCreate.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/SequenceProductCreate.java    
Thu Mar 22 12:08:08 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/SequenceProductCreate.java    
Thu Mar 22 14:00:11 2012 +0100
@@ -69,6 +69,7 @@
       // Modifies values
       newProduct.setSearchKey(value);
       newProduct.setName(name);
+      newProduct.setUPCEAN(null);
 
       // Delete the ProcessPlan for new product
       newProduct.setProcessPlan(null);
@@ -77,6 +78,9 @@
       newProduct.setProductAccountsList(null);
       newProduct.setProductTrlList(null);
 
+      // Delete Purchasing Tab
+      newProduct.setApprovedVendorList(null);
+
       // Product Category
       ProductCategory pcategory = 
OBDal.getInstance().get(ProductCategory.class, productCategoryId);
       if (pcategory != null)
@@ -189,8 +193,8 @@
         + SequenceId + "'";
     Query q = OBDal.getInstance().getSession().createQuery(hql);
     try {
-      String result = (String) q.uniqueResult();
-      return result == null ? 0L : new Long(result);
+      Long result = (Long) q.uniqueResult();
+      return result == null ? 0L : result;
     } catch (Exception e) {
       // Unique result throws exception if more than one line is returned.
       return 0L;

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to