hg merge release-4.1 (merge release4.1 into default)
This commit is contained in:
commit
a036839491
|
@ -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,15 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3521 InfoWindow problem on other SQL when make a register count
|
||||
-- Oct 20, 2017 12:13:41 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2017-10-20 12:13:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201634
|
||||
;
|
||||
|
||||
-- Oct 20, 2017 12:13:43 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2017-10-20 12:13:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13579
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710201214_IDEMPIERE-3521.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3338 Document Status Indicator / fix wrong example on GW
|
||||
-- Oct 23, 2017 6:41:13 PM CEST
|
||||
UPDATE PA_DocumentStatus SET WhereClause='M_InOut.IsSOTrx=''Y'' AND M_InOut.Processed=''N'' AND M_InOut.MovementType IN (''C-'')',Updated=TO_DATE('2017-10-23 18:41:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200001
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710231841_IDEMPIERE-3338.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3173 Columns that must not be copied
|
||||
-- Oct 23, 2017 7:14:50 PM CEST
|
||||
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2017-10-23 19:14:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200558
|
||||
;
|
||||
|
||||
-- Oct 23, 2017 7:15:09 PM CEST
|
||||
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_DATE('2017-10-23 19:15:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200704
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710231915_IDEMPIERE-3173.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3529 - Add parameters to InvoicePrint process
|
||||
-- Oct 25, 2017 12:09:30 PM CEST
|
||||
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,AD_Val_Rule_ID,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted) VALUES (200219,0,0,'Y',TO_DATE('2017-10-25 12:09:30','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-10-25 12:09:30','YYYY-MM-DD HH24:MI:SS'),100,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',200,60,19,170,'N',124,0,'N','C_DocType_ID','Y','D',196,'554013bb-d6c0-4795-a9c6-aa2cb6dfc2bf','N')
|
||||
;
|
||||
|
||||
-- Oct 25, 2017 12:16:28 PM CEST
|
||||
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted) VALUES (200220,0,0,'Y',TO_DATE('2017-10-25 12:16:28','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2017-10-25 12:16:28','YYYY-MM-DD HH24:MI:SS'),100,'Paid','The document is paid',200,70,17,319,'N',0,'N','IsPaid','Y','D',1402,'7d2f7567-fb4f-44b0-a098-ddaa81ca7a4f','N')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710251241_IDEMPIERE-3529.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,11 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-1052 Improve Performance using Search instead of Table/Table Direct
|
||||
-- Oct 31, 2017 5:15:03 PM CET
|
||||
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N', FKConstraintType=NULL,Updated=TO_DATE('2017-10-31 17:15:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8814
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710311719_IDEMPIERE-1052.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
|
||||
;
|
|
@ -0,0 +1,12 @@
|
|||
-- IDEMPIERE-3521 InfoWindow problem on other SQL when make a register count
|
||||
-- Oct 20, 2017 12:13:41 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2017-10-20 12:13:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=201634
|
||||
;
|
||||
|
||||
-- Oct 20, 2017 12:13:43 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2017-10-20 12:13:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=13579
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710201214_IDEMPIERE-3521.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-- IDEMPIERE-3338 Document Status Indicator / fix wrong example on GW
|
||||
-- Oct 23, 2017 6:41:13 PM CEST
|
||||
UPDATE PA_DocumentStatus SET WhereClause='M_InOut.IsSOTrx=''Y'' AND M_InOut.Processed=''N'' AND M_InOut.MovementType IN (''C-'')',Updated=TO_TIMESTAMP('2017-10-23 18:41:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE PA_DocumentStatus_ID=200001
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710231841_IDEMPIERE-3338.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
-- IDEMPIERE-3173 Columns that must not be copied
|
||||
-- Oct 23, 2017 7:14:50 PM CEST
|
||||
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2017-10-23 19:14:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200558
|
||||
;
|
||||
|
||||
-- Oct 23, 2017 7:15:09 PM CEST
|
||||
UPDATE AD_Column SET IsAllowCopy='N',Updated=TO_TIMESTAMP('2017-10-23 19:15:09','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200704
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710231915_IDEMPIERE-3173.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
-- IDEMPIERE-3529 - Add parameters to InvoicePrint process
|
||||
-- Oct 25, 2017 12:09:30 PM CEST
|
||||
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,Help,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,AD_Val_Rule_ID,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted) VALUES (200219,0,0,'Y',TO_TIMESTAMP('2017-10-25 12:09:30','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-10-25 12:09:30','YYYY-MM-DD HH24:MI:SS'),100,'Document Type','Document type or rules','The Document Type determines document sequence and processing rules',200,60,19,170,'N',124,0,'N','C_DocType_ID','Y','D',196,'554013bb-d6c0-4795-a9c6-aa2cb6dfc2bf','N')
|
||||
;
|
||||
|
||||
-- Oct 25, 2017 12:16:28 PM CEST
|
||||
INSERT INTO AD_Process_Para (AD_Process_Para_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,Name,Description,AD_Process_ID,SeqNo,AD_Reference_ID,AD_Reference_Value_ID,IsRange,FieldLength,IsMandatory,ColumnName,IsCentrallyMaintained,EntityType,AD_Element_ID,AD_Process_Para_UU,IsEncrypted) VALUES (200220,0,0,'Y',TO_TIMESTAMP('2017-10-25 12:16:28','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2017-10-25 12:16:28','YYYY-MM-DD HH24:MI:SS'),100,'Paid','The document is paid',200,70,17,319,'N',0,'N','IsPaid','Y','D',1402,'7d2f7567-fb4f-44b0-a098-ddaa81ca7a4f','N')
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710251241_IDEMPIERE-3529.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,8 @@
|
|||
-- IDEMPIERE-1052 Improve Performance using Search instead of Table/Table Direct
|
||||
-- Oct 31, 2017 5:15:03 PM CET
|
||||
UPDATE AD_Column SET AD_Reference_ID=30, IsUpdateable='N', FKConstraintType=NULL,Updated=TO_TIMESTAMP('2017-10-31 17:15:03','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=8814
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201710311719_IDEMPIERE-1052.sql') FROM dual
|
||||
;
|
||||
|
|
@ -105,7 +105,7 @@ public class OrderBatchProcess extends SvrProcess
|
|||
StringBuilder sql = new StringBuilder("SELECT * FROM C_Order o ")
|
||||
.append(" WHERE o.C_DocTypeTarget_ID=? AND o.DocStatus=? ");
|
||||
if (p_IsSelfService != null && p_IsSelfService.length() == 1)
|
||||
sql.append(" AND o.IsSelfService='").append(p_IsSelfService).append("'");
|
||||
sql.append(" AND o.IsSelfService=").append(DB.TO_STRING(p_IsSelfService));
|
||||
if (p_C_BPartner_ID != 0)
|
||||
sql.append(" AND o.C_BPartner_ID=").append(p_C_BPartner_ID);
|
||||
if (p_DateOrdered_From != null)
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.util.List;
|
|||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.model.MInfoProcess;
|
||||
import org.adempiere.model.MInfoRelated;
|
||||
import org.compiere.model.AccessSqlParser.TableInfo;
|
||||
|
@ -446,7 +447,7 @@ public class MInfoWindow extends X_AD_InfoWindow
|
|||
pstmt.executeQuery();
|
||||
}catch (Exception ex){
|
||||
log.log(Level.WARNING, ex.getMessage());
|
||||
return;
|
||||
throw new AdempiereException(ex);
|
||||
} finally {
|
||||
DB.close(pstmt);
|
||||
}
|
||||
|
|
|
@ -216,6 +216,10 @@ public class MMailText extends X_R_MailText
|
|||
*/
|
||||
private String parseVariable (String variable, PO po)
|
||||
{
|
||||
if (variable.contains("<") && variable.contains(">")) { // IDEMPIERE-3096
|
||||
return Env.parseVariable("@"+variable+"@", po, get_TrxName(), true);
|
||||
}
|
||||
// special default formatting cases for dates/times/boolean in mail text not covered by Env.parseVariable
|
||||
int index = po.get_ColumnIndex(variable);
|
||||
if (index == -1){
|
||||
StringBuilder msgreturn = new StringBuilder("@").append(variable).append("@");
|
||||
|
|
|
@ -114,17 +114,21 @@ public class MProductionLine extends X_M_ProductionLine {
|
|||
}
|
||||
Timestamp dateMPolicy = date;
|
||||
if(getM_AttributeSetInstance_ID()>0){
|
||||
Timestamp t = MStorageOnHand.getDateMaterialPolicy(getM_Product_ID(), getM_AttributeSetInstance_ID(), get_TrxName());
|
||||
Timestamp t = MStorageOnHand.getDateMaterialPolicy(getM_Product_ID(), getM_AttributeSetInstance_ID(), getM_Locator_ID(), get_TrxName());
|
||||
if (t != null)
|
||||
dateMPolicy = t;
|
||||
}
|
||||
|
||||
dateMPolicy = Util.removeTime(dateMPolicy);
|
||||
MProductionLineMA lineMA = new MProductionLineMA( this,
|
||||
asi.get_ID(), getMovementQty(),dateMPolicy);
|
||||
if ( !lineMA.save(get_TrxName()) ) {
|
||||
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
||||
errorString.append("Could not save MA for " + toString() + "\n" );
|
||||
//for reversal, keep the ma copy from original trx
|
||||
if (reversalId <= 0 )
|
||||
{
|
||||
MProductionLineMA lineMA = new MProductionLineMA( this,
|
||||
asi.get_ID(), getMovementQty(),dateMPolicy);
|
||||
if ( !lineMA.save(get_TrxName()) ) {
|
||||
log.log(Level.SEVERE, "Could not save MA for " + toString());
|
||||
errorString.append("Could not save MA for " + toString() + "\n" );
|
||||
}
|
||||
}
|
||||
MTransaction matTrx = new MTransaction (getCtx(), getAD_Org_ID(),
|
||||
"P+",
|
||||
|
|
|
@ -61,7 +61,7 @@ public final class MRole extends X_AD_Role
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 3608297024439006903L;
|
||||
private static final long serialVersionUID = 8952907008982481439L;
|
||||
|
||||
/**
|
||||
* Get Default (Client) Role
|
||||
|
@ -1488,7 +1488,7 @@ public final class MRole extends X_AD_Role
|
|||
* @param AD_Window_ID window
|
||||
* @return null in no access, TRUE if r/w and FALSE if r/o
|
||||
*/
|
||||
public Boolean getWindowAccess (int AD_Window_ID)
|
||||
public synchronized Boolean getWindowAccess (int AD_Window_ID)
|
||||
{
|
||||
if (m_windowAccess == null)
|
||||
{
|
||||
|
@ -1575,7 +1575,7 @@ public final class MRole extends X_AD_Role
|
|||
* @param AD_Process_ID process
|
||||
* @return null in no access, TRUE if r/w and FALSE if r/o
|
||||
*/
|
||||
public Boolean getProcessAccess (int AD_Process_ID)
|
||||
public synchronized Boolean getProcessAccess (int AD_Process_ID)
|
||||
{
|
||||
if (m_processAccess == null)
|
||||
{
|
||||
|
@ -1657,7 +1657,7 @@ public final class MRole extends X_AD_Role
|
|||
* @param AD_Task_ID task
|
||||
* @return null in no access, TRUE if r/w and FALSE if r/o
|
||||
*/
|
||||
public Boolean getTaskAccess (int AD_Task_ID)
|
||||
public synchronized Boolean getTaskAccess (int AD_Task_ID)
|
||||
{
|
||||
if (m_taskAccess == null)
|
||||
{
|
||||
|
@ -1737,7 +1737,7 @@ public final class MRole extends X_AD_Role
|
|||
* @param AD_Form_ID form
|
||||
* @return null in no access, TRUE if r/w and FALSE if r/o
|
||||
*/
|
||||
public Boolean getFormAccess (int AD_Form_ID)
|
||||
public synchronized Boolean getFormAccess (int AD_Form_ID)
|
||||
{
|
||||
if (m_formAccess == null)
|
||||
{
|
||||
|
@ -1817,7 +1817,7 @@ public final class MRole extends X_AD_Role
|
|||
* @param AD_Workflow_ID workflow
|
||||
* @return null in no access, TRUE if r/w and FALSE if r/o
|
||||
*/
|
||||
public Boolean getWorkflowAccess (int AD_Workflow_ID)
|
||||
public synchronized Boolean getWorkflowAccess (int AD_Workflow_ID)
|
||||
{
|
||||
if (m_workflowAccess == null)
|
||||
{
|
||||
|
@ -3086,7 +3086,7 @@ public final class MRole extends X_AD_Role
|
|||
return whereClause.toString();
|
||||
}
|
||||
|
||||
public Boolean getInfoAccess(int AD_InfoWindow_ID) {
|
||||
public synchronized Boolean getInfoAccess(int AD_InfoWindow_ID) {
|
||||
if (m_infoAccess == null)
|
||||
{
|
||||
m_infoAccess = new HashMap<Integer,Boolean>(20);
|
||||
|
|
|
@ -1035,7 +1035,8 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
|||
*
|
||||
* @param M_Product_ID
|
||||
* @param M_AttributeSetInstance_ID
|
||||
* @return
|
||||
* @param trxName
|
||||
* @return datempolicy timestamp
|
||||
*/
|
||||
public static Timestamp getDateMaterialPolicy(int M_Product_ID, int M_AttributeSetInstance_ID,String trxName){
|
||||
|
||||
|
@ -1068,6 +1069,49 @@ public class MStorageOnHand extends X_M_StorageOnHand
|
|||
}
|
||||
|
||||
|
||||
return null;
|
||||
} //getDateMaterialPolicy
|
||||
|
||||
/**
|
||||
*
|
||||
* @param M_Product_ID
|
||||
* @param M_AttributeSetInstance_ID
|
||||
* @param M_Locator_ID
|
||||
* @param trxName
|
||||
* @return datempolicy timestamp
|
||||
*/
|
||||
public static Timestamp getDateMaterialPolicy(int M_Product_ID, int M_AttributeSetInstance_ID, int M_Locator_ID, String trxName){
|
||||
|
||||
if (M_Product_ID <= 0 || M_AttributeSetInstance_ID <= 0)
|
||||
return null;
|
||||
|
||||
String sql = "SELECT dateMaterialPolicy FROM M_StorageOnHand WHERE M_Product_ID=? and M_AttributeSetInstance_ID=? AND M_Locator_ID=?";
|
||||
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
pstmt = DB.prepareStatement(sql, trxName);
|
||||
pstmt.setInt(1, M_Product_ID);
|
||||
pstmt.setInt(2, M_AttributeSetInstance_ID);
|
||||
pstmt.setInt(3, M_Locator_ID);
|
||||
|
||||
rs = pstmt.executeQuery();
|
||||
if (rs.next())
|
||||
{
|
||||
return rs.getTimestamp(1);
|
||||
}
|
||||
} catch (SQLException ex)
|
||||
{
|
||||
s_log.log(Level.SEVERE, sql, ex);
|
||||
|
||||
}finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
|
||||
|
||||
return null;
|
||||
} //getDateMaterialPolicy
|
||||
} // MStorageOnHand
|
||||
|
|
|
@ -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 ALERT_SEND_ATTACHMENT_AS_XLS = "ALERT_SEND_ATTACHMENT_AS_XLS";
|
||||
|
@ -171,6 +171,7 @@ public class MSysConfig extends X_AD_SysConfig
|
|||
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_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_ROOT_FOLDER_BROWSER = "ZK_ROOT_FOLDER_BROWSER";
|
||||
public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL";
|
||||
|
|
|
@ -1663,6 +1663,9 @@ public final class Env
|
|||
outStr.append(mf.format(v));
|
||||
}
|
||||
} else {
|
||||
if (colToken != null && colToken.isSecure()) {
|
||||
v = "********";
|
||||
}
|
||||
outStr.append(v.toString());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,7 +320,7 @@ public class ConfigurationData
|
|||
initAppsServer();
|
||||
setAppsServer(hostName);
|
||||
// Database Server
|
||||
initDatabase("");
|
||||
initDatabase(Database.DB_POSTGRESQL);
|
||||
String connectionName = getDatabaseDiscovered();
|
||||
if (connectionName != null && connectionName.trim().length() > 0) {
|
||||
setDatabaseName(resolveDatabaseName(connectionName));
|
||||
|
@ -1169,7 +1169,10 @@ public class ConfigurationData
|
|||
}
|
||||
else
|
||||
{
|
||||
m_databaseConfig[index].init(this);
|
||||
if ( ! p_properties.containsKey(ADEMPIERE_DB_NAME)
|
||||
&& ! p_properties.containsKey(ADEMPIERE_DB_PORT)) {
|
||||
m_databaseConfig[index].init(this);
|
||||
}
|
||||
|
||||
if (p_panel != null)
|
||||
{
|
||||
|
|
|
@ -104,7 +104,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_STATUS_UPDATE = "onStatusUpdate";
|
||||
|
||||
|
@ -522,16 +522,23 @@ public abstract class AbstractProcessDialog extends Window implements IProcessUI
|
|||
MPrintFormat format = new MPrintFormat(m_ctx, pr.getAD_PrintFormat_ID(), null);
|
||||
table_ID = format.getAD_Table_ID();
|
||||
}
|
||||
String valCode = null;
|
||||
StringBuilder valCode = new StringBuilder();
|
||||
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);
|
||||
}
|
||||
|
||||
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,
|
||||
AD_Column_ID, DisplayType.TableDir,
|
||||
Env.getLanguage(Env.getCtx()), "AD_PrintFormat_ID", 0, false,
|
||||
valCode);
|
||||
valCode.toString());
|
||||
|
||||
fPrintFormat = new WTableDirEditor("AD_PrintFormat_ID", false, false, true, lookup);
|
||||
|
||||
|
|
|
@ -24,6 +24,8 @@ import java.math.BigDecimal;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
|
||||
import org.adempiere.base.event.EventManager;
|
||||
import org.adempiere.base.event.IEventManager;
|
||||
|
@ -1063,6 +1065,8 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
return AD_Tree_ID;
|
||||
}
|
||||
private void automaticOpen(Properties ctx) {
|
||||
if (isActionURL()) // IDEMPIERE-2334 vs IDEMPIERE-3000 - do not open windows when coming from an action URL
|
||||
return;
|
||||
|
||||
StringBuilder sql = new StringBuilder("SELECT m.Action, COALESCE(m.AD_Window_ID, m.AD_Process_ID, m.AD_Form_ID, m.AD_Workflow_ID, m.AD_Task_ID, AD_InfoWindow_ID) ")
|
||||
.append(" FROM AD_TreeBar tb")
|
||||
|
@ -1130,4 +1134,16 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
|||
if (eastPopup != null && eastPopup.getChildren().size() > 1)
|
||||
setSidePopupWidth(eastPopup);
|
||||
}
|
||||
|
||||
private boolean isActionURL() {
|
||||
ConcurrentMap<String, String[]> parameters = new ConcurrentHashMap<String, String[]>(Executions.getCurrent().getParameterMap());
|
||||
String action = "";
|
||||
if (parameters != null) {
|
||||
String[] strs = parameters.get("Action");
|
||||
if (strs != null && strs.length == 1 && strs[0] != null)
|
||||
action = strs[0];
|
||||
}
|
||||
return ! Util.isEmpty(action);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -107,11 +107,11 @@ import org.zkoss.zul.Vbox;
|
|||
* @contributor xolali IDEMPIERE-1045 Sub-Info Tabs (reviewed by red1)
|
||||
*/
|
||||
public class InfoWindow extends InfoPanel implements ValueChangeListener, EventListener<Event> {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 8358292103127594383L;
|
||||
private static final long serialVersionUID = 1672005382454423850L;
|
||||
|
||||
protected Grid parameterGrid;
|
||||
private Borderlayout layout;
|
||||
private Vbox southBody;
|
||||
|
@ -1513,16 +1513,8 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
dataSql = MRole.getDefault().addAccessSQL(dataSql, getTableName(),
|
||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
|
||||
if (infoWindow.getOtherClause() != null && infoWindow.getOtherClause().trim().length() > 0) {
|
||||
String otherClause = infoWindow.getOtherClause();
|
||||
if (otherClause.indexOf("@") >= 0) {
|
||||
String s = Env.parseContext(infoContext, p_WindowNo, otherClause, true, false);
|
||||
if (s.length() == 0) {
|
||||
log.severe("Failed to parse other clause. " + otherClause);
|
||||
} else {
|
||||
otherClause = s;
|
||||
}
|
||||
}
|
||||
String otherClause = getOtherClauseParsed();
|
||||
if (otherClause.length() > 0) {
|
||||
dataSql = dataSql + " " + otherClause;
|
||||
}
|
||||
|
||||
|
@ -1537,8 +1529,24 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
return dataSql;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
private String getOtherClauseParsed() {
|
||||
String otherClause = "";
|
||||
if (infoWindow != null && infoWindow.getOtherClause() != null && infoWindow.getOtherClause().trim().length() > 0) {
|
||||
otherClause = infoWindow.getOtherClause();
|
||||
if (otherClause.indexOf("@") >= 0) {
|
||||
String s = Env.parseContext(infoContext, p_WindowNo, otherClause, true, false);
|
||||
if (s.length() == 0) {
|
||||
log.severe("Failed to parse other clause. " + otherClause);
|
||||
} else {
|
||||
otherClause = s;
|
||||
}
|
||||
}
|
||||
}
|
||||
return otherClause;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void executeQuery() {
|
||||
prepareTable();
|
||||
super.executeQuery();
|
||||
|
@ -1757,10 +1765,11 @@ public class InfoWindow extends InfoPanel implements ValueChangeListener, EventL
|
|||
}
|
||||
countSql = MRole.getDefault().addAccessSQL (countSql, getTableName(),
|
||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
// Fix GroupBy On InfoWindow
|
||||
String otherClause = infoWindow.getOtherClause();
|
||||
if (otherClause !=null)
|
||||
countSql = countSql+" "+otherClause;
|
||||
// IDEMPIERE-3521
|
||||
String otherClause = getOtherClauseParsed();
|
||||
if (otherClause.length() > 0) {
|
||||
countSql = countSql + " " + otherClause;
|
||||
}
|
||||
|
||||
countSql = "SELECT COUNT(*) FROM ( " + countSql + " ) a";
|
||||
|
||||
|
|
|
@ -1083,10 +1083,6 @@ public abstract class InfoPanel extends Window implements EventListener<Event>,
|
|||
countSql = countSql.trim();
|
||||
countSql = countSql.substring(0, countSql.length() - 5);
|
||||
}
|
||||
String otherClause = infoWindow != null ? infoWindow.getOtherClause() : null; // Fix otherClause on count
|
||||
if (otherClause != null)
|
||||
countSql = countSql+" "+otherClause;
|
||||
|
||||
countSql = MRole.getDefault().addAccessSQL (countSql, getTableName(),
|
||||
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||
if (log.isLoggable(Level.FINER))
|
||||
|
|
|
@ -68,6 +68,8 @@ public class InvoicePrint extends SvrProcess
|
|||
protected int m_C_Invoice_ID = 0;
|
||||
protected String m_DocumentNo_From = null;
|
||||
protected String m_DocumentNo_To = null;
|
||||
private String p_IsPaid = null;
|
||||
private int m_C_DocType_ID = 0;
|
||||
|
||||
protected volatile StringBuffer sql = new StringBuffer();
|
||||
protected volatile List<Object> params = new ArrayList<Object>();
|
||||
|
@ -101,6 +103,10 @@ public class InvoicePrint extends SvrProcess
|
|||
m_DocumentNo_From = (String)para[i].getParameter();
|
||||
m_DocumentNo_To = (String)para[i].getParameter_To();
|
||||
}
|
||||
else if (name.equals("IsPaid"))
|
||||
p_IsPaid = (String)para[i].getParameter();
|
||||
else if (name.equals("C_DocType_ID"))
|
||||
m_C_DocType_ID = para[i].getParameterAsInt();
|
||||
else
|
||||
log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name);
|
||||
}
|
||||
|
@ -124,7 +130,9 @@ public class InvoicePrint extends SvrProcess
|
|||
+ ", C_Invoice_ID=" + m_C_Invoice_ID
|
||||
+ ", EmailPDF=" + p_EMailPDF + ",R_MailText_ID=" + p_R_MailText_ID
|
||||
+ ", DateInvoiced=" + m_dateInvoiced_From + "-" + m_dateInvoiced_To
|
||||
+ ", DocumentNo=" + m_DocumentNo_From + "-" + m_DocumentNo_To);
|
||||
+ ", DocumentNo=" + m_DocumentNo_From + "-" + m_DocumentNo_To
|
||||
+ ", IsPaid=" + p_IsPaid
|
||||
+ ", C_DocType_ID=" + m_C_DocType_ID);
|
||||
|
||||
MMailText mText = null;
|
||||
if (p_R_MailText_ID != 0)
|
||||
|
@ -377,6 +385,16 @@ public class InvoicePrint extends SvrProcess
|
|||
/* if emailed to customer only select COmpleted & CLosed invoices */
|
||||
sql.append(" AND i.DocStatus IN ('CO','CL') ");
|
||||
}
|
||||
if (p_IsPaid != null && p_IsPaid.length() == 1)
|
||||
{
|
||||
sql.append(" AND i.IsPaid=?");
|
||||
params.add(p_IsPaid);
|
||||
}
|
||||
if (m_C_DocType_ID != 0)
|
||||
{
|
||||
sql.append (" AND i.C_DocTypeTarget_ID=?");
|
||||
params.add(m_C_DocType_ID);
|
||||
}
|
||||
}
|
||||
String orgWhere = MRole.getDefault(getCtx(), false).getOrgWhere(MRole.SQL_RO);
|
||||
if (!Util.isEmpty(orgWhere, true)) {
|
||||
|
|
|
@ -424,6 +424,8 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
|
|||
reqprocess.setADRecordID(modelRunProcess.getADRecordID());
|
||||
reqprocess.setDocAction(modelRunProcess.getDocAction());
|
||||
RunProcessResponseDocument response = Process.runProcess(getCompiereService(), docprocess, getRequestCtx(), localTrxName);
|
||||
if (response != null && response.getRunProcessResponse() != null && response.getRunProcessResponse().getIsError())
|
||||
log.warning("Error running webservice " + serviceType + " -> " + response.getRunProcessResponse().getError());
|
||||
Map<String, Object> requestCtx = getRequestCtx();
|
||||
requestCtx.put(serviceType+"_Summary", response.getRunProcessResponse().getSummary());
|
||||
return response;
|
||||
|
|
Loading…
Reference in New Issue