details: /erp/devel/pi/rev/30abdcb31368
changeset: 11526:30abdcb31368
user: Martin Taal <martin.taal <at> openbravo.com>
date: Thu Apr 07 10:53:51 2011 +0200
summary: Fixes issue 16581: On alert management, when a record is edited it
automatically appear the record in all the grids
diffstat:
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/templates/datasource.ftl
| 3 +++
modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
| 5 +++++
2 files changed, 8 insertions(+), 0 deletions(-)
diffs (28 lines):
diff -r 3d1ee3ff4716 -r 30abdcb31368
modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/templates/datasource.ftl
---
a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/templates/datasource.ftl
Thu Apr 07 09:46:54 2011 +0200
+++
b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/templates/datasource.ftl
Thu Apr 07 10:53:51 2011 +0200
@@ -39,6 +39,9 @@
<#if data.getParameter("_onlyGenerateCreateStatement") == "" ||
data.getParameter("_create") != "">
ID:'${data.id}',
</#if>
+<#if data.getParameter("_new") != "">
+ _new: true,
+</#if>
titleField: OB.Constants.IDENTIFIER
, dataURL:'${data.dataUrl?js_string}${data.name?js_string}'
, recordXPath: '/response/data', dataFormat: 'json'
diff -r 3d1ee3ff4716 -r 30abdcb31368
modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
---
a/modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
Thu Apr 07 09:46:54 2011 +0200
+++
b/modules/org.openbravo.service.datasource/web/org.openbravo.service.datasource/js/ob-datasource-utilities.js
Thu Apr 07 10:53:51 2011 +0200
@@ -108,6 +108,11 @@
// * {{{dsProperties}}}: the properties of the datasource which needs to be
// created.
OB.Datasource.create = function(/* Object */dsProperties) {
+ // if must be a new datasource then change the id
+ // https://issues.openbravo.com/view.php?id=16581
+ if (dsProperties._new && dsProperties.ID) {
+ dsProperties.ID = dsProperties.ID + '_' + new Date().getTime();
+ }
if (dsProperties.ID) {
var ds = isc.DataSource.getDataSource(dsProperties.ID);
if (ds) {
------------------------------------------------------------------------------
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