details: https://code.openbravo.com/erp/devel/pi/rev/a5cfb741acf8
changeset: 22820:a5cfb741acf8
user: Guillermo Gil <guillermo.gil <at> openbravo.com>
date: Wed Apr 02 16:30:46 2014 +0200
summary: Fixed issue 25853: Broken entries added to Recent documents
A non saved row should not be added to recent documents
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
| 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diffs (24 lines):
diff -r 0a17f1fe4f0c -r a5cfb741acf8
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
---
a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Wed Apr 02 17:57:02 2014 +0530
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/ob-view-form.js
Wed Apr 02 16:30:46 2014 +0200
@@ -244,7 +244,8 @@
// focus is done automatically, prevent the focus event if needed
// the focus event will set the active view
- if (!isNew) {
+ // A non saved row should not be added to recent documents
+ if (!isNew && !this.isNotSaved()) {
// If editing a document set to recent documents
this.view.setRecentDocument(this.getValues());
}
@@ -260,6 +261,10 @@
}
},
+ isNotSaved: function () {
+ return this.getValues().id.startsWith('_');
+ },
+
editNewRecord: function (preventFocus) {
this.clearValues();
var ret = this.Super('editNewRecord', arguments);
------------------------------------------------------------------------------
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits