details:   https://code.openbravo.com/erp/devel/pi/rev/326f3d73a55e
changeset: 34298:326f3d73a55e
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Fri Jul 13 23:50:48 2018 +0530
summary:   Fixes Issue 38858:Cannot process a Landed Cost if the role
does not have access to Cost Adjustment window

** use flush() in processLandedCost before restoring from
admin mode so that cost adjustment created in the process
is saved in database properly using admin mode, it also
saved Updated landed cost object to database.

diffstat:

 src/org/openbravo/costing/LandedCostProcess.java |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (20 lines):

diff -r fea1e9c8b23e -r 326f3d73a55e 
src/org/openbravo/costing/LandedCostProcess.java
--- a/src/org/openbravo/costing/LandedCostProcess.java  Thu Jul 12 10:14:48 
2018 +0000
+++ b/src/org/openbravo/costing/LandedCostProcess.java  Fri Jul 13 23:50:48 
2018 +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) 2014-2017 Openbravo SLU
+ * All portions are Copyright (C) 2014-2018 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  *************************************************************************
@@ -114,6 +114,7 @@
       landedCost.setDocumentStatus("CO");
       landedCost.setProcessed(Boolean.TRUE);
       OBDal.getInstance().save(landedCost);
+      OBDal.getInstance().flush();
     } catch (JSONException ignore) {
     } finally {
       OBContext.restorePreviousMode();

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Openbravo-commits mailing list
Openbravo-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to