FSN#37352 Appl beheer: UDR rapport eenvoudiger van test in productie brengen

svn path=/Website/trunk/; revision=32996
This commit is contained in:
Jos Groot Lipman
2017-03-01 10:40:54 +00:00
parent 00ce418444
commit 4854d4bf95
2 changed files with 5 additions and 4 deletions

View File

@@ -815,9 +815,10 @@ api2 = {
var incdata = jsondata[incname]; // Array zoals via API aangeleverd
for (var j=0; j<incdata.length; j++)
{
var inckey = incdata[j]["id"]; // Die moet er zijn
if (!inckey || inckey < 0 || params.isNew)
var inckey = incdata[j]["id"]; // Die kan er zijn
if (!(inckey > 0) || params.isNew)
{
delete incdata[j]["id"]; // voor als je bij isNew toch keys had meegegeven
incdata[j][inc.joinfield] = the_key; // de parent_key altijd zetten
__Log("Nu ga ik een '{0}' toevoegen".format(incname));
incmodel.REST_POST(params, incdata[j], the_key);

View File

@@ -413,7 +413,7 @@ function model_reportcolumns(usrrap_key, params)
if (!valid_char.test(jsondata.name))
abort_with_warning(L("lcl_rap_column_invalid"));
if (user.has("WEB_FACTAB") && (jsondata.expression || jsondata.id == -1))
if (user.has("WEB_FACTAB") && (jsondata.expression || !jsondata.id))
{
this.fields.expression.readonly = false;
this.fields.name.insertonly = false;
@@ -434,7 +434,7 @@ function model_reportcolumns(usrrap_key, params)
// Only internally used by report_clone and _view2columns
this._REST_POST = function (params, jsondata, parent_key) /* insert columns */
{
if (user.has("WEB_FACTAB") && jsondata.id == -1)
if (user.has("WEB_FACTAB") && !jsondata.id)
this.fields.expression.readonly = false;
var valid_char = /^[_0-9a-zA-Z]+$/;