IDEMPIERE-3411 When lauching a report based on a report view, available print formats are not filtered
This commit is contained in:
parent
a7ce6b29ac
commit
73f1764acd
|
@ -0,0 +1,10 @@
|
||||||
|
SET SQLBLANKLINES ON
|
||||||
|
SET DEFINE OFF
|
||||||
|
|
||||||
|
-- IDEMPIERE-3411 : When lauching a report based on a report view, available print formats are not filtered
|
||||||
|
-- Jul 4, 2017 3:42:50 PM CEST
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200104,0,0,TO_DATE('2017-07-04 15:42:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2017-07-04 15:42:49','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_REPORT_ONLY_PRINTFORMAT_LINKEDTO_REPORTVIEW','N','If set to Yes, print formats will be filtered according to the current report view','U','C','18e6758b-db72-480e-b832-72080c8f2268')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201707041543_IDEMPIERE-3411.sql') FROM dual
|
||||||
|
;
|
|
@ -0,0 +1,7 @@
|
||||||
|
-- IDEMPIERE-3411 : When lauching a report based on a report view, available print formats are not filtered
|
||||||
|
-- Jul 4, 2017 3:42:50 PM CEST
|
||||||
|
INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200104,0,0,TO_TIMESTAMP('2017-07-04 15:42:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2017-07-04 15:42:49','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_REPORT_ONLY_PRINTFORMAT_LINKEDTO_REPORTVIEW','N','If set to Yes, print formats will be filtered according to the current report view','U','C','18e6758b-db72-480e-b832-72080c8f2268')
|
||||||
|
;
|
||||||
|
|
||||||
|
SELECT register_migration_script('201707041543_IDEMPIERE-3411.sql') FROM dual
|
||||||
|
;
|
|
@ -42,7 +42,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -1378971388226313818L;
|
private static final long serialVersionUID = -7805174199114873428L;
|
||||||
|
|
||||||
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
public static final String ADDRESS_VALIDATION = "ADDRESS_VALIDATION";
|
||||||
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
public static final String ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||||
|
@ -168,6 +168,7 @@ public class MSysConfig extends X_AD_SysConfig
|
||||||
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
|
public static final String ZK_PAGING_SIZE = "ZK_PAGING_SIZE";
|
||||||
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
|
public static final String ZK_REPORT_FORM_OUTPUT_TYPE = "ZK_REPORT_FORM_OUTPUT_TYPE";
|
||||||
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
|
public static final String ZK_REPORT_JASPER_OUTPUT_TYPE = "ZK_REPORT_JASPER_OUTPUT_TYPE";
|
||||||
|
public static final String ZK_REPORT_ONLY_PRINTFORMAT_LINKEDTO_REPORTVIEW = "ZK_REPORT_ONLY_PRINTFORMAT_LINKEDTO_REPORTVIEW";
|
||||||
public static final String ZK_REPORT_TABLE_OUTPUT_TYPE = "ZK_REPORT_TABLE_OUTPUT_TYPE";
|
public static final String ZK_REPORT_TABLE_OUTPUT_TYPE = "ZK_REPORT_TABLE_OUTPUT_TYPE";
|
||||||
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
|
public static final String ZK_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
|
||||||
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
|
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
|
||||||
|
|
|
@ -103,7 +103,7 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = -4807787318205732697L;
|
private static final long serialVersionUID = 8307953279095577359L;
|
||||||
private static final String ON_COMPLETE = "onComplete";
|
private static final String ON_COMPLETE = "onComplete";
|
||||||
private static final String ON_STATUS_UPDATE = "onStatusUpdate";
|
private static final String ON_STATUS_UPDATE = "onStatusUpdate";
|
||||||
|
|
||||||
|
@ -510,16 +510,23 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
||||||
MPrintFormat format = new MPrintFormat(m_ctx, pr.getAD_PrintFormat_ID(), null);
|
MPrintFormat format = new MPrintFormat(m_ctx, pr.getAD_PrintFormat_ID(), null);
|
||||||
table_ID = format.getAD_Table_ID();
|
table_ID = format.getAD_Table_ID();
|
||||||
}
|
}
|
||||||
String valCode = null;
|
StringBuilder valCode = new StringBuilder();
|
||||||
if (table_ID > 0)
|
if (table_ID > 0)
|
||||||
{
|
{
|
||||||
valCode = "AD_PrintFormat.AD_Table_ID=" + table_ID;
|
valCode.append("AD_PrintFormat.AD_Table_ID=").append(table_ID);
|
||||||
m_isCanExport = MRole.getDefault().isCanExport(table_ID);
|
m_isCanExport = MRole.getDefault().isCanExport(table_ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pr.getAD_ReportView_ID() > 0 && MSysConfig.getBooleanValue(MSysConfig.ZK_REPORT_ONLY_PRINTFORMAT_LINKEDTO_REPORTVIEW, false, client.getAD_Client_ID())) {
|
||||||
|
if (valCode.length() > 0)
|
||||||
|
valCode.append(" AND ");
|
||||||
|
valCode.append("AD_PrintFormat.AD_ReportView_ID=").append(pr.getAD_ReportView_ID());
|
||||||
|
}
|
||||||
|
|
||||||
Lookup lookup = MLookupFactory.get (Env.getCtx(), m_WindowNo,
|
Lookup lookup = MLookupFactory.get (Env.getCtx(), m_WindowNo,
|
||||||
AD_Column_ID, DisplayType.TableDir,
|
AD_Column_ID, DisplayType.TableDir,
|
||||||
Env.getLanguage(Env.getCtx()), "AD_PrintFormat_ID", 0, false,
|
Env.getLanguage(Env.getCtx()), "AD_PrintFormat_ID", 0, false,
|
||||||
valCode);
|
valCode.toString());
|
||||||
|
|
||||||
fPrintFormat = new WTableDirEditor("AD_PrintFormat_ID", false, false, true, lookup);
|
fPrintFormat = new WTableDirEditor("AD_PrintFormat_ID", false, false, true, lookup);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue