details:   https://code.openbravo.com/erp/devel/pi/rev/e3b446f2e3b0
changeset: 25735:e3b446f2e3b0
user:      Naroa Iriarte <naroa.iriarte <at> openbravo.com>
date:      Mon Jan 19 14:42:57 2015 +0100
summary:   Fixed issue 28623: Window's behaviour changes when creating a new 
record.

When a window is opened using the "quick create new" widget, the same window in 
the recent views layout
does not allow to create a new record (the green small button for creating a 
new record, which should be
by the window name, disappears).

The problem was in the "ob-utilities.js", inside the "{OB.Utilities.openView}" 
function, the logic for
setting the "singleRecord" value (this is the Edit Only attribute) was wrong. 
If the value of the
variable singleRecord of that function was undefined or null, as it was in the 
case of clicking the "quick create new"
widget, that value was set to true and the window became an "edit only" 
window.That was why the small
green "create new" icon disappeared from the recent views layout.

For fixing this the condition has been removed, so we know that the value of 
the variable "singleRecord" is not
going to be modified and it will be set correctly.

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
 |  13 +++------
 1 files changed, 4 insertions(+), 9 deletions(-)

diffs (50 lines):

diff -r 9c12d1443b20 -r e3b446f2e3b0 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
        Tue Jan 20 15:42:13 2015 +0100
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities.js
        Mon Jan 19 14:42:57 2015 +0100
@@ -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) 2011-2014 Openbravo SLU
+ * All portions are Copyright (C) 2011-2015 Openbravo SLU
  * All Rights Reserved.
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -424,18 +424,13 @@
 // Returns the object used to open the window.
 OB.Utilities.openView = function (windowId, tabId, tabTitle, recordId, 
command, icon, readOnly, singleRecord, direct, editOrDeleteOnly) {
   var isClassicEnvironment = OB.Utilities.useClassicMode(windowId),
-      openObject, isDirect = direct,
-      isSingleRecord;
+      openObject, isDirect = direct;
   if (recordId) {
     if (direct !== false) {
       isDirect = true;
     }
 
   }
-  if (singleRecord !== false) {
-    isSingleRecord = true;
-  }
-
   if (isClassicEnvironment) {
     if (recordId) {
       OB.Layout.ClassicOBCompatibility.openLinkedItem(tabId, recordId);
@@ -459,7 +454,7 @@
       tabTitle: tabTitle,
       windowId: windowId,
       readOnly: readOnly,
-      singleRecord: isSingleRecord,
+      singleRecord: singleRecord,
       editOrDeleteOnly: editOrDeleteOnly
     };
   } else {
@@ -471,7 +466,7 @@
       windowId: windowId,
       icon: icon,
       readOnly: readOnly,
-      singleRecord: isSingleRecord,
+      singleRecord: singleRecord,
       editOrDeleteOnly: editOrDeleteOnly
     };
   }

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to