details:   /erp/devel/pi/rev/a8d8d76948f2
changeset: 11515:a8d8d76948f2
user:      Asier Lostalé <asier.lostale <at> openbravo.com>
date:      Wed Apr 06 09:13:25 2011 +0200
summary:   fixed bug 16662: Form view does no longer work when clicking new

diffstat:

 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
 |  30 ++++-----
 1 files changed, 14 insertions(+), 16 deletions(-)

diffs (42 lines):

diff -r fb419ee4f3f1 -r a8d8d76948f2 
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
--- 
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
    Tue Apr 05 20:08:45 2011 +0200
+++ 
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-view-form-notes.js
    Wed Apr 06 09:13:25 2011 +0200
@@ -237,24 +237,22 @@
                                                                }
 
                                                                var view = 
this.layout.getForm().view;
+                if (view && view.viewGrid.getSelectedRecord()) {
+                  criteria.criteria.push( {
+                    fieldName : 'table',
+                    operator : 'equals',
+                    value : view.standardProperties.inpTableId
+                   });
 
-                                                               
criteria.criteria.push( {
-                                                                       
fieldName : 'table',
-                                                                       
operator : 'equals',
-                                                                       value : 
view.standardProperties.inpTableId
-                                                               });
+                  criteria.criteria.push( {
+                    fieldName : 'record',
+                    operator : 'equals',
+                    value : view.viewGrid.getSelectedRecord().id
+                  });
 
-                                                               
criteria.criteria
-                                                                               
.push( {
-                                                                               
        fieldName : 'record',
-                                                                               
        operator : 'equals',
-                                                                               
        value : view.viewGrid
-                                                                               
                        .getSelectedRecord().id
-                                                                               
});
-
-                                                               
criteria[OB.Constants.ORDERBY_PARAMETER] = 'updated desc';
-
-                                                               return criteria;
+                  criteria[OB.Constants.ORDERBY_PARAMETER] = 'updated desc';
+                }
+                return criteria;
 
                                                        },
 

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to