details:   https://code.openbravo.com/erp/devel/pi/rev/7bdc07f52133
changeset: 34469:7bdc07f52133
user:      Atul Gaware <atul.gaware <at> openbravo.com>
date:      Mon Jul 16 12:38:57 2018 +0530
summary:   Fixes Issue 0038867:Cannot process a Landed Cost if the role does 
not have
access to the organization of a transaction that needs to be adjusted

In method generateTransactionCosts of Cost Adjustment Process,
use Admin mode with client org check flag as false.

diffstat:

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

diffs (19 lines):

diff -r 4e896f3e4b17 -r 7bdc07f52133 
src/org/openbravo/costing/CostAdjustmentProcess.java
--- a/src/org/openbravo/costing/CostAdjustmentProcess.java      Wed Jul 18 
23:32:49 2018 -0400
+++ b/src/org/openbravo/costing/CostAdjustmentProcess.java      Mon Jul 16 
12:38:57 2018 +0530
@@ -271,6 +271,7 @@
     ScrollableResults lines = critLines.scroll(ScrollMode.FORWARD_ONLY);
 
     try {
+      OBContext.setAdminMode(false);
       while (lines.next()) {
         CostAdjustmentLine line = (CostAdjustmentLine) lines.get(0);
         if (!line.getTransactionCostList().isEmpty()) {
@@ -303,6 +304,7 @@
       }
     } finally {
       lines.close();
+      OBContext.restorePreviousMode();
     }
     OBDal.getInstance().flush();
     OBDal.getInstance().getSession().clear();

------------------------------------------------------------------------------
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