details:   https://code.openbravo.com/erp/devel/pi/rev/b419c66789ed
changeset: 25296:b419c66789ed
user:      Fernando Soto <fernando.soto <at> peoplewalking.com>
date:      Thu Nov 13 11:49:23 2014 -0500
summary:   Fixed bug 27758: Copy lines in SO dont work if the role dont have 
access to price list window

Changed CopyFromOrder class to set admin mode before fill the data.

details:   https://code.openbravo.com/erp/devel/pi/rev/798623d3e6e2
changeset: 25297:798623d3e6e2
user:      Pandeeswari Ramakrishnan <pandeeswari.ramakrishnan <at> 
openbravo.com>
date:      Thu Nov 20 15:42:54 2014 +0530
summary:   Related to Issue 27758: Copy lines in SO dont work if the role dont 
have access to price list window

diffstat:

 src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java |  17 ++++++++-
 1 files changed, 14 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r 257068376a8c -r 798623d3e6e2 
src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java
--- a/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java    Thu Nov 
20 09:58:51 2014 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CopyFromOrder.java    Thu Nov 
20 15:42:54 2014 +0530
@@ -67,8 +67,13 @@
       String strTabId = vars.getStringParameter("inpTabId");
       String strBpartner = vars.getStringParameter("inpcBpartnerId");
       String strmPricelistId = vars.getStringParameter("inpmPricelistId");
-      printPageDataSheet(response, vars, strKey, strWindowId, strTabId, 
strSOTrx, strBpartner,
-          strmPricelistId);
+      OBContext.setAdminMode();
+      try {
+        printPageDataSheet(response, vars, strKey, strWindowId, strTabId, 
strSOTrx, strBpartner,
+            strmPricelistId);
+      } finally {
+        OBContext.restorePreviousMode();
+      }
     } else if (vars.commandIn("SAVE")) {
       String strRownum = null;
       try {
@@ -83,7 +88,13 @@
         strRownum = strRownum.substring(1, strRownum.length() - 1);
       }
       strRownum = Replace.replace(strRownum, "'", "");
-      OBError myError = copyLines(vars, strRownum, strKey);
+      OBError myError = new OBError();
+      OBContext.setAdminMode();
+      try {
+        myError = copyLines(vars, strRownum, strKey);
+      } finally {
+        OBContext.restorePreviousMode();
+      }
 
       String strWindowPath = Utility.getTabURL(strTabId, "R", true);
       if (strWindowPath.equals(""))

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to