hg merge release-5.1 (merge release5.1 into default)

This commit is contained in:
Carlos Ruiz 2018-04-23 09:21:16 +02:00
commit c10b0cd46c
12 changed files with 343 additions and 38 deletions

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3685
-- Apr 12, 2018 4:51:48 PM CEST
UPDATE AD_Tab SET WhereClause='(AD_Field.IsDisplayed=''Y'' OR AD_Field.IsDisplayedGrid=''Y'')', OrderByClause='AD_Field.SeqNo, AD_Field.SeqNoGrid',Updated=TO_DATE('2018-04-12 16:51:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=107
;
SELECT register_migration_script('201804121657_IDEMPIERE-3685.sql') FROM dual
;

View File

@ -0,0 +1,10 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3691 "Row" tooltip is not translated
-- Apr 17, 2018 9:04:04 AM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Row',0,0,'Y',TO_DATE('2018-04-17 09:04:03','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2018-04-17 09:04:03','YYYY-MM-DD HH24:MI:SS'),0,200452,'Row','D','df5d9baf-0fd2-477c-aa27-da90069bbd07')
;
SELECT register_migration_script('201804170900_IDEMPIERE-3691.sql') FROM dual
;

View File

@ -0,0 +1,107 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- IDEMPIERE-3678
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62128
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62129
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62116
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62131
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62133
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62134
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62132
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62135
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62143
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62140
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62725
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62724
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62139
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62144
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62155
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62147
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62148
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62149
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62150
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62130
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204611
;
-- Apr 17, 2018 9:40:56 AM CEST
UPDATE AD_Field SET DisplayLogic='@C_BPartner_ID@!0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsAllowCopy='N', IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:40:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137
;
-- Apr 17, 2018 9:46:44 AM CEST
UPDATE AD_Process_Para SET MandatoryLogic='@CreateOpportunity@=Y',Updated=TO_DATE('2018-04-17 09:46:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53585
;
-- Apr 17, 2018 9:48:43 AM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@C_BPartner_ID@!0', IsToolbarButton=NULL,Updated=TO_DATE('2018-04-17 09:48:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62116
;
SELECT register_migration_script('201804170941_IDEMPIERE-3678.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- IDEMPIERE-3685
-- Apr 12, 2018 4:51:48 PM CEST
UPDATE AD_Tab SET WhereClause='(AD_Field.IsDisplayed=''Y'' OR AD_Field.IsDisplayedGrid=''Y'')', OrderByClause='SeqNo, SeqNoGrid',Updated=TO_TIMESTAMP('2018-04-12 16:51:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=107
;
SELECT register_migration_script('201804121657_IDEMPIERE-3685.sql') FROM dual
;

View File

@ -0,0 +1,7 @@
-- IDEMPIERE-3691 "Row" tooltip is not translated
-- Apr 17, 2018 9:04:04 AM CEST
INSERT INTO AD_Message (MsgType,MsgText,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Message_ID,Value,EntityType,AD_Message_UU) VALUES ('I','Row',0,0,'Y',TO_TIMESTAMP('2018-04-17 09:04:03','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2018-04-17 09:04:03','YYYY-MM-DD HH24:MI:SS'),0,200452,'Row','D','df5d9baf-0fd2-477c-aa27-da90069bbd07')
;
SELECT register_migration_script('201804170900_IDEMPIERE-3691.sql') FROM dual
;

View File

@ -0,0 +1,104 @@
-- IDEMPIERE-3678
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=40, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, ColumnSpan=2, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=50, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62128
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=60, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62129
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=70, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62116
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62131
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62133
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62134
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62132
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62135
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62143
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62140
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62725
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62724
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=170, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62139
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=180, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62144
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=190, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62155
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=200, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62147
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=210, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62148
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=220, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62149
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=230, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62150
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=240, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62130
;
-- Apr 17, 2018 9:39:44 AM CEST
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:39:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204611
;
-- Apr 17, 2018 9:40:56 AM CEST
UPDATE AD_Field SET DisplayLogic='@C_BPartner_ID@!0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsAllowCopy='N', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:40:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62137
;
-- Apr 17, 2018 9:46:44 AM CEST
UPDATE AD_Process_Para SET MandatoryLogic='@CreateOpportunity@=Y',Updated=TO_TIMESTAMP('2018-04-17 09:46:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Process_Para_ID=53585
;
-- Apr 17, 2018 9:48:43 AM CEST
UPDATE AD_Field SET AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, ReadOnlyLogic='@C_BPartner_ID@!0', IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-04-17 09:48:43','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=62116
;
SELECT register_migration_script('201804170941_IDEMPIERE-3678.sql') FROM dual
;

View File

@ -19,6 +19,7 @@ import java.io.OutputStream;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Properties;
import java.util.logging.Level;
@ -34,6 +35,7 @@ import org.apache.poi.hssf.usermodel.HSSFRichTextString;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.compiere.model.MSysConfig;
import org.compiere.util.CLogger;
import org.compiere.util.DisplayType;
import org.compiere.util.Env;
@ -339,9 +341,20 @@ public abstract class AbstractExcelExporter
// Sheet Footer
HSSFFooter footer = sheet.getFooter();
footer.setLeft(Env.getStandardReportFooterTrademarkText());
String s = MSysConfig.getValue(MSysConfig.ZK_FOOTER_SERVER_MSG, "", Env.getAD_Client_ID(Env.getCtx()));
if (Util.isEmpty(s))
footer.setCenter(Env.getHeader(getCtx(), 0));
else
footer.setCenter(Msg.parseTranslation(Env.getCtx(), s));
Timestamp now = new Timestamp(System.currentTimeMillis());
s = MSysConfig.getValue(MSysConfig.ZK_FOOTER_SERVER_DATETIME_FORMAT, Env.getAD_Client_ID(Env.getCtx()));
if (!Util.isEmpty(s))
footer.setRight(new SimpleDateFormat(s).format(System.currentTimeMillis()));
else
footer.setRight(DisplayType.getDateFormat(DisplayType.DateTime, getLanguage()).format(now));
}
protected void formatPage(HSSFSheet sheet)

View File

@ -52,8 +52,10 @@ import org.compiere.model.MLocation;
import org.compiere.model.MProcess;
import org.compiere.model.MQuery;
import org.compiere.model.MRefList;
import org.compiere.model.MRefTable;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.Query;
import org.compiere.process.ProcessInfo;
import org.compiere.tools.FileUtil;
import org.compiere.util.CLogger;
@ -63,6 +65,7 @@ import org.compiere.util.Env;
import org.compiere.util.Language;
import org.compiere.util.Msg;
import org.compiere.util.Trx;
import org.compiere.util.Util;
import org.compiere.util.ValueNamePair;
import org.compiere.wf.MWFProcess;
import org.supercsv.cellprocessor.Optional;
@ -962,7 +965,7 @@ public class GridTabCSVImporter implements IGridTabImporter
if("AD_Ref_List".equals(foreignTable))
idS= resolveForeignList(column,foreignColumn,value,null);
else
id = resolveForeign(foreignTable,foreignColumn,value,null);
id = resolveForeign(foreignTable,foreignColumn,value,field,null);
if(idS == null && id < 0){
//it could be that record still doesn't exist if import mode is inserting or merging
@ -1025,7 +1028,7 @@ public class GridTabCSVImporter implements IGridTabImporter
if(isForeing && !"(null)".equals(value)){
String foreignTable = columnName.substring(0,columnName.length()-3);
int id = resolveForeign(foreignTable,foreignColumn,value,null);
int id = resolveForeign(foreignTable,foreignColumn,value,field,null);
if (id < 0)
return new StringBuilder(Msg.getMsg(Env.getCtx(), id==-2?"ForeignMultipleResolved":"ForeignNotResolved" ,new Object[]{header.get(j),value}));
}
@ -1075,11 +1078,11 @@ public class GridTabCSVImporter implements IGridTabImporter
address = new MLocation (Env.getCtx(),C_Location_ID,trx.getTrxName());
}
}
GridField field = gridTab.getField(columnName);
if(!"(null)".equals(value.toString().trim())){
if(isForeing) {
String foreignTable = columnName.substring(0,columnName.length()-3);
setValue = resolveForeign(foreignTable,foreignColumn,value,trx);
setValue = resolveForeign(foreignTable,foreignColumn,value,field,trx);
if("C_City".equals(foreignTable))
address.setCity(value.toString());
}else
@ -1125,7 +1128,7 @@ public class GridTabCSVImporter implements IGridTabImporter
if ("AD_Ref_List".equals(foreignTable))
idS= resolveForeignList(column, foreignColumn, value,trx);
else
id = resolveForeign(foreignTable,foreignColumn,value,trx);
id = resolveForeign(foreignTable,foreignColumn,value, field, trx);
if(idS == null && id < 0)
return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{header.get(i),value});
@ -1169,7 +1172,7 @@ public class GridTabCSVImporter implements IGridTabImporter
isThereRow =true;
} else {
int id = resolveForeign(foreignTable, foreignColumn, value,trx);
int id = resolveForeign(foreignTable, foreignColumn, value,field,trx);
if (id < 0)
return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{header.get(i),value});
@ -1277,7 +1280,8 @@ public class GridTabCSVImporter implements IGridTabImporter
foreignColumn = columnName.substring(columnName.indexOf("[")+1,columnName.indexOf("]"));
columnName = getColumnName(false,isForeing,true,columnName);
MColumn column = MColumn.get(Env.getCtx(),gridTab.getField(columnName).getAD_Column_ID());
GridField field = gridTab.getField(columnName);
MColumn column = MColumn.get(Env.getCtx(),field.getAD_Column_ID());
if (isForeing){
String foreignTable = column.getReferenceTableName();
if ("AD_Ref_List".equals(foreignTable)) {
@ -1287,7 +1291,7 @@ public class GridTabCSVImporter implements IGridTabImporter
setValue = idS;
} else {
int id = resolveForeign(foreignTable, foreignColumn, setValue,trx);
int id = resolveForeign(foreignTable, foreignColumn, setValue, field, trx);
if (id < 0)
return Msg.getMsg(Env.getCtx(),id==-2?"ForeignMultipleResolved":"ForeignNotResolved",new Object[]{columnName,setValue});
@ -1371,7 +1375,7 @@ public class GridTabCSVImporter implements IGridTabImporter
String idS = resolveForeignList(column, foreignColumn, tmpValue,trx);
setValue = idS;
}else {
int id = resolveForeign(foreignTable, foreignColumn, tmpValue,trx);
int id = resolveForeign(foreignTable, foreignColumn, tmpValue,field,trx);
setValue = id;
}
}else{
@ -1400,7 +1404,8 @@ public class GridTabCSVImporter implements IGridTabImporter
if(columnName!=null){
boolean isForeing = columnName.indexOf("[") > 0 && columnName.indexOf("]")>0;
columnwithKey = getColumnName(false,isForeing,true,columnName);
MColumn column = MColumn.get(Env.getCtx(),gridTab.getField(columnwithKey).getAD_Column_ID());
GridField field = gridTab.getField(columnwithKey);
MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
String foreignColumn = null;
if(isForeing){
foreignColumn = columnName.substring(columnName.indexOf("[")+1,columnName.indexOf("]"));
@ -1409,7 +1414,7 @@ public class GridTabCSVImporter implements IGridTabImporter
String idS = resolveForeignList(column,foreignColumn,value,trx);
value = idS;
}else {
int id = resolveForeign(foreignTable,foreignColumn,value,trx);
int id = resolveForeign(foreignTable,foreignColumn,value,field,trx);
value = id;
}
}
@ -1462,7 +1467,7 @@ public class GridTabCSVImporter implements IGridTabImporter
return idS;
}
private int resolveForeign(String foreignTable, String foreignColumn, Object value,Trx trx) {
private int resolveForeign(String foreignTable, String foreignColumn, Object value, GridField field, Trx trx) {
boolean systemAccess = false;
if (!"AD_Client".equals(foreignTable)) {
MTable ft = MTable.get(Env.getCtx(), foreignTable);
@ -1480,7 +1485,30 @@ public class GridTabCSVImporter implements IGridTabImporter
StringBuilder postSelect = new StringBuilder(" FROM ")
.append(foreignTable).append(" WHERE ")
.append(foreignColumn).append("=? AND IsActive='Y' AND AD_Client_ID=?");
if (!Util.isEmpty(field.getVO().ValidationCode)) {
String dynamicValid = Env.parseContext(Env.getCtx(), field.getWindowNo(), field.getGridTab().getTabNo(), field.getVO().ValidationCode, false);
if (Util.isEmpty(dynamicValid)) {
return 0;// it's parse error but simple consider like ForeignNotResolved
}else {
postSelect.append(" AND (").append(dynamicValid).append(")");
}
}
int ref = field.getVO().displayType;
int refval = field.getVO().AD_Reference_Value_ID;
if (refval > 0 && (ref == DisplayType.Table || ref == DisplayType.Search)) {
final MRefTable refTable = new Query(Env.getCtx(), MRefTable.Table_Name, "AD_Reference_ID=?", trxName)
.setParameters(refval)
.firstOnly();
String whereClause = refTable.getWhereClause();
if (!Util.isEmpty(whereClause)) {
String dynamicValid = Env.parseContext(Env.getCtx(), field.getWindowNo(), field.getGridTab().getTabNo(), whereClause, false);
if (Util.isEmpty(dynamicValid)) {
return 0;// it's parse error but simple consider like ForeignNotResolved
}else {
postSelect.append(" AND (").append(dynamicValid).append(")");
}
}
}
StringBuilder selectCount = new StringBuilder("SELECT COUNT(*)").append(postSelect);
StringBuilder selectId = new StringBuilder("SELECT ").append(foreignTable).append("_ID").append(postSelect);
int count = DB.getSQLValueEx(trxName, selectCount.toString(), value, thisClientId);

View File

@ -65,6 +65,8 @@ public class MBPartner extends X_C_BPartner
{
template.set_ValueNoCheck ("C_BPartner_ID", new Integer(0));
template.set_ValueNoCheck ("C_BPartner_UU", (String)null);
template.setAD_OrgBP_ID(0);
template.setLogo_ID(0);
template.setValue ("");
template.setName ("");
template.setName2 (null);

View File

@ -574,7 +574,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
}
GridRowCtx ctx = new GridRowCtx(Env.getCtx(), gridTab, rowIndex);
if (!gridPanelFields[i].isDisplayed(ctx, true)){
if (! (gridPanelFields[i].isDisplayed(ctx, true) || gridPanelFields[i].isDisplayedGrid())){
// IDEMPIERE-2253
component.setVisible(false);
}
@ -594,7 +594,7 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, RowRendererExt
row.setStyle("cursor:pointer");
row.addEventListener(Events.ON_CLICK, rowListener);
row.addEventListener(Events.ON_OK, rowListener);
row.setTooltiptext("Row " + (rowIndex+1));
row.setTooltiptext(Msg.getMsg(Env.getCtx(), "Row") + " " + (rowIndex+1));
if (isActive == null) {
Object isActiveValue = gridTab.getValue(rowIndex, "IsActive");

View File

@ -24,6 +24,7 @@ import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
@ -592,9 +593,17 @@ public final class AEnv
DocumentException, FileNotFoundException {
Document document = null;
PdfWriter copy = null;
List<PdfReader> pdfReaders = new ArrayList<PdfReader>();
try
{
for (File f : pdfList)
{
PdfReader reader = new PdfReader(f.getAbsolutePath());
pdfReaders.add(reader);
if (document == null)
{
document = new Document(reader.getPageSizeWithRotation(1));
@ -613,6 +622,14 @@ public final class AEnv
}
document.close();
}
finally
{
for(PdfReader reader:pdfReaders)
{
reader.close();
}
}
}
/**
* Get window title

View File

@ -56,15 +56,13 @@ public class WDocumentStatusPanel extends Panel {
/**
* Get Panel if User has Document Status Indicators
* @return panel pr null
* @return panel
*/
public static WDocumentStatusPanel get()
{
int AD_User_ID = Env.getAD_User_ID(Env.getCtx());
int AD_Role_ID = Env.getAD_Role_ID(Env.getCtx());
MDocumentStatus[] indicators = MDocumentStatus.getDocumentStatusIndicators(Env.getCtx(), AD_User_ID, AD_Role_ID);
if (indicators.length == 0)
return null;
return new WDocumentStatusPanel(indicators);
}