hg merge release-1.0c (forward-porting)

This commit is contained in:
Carlos Ruiz 2013-10-16 18:13:29 -05:00
commit 47753be83b
61 changed files with 419 additions and 249 deletions

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Sep 30, 2013 9:38:50 PM COT
-- IDEMPIERE-1408 User window must not show System users
UPDATE AD_Tab SET WhereClause='(AD_User.AD_Client_ID=@#AD_Client_ID@)',Updated=TO_DATE('2013-09-30 21:38:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=118
;
SELECT register_migration_script('201309302139_IDEMPIERE-1408.sql') FROM dual
;

View File

@ -0,0 +1,41 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- Oct 9, 2013 4:44:19 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsExportDictionaryEntity',202618,'Export Dictionary Entity','Export Dictionary Entity','3d4310f3-fec3-4e92-9c4b-c8febabce9e6',TO_DATE('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Oct 9, 2013 4:44:53 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,50005,210878,'Y','N','N',0,'N',1,'N',20,'N','N','Y','d4142a11-aa11-404f-864c-d6ec13f036c6','Y','IsExportDictionaryEntity','N','Export Dictionary Entity','Y',TO_DATE('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202618,'N')
;
-- Oct 9, 2013 4:44:59 PM MYT
-- 1003322 2Pack enhancement for Extension Development
ALTER TABLE AD_Package_Exp ADD IsExportDictionaryEntity CHAR(1) DEFAULT 'N' CHECK (IsExportDictionaryEntity IN ('Y','N')) NOT NULL
;
-- Oct 9, 2013 4:46:02 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',50005,0,'N','N',210878,100,'Y',202525,'N','D','Export Dictionary Entity','1b303e2f-6aad-4a7e-a5e9-61430a74f821','Y','N',100,0,TO_DATE('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),'Y','Y',100,2,'N',0,2,1,'N')
;
-- Oct 9, 2013 4:47:05 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET SeqNo=100, SeqNoGrid=100, XPosition=2,Updated=TO_DATE('2013-10-09 16:47:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50085
;
-- Oct 9, 2013 4:47:22 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET SeqNo=90, SeqNoGrid=90, XPosition=5,Updated=TO_DATE('2013-10-09 16:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
;
-- Oct 9, 2013 5:59:32 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET DisplayLogic='@AD_Client_ID@=0',Updated=TO_DATE('2013-10-09 17:59:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
;
SELECT register_migration_script('201310090926_1003322.sql') FROM dual
;

View File

@ -0,0 +1,11 @@
SET SQLBLANKLINES ON
SET DEFINE OFF
-- 16/10/2013 06:08:38 PM COT
-- IDEMPIERE-1432 Drag and Drop Translation missing
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','(Drag and drop menu item here)',200236,'D','f78e351a-68f9-494d-abd2-421b3ffd4633','DropMenuItemHere','Y',TO_DATE('2013-10-16 18:08:36','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_DATE('2013-10-16 18:08:36','YYYY-MM-DD HH24:MI:SS'),0)
;
SELECT register_migration_script('201310161811_IDEMPIERE-1432.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- Sep 30, 2013 9:38:50 PM COT
-- IDEMPIERE-1408 User window must not show System users
UPDATE AD_Tab SET WhereClause='(AD_User.AD_Client_ID=@#AD_Client_ID@)',Updated=TO_TIMESTAMP('2013-09-30 21:38:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Tab_ID=118
;
SELECT register_migration_script('201309302139_IDEMPIERE-1408.sql') FROM dual
;

View File

@ -0,0 +1,38 @@
-- Oct 9, 2013 4:44:19 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsExportDictionaryEntity',202618,'Export Dictionary Entity','Export Dictionary Entity','3d4310f3-fec3-4e92-9c4b-c8febabce9e6',TO_TIMESTAMP('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
;
-- Oct 9, 2013 4:44:53 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,50005,210878,'Y','N','N',0,'N',1,'N',20,'N','N','Y','d4142a11-aa11-404f-864c-d6ec13f036c6','Y','IsExportDictionaryEntity','N','Export Dictionary Entity','Y',TO_TIMESTAMP('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202618,'N')
;
-- Oct 9, 2013 4:44:59 PM MYT
-- 1003322 2Pack enhancement for Extension Development
ALTER TABLE AD_Package_Exp ADD COLUMN IsExportDictionaryEntity CHAR(1) DEFAULT 'N' CHECK (IsExportDictionaryEntity IN ('Y','N')) NOT NULL
;
-- Oct 9, 2013 4:46:02 PM MYT
-- 1003322 2Pack enhancement for Extension Development
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',50005,0,'N','N',210878,100,'Y',202525,'N','D','Export Dictionary Entity','1b303e2f-6aad-4a7e-a5e9-61430a74f821','Y','N',100,0,TO_TIMESTAMP('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),'Y','Y',100,2,'N',0,2,1,'N')
;
-- Oct 9, 2013 4:47:05 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET SeqNo=100, SeqNoGrid=100, XPosition=2,Updated=TO_TIMESTAMP('2013-10-09 16:47:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50085
;
-- Oct 9, 2013 4:47:22 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET SeqNo=90, SeqNoGrid=90, XPosition=5,Updated=TO_TIMESTAMP('2013-10-09 16:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
;
-- Oct 9, 2013 5:59:32 PM MYT
-- 1003322 2Pack enhancement for Extension Development
UPDATE AD_Field SET DisplayLogic='@AD_Client_ID@=0',Updated=TO_TIMESTAMP('2013-10-09 17:59:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
;
SELECT register_migration_script('201310090926_1003322.sql') FROM dual
;

View File

@ -0,0 +1,8 @@
-- 16/10/2013 06:08:38 PM COT
-- IDEMPIERE-1432 Drag and Drop Translation missing
INSERT INTO AD_Message (MsgType,MsgText,AD_Message_ID,EntityType,AD_Message_UU,Value,IsActive,Updated,CreatedBy,UpdatedBy,AD_Org_ID,Created,AD_Client_ID) VALUES ('I','(Drag and drop menu item here)',200236,'D','f78e351a-68f9-494d-abd2-421b3ffd4633','DropMenuItemHere','Y',TO_TIMESTAMP('2013-10-16 18:08:36','YYYY-MM-DD HH24:MI:SS'),100,100,0,TO_TIMESTAMP('2013-10-16 18:08:36','YYYY-MM-DD HH24:MI:SS'),0)
;
SELECT register_migration_script('201310161811_IDEMPIERE-1432.sql') FROM dual
;

View File

@ -170,6 +170,7 @@ public class Doc_InOut extends Doc
for (int i = 0; i < p_lines.length; i++)
{
DocLine line = p_lines[i];
MProduct product = line.getProduct();
BigDecimal costs = null;
if (!isReversal(line))
{
@ -180,7 +181,6 @@ public class Doc_InOut extends Doc
// end MZ
if (costs == null || costs.signum() == 0) // zero costs OK
{
MProduct product = line.getProduct();
if (product.isStocked())
{
//ok if we have purchased zero cost item from vendor before
@ -229,6 +229,10 @@ public class Doc_InOut extends Doc
if (!dr.updateReverseLine (MInOut.Table_ID,
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
{
if (! product.isStocked()) { // ignore service
fact.remove(dr);
continue;
}
p_Error = "Original Shipment/Receipt not posted yet";
return null;
}
@ -294,6 +298,7 @@ public class Doc_InOut extends Doc
for (int i = 0; i < p_lines.length; i++)
{
DocLine line = p_lines[i];
MProduct product = line.getProduct();
BigDecimal costs = null;
if (!isReversal(line))
{
@ -304,7 +309,6 @@ public class Doc_InOut extends Doc
if (costs == null || costs.signum() == 0) // zero costs OK
{
MProduct product = line.getProduct();
if (product.isStocked())
{
p_Error = "No Costs for " + line.getProduct().getName();
@ -338,6 +342,10 @@ public class Doc_InOut extends Doc
if (!dr.updateReverseLine (MInOut.Table_ID,
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
{
if (! product.isStocked()) { // ignore service
fact.remove(dr);
continue;
}
p_Error = "Original Shipment/Receipt not posted yet";
return null;
}
@ -514,6 +522,10 @@ public class Doc_InOut extends Doc
if (!dr.updateReverseLine (MInOut.Table_ID,
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
{
if (! product.isStocked()) { // ignore service
fact.remove(dr);
continue;
}
p_Error = "Original Receipt not posted yet";
return null;
}
@ -655,6 +667,10 @@ public class Doc_InOut extends Doc
if (!dr.updateReverseLine (MInOut.Table_ID,
m_Reversal_ID, line.getReversalLine_ID(),Env.ONE))
{
if (! product.isStocked()) { // ignore service
fact.remove(dr);
continue;
}
p_Error = "Original Receipt not posted yet";
return null;
}

View File

@ -175,6 +175,15 @@ public interface I_AD_Package_Exp
*/
public boolean isActive();
/** Column name IsExportDictionaryEntity */
public static final String COLUMNNAME_IsExportDictionaryEntity = "IsExportDictionaryEntity";
/** Set Export Dictionary Entity */
public void setIsExportDictionaryEntity (boolean IsExportDictionaryEntity);
/** Get Export Dictionary Entity */
public boolean isExportDictionaryEntity();
/** Column name Name */
public static final String COLUMNNAME_Name = "Name";

View File

@ -87,7 +87,8 @@ public class MQuery implements Serializable
+ " AND pp.AD_Process_ID=i.AD_Process_ID"
+ " AND pp.ColumnName=ip.ParameterName"
+ " AND pp.IsActive='Y'"
+ " AND ip.AD_PInstance_ID=?";
+ " AND ip.AD_PInstance_ID=?"
+ " ORDER BY pp.SeqNo";
else
SQL = "SELECT ip.ParameterName,ip.P_String,ip.P_String_To, ip.P_Number,ip.P_Number_To,"
+ "ip.P_Date,ip.P_Date_To, ip.Info,ip.Info_To, "
@ -99,7 +100,8 @@ public class MQuery implements Serializable
+ " AND pp.IsActive='Y'"
+ " AND pp.AD_Process_Para_ID=ppt.AD_Process_Para_ID"
+ " AND ip.AD_PInstance_ID=?"
+ " AND ppt.AD_Language=?";
+ " AND ppt.AD_Language=?"
+ " ORDER BY pp.SeqNo";
PreparedStatement pstmt = null;
ResultSet rs = null;
try

View File

@ -31,7 +31,7 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
/**
*
*/
private static final long serialVersionUID = 20130626L;
private static final long serialVersionUID = 20131009L;
/** Standard Constructor */
public X_AD_Package_Exp (Properties ctx, int AD_Package_Exp_ID, String trxName)
@ -40,6 +40,8 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
/** if (AD_Package_Exp_ID == 0)
{
setAD_Package_Exp_ID (0);
setIsExportDictionaryEntity (false);
// N
setName (null);
setPK_Version (null);
setProcessing (false);
@ -210,6 +212,27 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
return (String)get_Value(COLUMNNAME_Instructions);
}
/** Set Export Dictionary Entity.
@param IsExportDictionaryEntity Export Dictionary Entity */
public void setIsExportDictionaryEntity (boolean IsExportDictionaryEntity)
{
set_Value (COLUMNNAME_IsExportDictionaryEntity, Boolean.valueOf(IsExportDictionaryEntity));
}
/** Get Export Dictionary Entity.
@return Export Dictionary Entity */
public boolean isExportDictionaryEntity ()
{
Object oo = get_Value(COLUMNNAME_IsExportDictionaryEntity);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
}
/** Set Name.
@param Name
Alphanumeric identifier of the entity

View File

@ -26,8 +26,6 @@ import java.util.Collection;
import java.util.Enumeration;
import java.util.Properties;
import java.util.logging.Level;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.activation.DataHandler;
import javax.activation.DataSource;
@ -1097,14 +1095,20 @@ public final class EMail implements Serializable
/**
* Validate format of an email address
* IDEMPIERE-1409 - based on http://examples.javacodegeeks.com/core-java/util/regex/matcher/validate-email-address-with-java-regular-expression-example/
* IDEMPIERE-1409
* @return true if email has proper format
*/
private static final String EMAIL_PATTERN = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
private static Pattern pattern = Pattern.compile(EMAIL_PATTERN);
public static boolean validate(final String email) {
Matcher matcher = pattern.matcher(email);
return matcher.matches();
try
{
new InternetAddress (email, true);
}
catch (Exception e)
{
log.log(Level.WARNING, email + ": " + e.toString());
return false;
}
return true;
}
/**************************************************************************

View File

@ -12,5 +12,8 @@ Export-Package: compiere.model,
Fragment-Host: org.adempiere.base;bundle-version="0.0.0"
Eclipse-PatchFragment: true
Import-Package: junit.framework;version="3.8.2",
org.junit;version="4.8.2",
org.junit.runner,
org.junit.runners;version="4.8.2",
org.supercsv.io,
org.supercsv.prefs

View File

@ -0,0 +1,98 @@
/**********************************************************************
* This file is part of iDempiere ERP Open Source *
* http://www.idempiere.org *
* *
* Copyright (C) Contributors *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
* as published by the Free Software Foundation; either version 2 *
* of the License, or (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the Free Software *
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
* MA 02110-1301, USA. *
* *
* Contributors: *
* - Carlos Ruiz - globalqss *
**********************************************************************/
package test.functional;
import static org.junit.Assert.assertEquals;
import java.util.Arrays;
import java.util.Collection;
import org.compiere.util.EMail;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
/*
* Unit test sample from http://examples.javacodegeeks.com/core-java/util/regex/matcher/validate-email-address-with-java-regular-expression-example/
*/
@RunWith(Parameterized.class)
public class EmailFormatValidatorTest {
private String arg;
private Boolean expectedValidation;
public EmailFormatValidatorTest(String str, Boolean expectedValidation) {
this.arg = str;
this.expectedValidation = expectedValidation;
}
@BeforeClass
public static void initialize() {
}
@Parameters
public static Collection<Object[]> data() {
Object[][] data = new Object[][] {
{ "javacodegeeks@gmail.com.2j",true },
{ "java@java@oracle.com", false }, // you cannot have @ twice in the address
{ "java!!!@example.com", true },
{ "mysite@.com", false }, // tld cannot start with a dot
{ "javacodegees.com", false }, // must contain a @ character and a tld
{ ".javacodegees.com@at.com", true },
{ "javacodegees..javacom@at.com", true },
{ "javacodegeeks@gmail.com",true },
{ "nikos+mylist@gmail.com", true },
{ "abc.efg-900@gmail-list.com", true },
{ "abc123@example.com.gr", true },
{ "username+detail@example.com", true },
{ "user@example.museum", true },
{ "myemail+sketchysite@gmail.com", true },
{ "micky.o'finnagan@wherever.com", true },
{ "exampleemail@testing.info", true },
{ "marcelo.calbucci%mandic@fapesp.com.br", true },
{ "customer/department=shipping@example.com", true },
{ "$A12345@example.com", true },
{ "!def!xyz%abc@example.com", true },
{ "_somename@example.com", true },
{ "nuñez@globalqss.com", false },
{ "name@tld", true },
{ "john@server.department.company.com", true }
};
return Arrays.asList(data);
}
@Test
public void test() {
Boolean res = EMail.validate(this.arg);
String validv = (res) ? "valid" : "invalid";
System.out.println("EMail "+arg+ " is " + validv);
assertEquals("Result", this.expectedValidation, res);
}
}

View File

@ -111,11 +111,8 @@ public class AdElementHandler extends AbstractElementHandler {
return;
X_AD_Element mAdElement = new X_AD_Element(ctx.ctx, adElement_id, null);
if (ctx.packOut.getFromDate() != null) {
if (mAdElement.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, mAdElement))
return;
}
}
verifyPackOutRequirement(mAdElement);

View File

@ -103,11 +103,8 @@ public class AttachmentElementHandler extends AbstractElementHandler {
MAttachment mAttachment = new MAttachment(ctx.ctx, AD_Attachment_ID, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (mAttachment.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, mAttachment))
return;
}
}
verifyPackOutRequirement(mAttachment);

View File

@ -301,11 +301,8 @@ public class ColumnElementHandler extends AbstractElementHandler {
X_AD_Column m_Column = new X_AD_Column(ctx.ctx, AD_Column_ID,
getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_Column.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Column))
return;
}
}
verifyPackOutRequirement(m_Column);

View File

@ -92,11 +92,8 @@ public class DynValRuleElementHandler extends AbstractElementHandler {
return;
X_AD_Val_Rule m_ValRule = new X_AD_Val_Rule (ctx.ctx, AD_Val_Rule_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_ValRule.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_ValRule))
return;
}
}
verifyPackOutRequirement(m_ValRule);

View File

@ -126,11 +126,8 @@ public class FieldElementHandler extends AbstractElementHandler {
throw new SAXException(e);
}
if (ctx.packOut.getFromDate() != null) {
if (m_Field.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Field))
return;
}
}
verifyPackOutRequirement(m_Field);

View File

@ -116,11 +116,8 @@ public class FieldGroupElementHandler extends AbstractElementHandler {
X_AD_FieldGroup fieldGroup = new X_AD_FieldGroup(ctx.ctx, fieldGroup_id, null);
if (ctx.packOut.getFromDate() != null) {
if (fieldGroup.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, fieldGroup))
return;
}
}
verifyPackOutRequirement(fieldGroup);

View File

@ -70,11 +70,8 @@ public class FormAccessElementHandler extends AbstractElementHandler {
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);

View File

@ -94,11 +94,8 @@ public class FormElementHandler extends AbstractElementHandler {
X_AD_Form m_Form = new X_AD_Form (ctx.ctx, AD_Form_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Form.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Form))
return;
}
}
verifyPackOutRequirement(m_Form);

View File

@ -120,12 +120,7 @@ public class GenericPOElementHandler extends AbstractElementHandler {
if (AD_Client_ID != Env.getAD_Client_ID(ctx.ctx))
continue;
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, po);
if (createElement) {
if (po.get_ID() > 0) {
@ -177,12 +172,7 @@ public class GenericPOElementHandler extends AbstractElementHandler {
if (AD_Client_ID != Env.getAD_Client_ID(ctx.ctx))
continue;
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, po);
if (createElement) {
if (po.get_ID() > 0) {
ElementHandler handler = ctx.packOut.getHandler(po.get_TableName());

View File

@ -97,11 +97,8 @@ public class ImpFormatElementHandler extends AbstractElementHandler {
X_AD_ImpFormat m_ImpFormat = new X_AD_ImpFormat(ctx.ctx, import_id, null);
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (m_ImpFormat.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_ImpFormat))
createElement = false;
}
}
if (createElement) {
verifyPackOutRequirement(m_ImpFormat);

View File

@ -90,11 +90,8 @@ public class ImpFormatRowElementHandler extends AbstractElementHandler {
X_AD_ImpFormat_Row m_ImpFormat_Row = new X_AD_ImpFormat_Row (ctx.ctx, AD_ImpFormat_Row_ID, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_ImpFormat_Row.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_ImpFormat_Row))
return;
}
}
verifyPackOutRequirement(m_ImpFormat_Row);

View File

@ -102,11 +102,8 @@ public class MessageElementHandler extends AbstractElementHandler {
AttributesImpl atts = new AttributesImpl();
X_AD_Message m_Message = new X_AD_Message (ctx.ctx, AD_Message_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Message.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Message))
return;
}
}
verifyPackOutRequirement(m_Message);

View File

@ -94,11 +94,8 @@ public class ModelValidatorElementHandler extends AbstractElementHandler{
X_AD_ModelValidator validator = new X_AD_ModelValidator(ctx.ctx, ad_modelvalidator_id, null);
if (ctx.packOut.getFromDate() != null) {
if (validator.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, validator))
return;
}
}
verifyPackOutRequirement(validator);

View File

@ -109,11 +109,8 @@ public class ModificationElementHandler extends AbstractElementHandler{
X_AD_Modification modification = new X_AD_Modification(ctx.ctx, ad_modification_id, null);
if (ctx.packOut.getFromDate() != null) {
if (modification.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, modification))
return;
}
}
verifyPackOutRequirement(modification);

View File

@ -65,11 +65,8 @@ public class OrgRoleElementHandler extends AbstractElementHandler {
Query query = new Query(ctx.ctx, "AD_Role_OrgAccess", "AD_Role_ID=? and AD_Org_ID=?", getTrxName(ctx));
X_AD_Role_OrgAccess po = query.setParameters(new Object[]{AD_Role_ID, AD_Org_ID}).<X_AD_Role_OrgAccess>first();
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);

View File

@ -112,11 +112,8 @@ public class PreferenceElementHandler extends AbstractElementHandler {
X_AD_Preference m_Preference = new X_AD_Preference(ctx.ctx,
AD_Preference_ID, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_Preference.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Preference))
return;
}
}
verifyPackOutRequirement(m_Preference);

View File

@ -114,12 +114,7 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
}
}
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (m_Printformat.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Printformat);
int size = m_Printformat.getItemCount();
for(int i = 0; i < size; i++) {

View File

@ -96,11 +96,8 @@ public class PrintFormatItemElementHandler extends AbstractElementHandler {
X_AD_PrintFormatItem m_PrintFormatItem = new X_AD_PrintFormatItem(ctx.ctx,
AD_PrintFormatItem_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_PrintFormatItem.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_PrintFormatItem))
return;
}
}
verifyPackOutRequirement(m_PrintFormatItem);

View File

@ -88,11 +88,8 @@ public class PrintPaperElementHandler extends AbstractElementHandler {
X_AD_PrintPaper printPaper = new X_AD_PrintPaper(ctx.ctx,
AD_PrintPaper_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (printPaper.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, printPaper))
return;
}
}
verifyPackOutRequirement(printPaper);

View File

@ -68,11 +68,8 @@ public class ProcessAccessElementHandler extends AbstractElementHandler {
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);

View File

@ -138,13 +138,7 @@ public class ProcessElementHandler extends AbstractElementHandler {
handler.packOut(packOut,document,null,m_Process.getAD_Workflow_ID());
}
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (m_Process.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Process);
if (createElement) {
verifyPackOutRequirement(m_Process);

View File

@ -114,11 +114,8 @@ public class ProcessParaElementHandler extends AbstractElementHandler {
}
}
if (ctx.packOut.getFromDate() != null) {
if (m_Processpara.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Processpara))
return;
}
}
verifyPackOutRequirement(m_Processpara);

View File

@ -114,12 +114,8 @@ public class ReferenceElementHandler extends AbstractElementHandler {
X_AD_Reference m_Reference = new X_AD_Reference(ctx.ctx, Reference_id, getTrxName(ctx));
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (m_Reference.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Reference);
PackOut packOut = ctx.packOut;
packOut.getCtx().ctx.put("Table_Name",X_AD_Reference.Table_Name);
if (createElement) {

View File

@ -97,11 +97,8 @@ public class ReferenceListElementHandler extends AbstractElementHandler {
return;
X_AD_Ref_List m_Ref_List = new X_AD_Ref_List(ctx.ctx, AD_Ref_List_ID,
getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_Ref_List.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Ref_List))
return;
}
}
verifyPackOutRequirement(m_Ref_List);

View File

@ -112,11 +112,8 @@ public class ReferenceTableElementHandler extends AbstractElementHandler {
rs = pstmt.executeQuery();
if (rs.next()) {
X_AD_Ref_Table refTable = new X_AD_Ref_Table(ctx.ctx, rs, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (refTable.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, refTable))
return;
}
}
verifyPackOutRequirement(refTable);

View File

@ -94,11 +94,8 @@ public class ReportViewColElementHandler extends AbstractElementHandler {
X_AD_ReportView_Col m_Reportview_Col = new X_AD_ReportView_Col(ctx.ctx,
AD_ReportView_Col_ID, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_Reportview_Col.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Reportview_Col))
return;
}
}
verifyPackOutRequirement(m_Reportview_Col);

View File

@ -107,12 +107,7 @@ public class ReportViewElementHandler extends AbstractElementHandler {
throw new RuntimeException(e);
}
boolean createElement = true;
if (ctx.packOut.getFromDate() != null) {
if (m_Reportview.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Reportview);
if (createElement) {
verifyPackOutRequirement(m_Reportview);

View File

@ -107,13 +107,8 @@ public class RoleElementHandler extends AbstractElementHandler {
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID+"|"+Role_id))
return;
boolean createElement = true;
X_AD_Role m_Role = new X_AD_Role(ctx.ctx, Role_id, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Role.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Role);
if (createElement) {
verifyPackOutRequirement(m_Role);

View File

@ -108,13 +108,8 @@ public class TabElementHandler extends AbstractElementHandler {
if (ctx.packOut.isExported("AD_Tab_ID"+"|"+AD_Tab_ID))
return;
boolean createElement = true;
X_AD_Tab m_Tab = new X_AD_Tab (ctx.ctx, AD_Tab_ID, getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_Tab.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Tab);
if (createElement) {
verifyPackOutRequirement(m_Tab);
AttributesImpl atts = new AttributesImpl();

View File

@ -149,13 +149,8 @@ public class TableElementHandler extends AbstractElementHandler {
return;
PackOut packOut = ctx.packOut;
AttributesImpl atts = new AttributesImpl();
boolean createElement = true;
X_AD_Table m_Table = new X_AD_Table (ctx.ctx, AD_Table_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Table.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Table);
if (createElement) {
verifyPackOutRequirement(m_Table);
addTypeName(atts, "table");

View File

@ -64,11 +64,8 @@ public class TaskAccessElementHandler extends AbstractElementHandler {
Query query = new Query(ctx.ctx, "AD_Task_Access", "AD_Role_ID=? and AD_Task_ID=?", getTrxName(ctx));
X_AD_Task_Access po = query.setParameters(new Object[]{AD_Role_ID, AD_Task_ID}).first();
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -95,11 +95,8 @@ public class TaskElementHandler extends AbstractElementHandler {
return;
X_AD_Task m_Task = new X_AD_Task(ctx.ctx, AD_Task_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Task.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_Task))
return;
}
}
verifyPackOutRequirement(m_Task);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -69,11 +69,8 @@ public class UserRoleElementHandler extends AbstractElementHandler {
X_AD_User_Roles po = query.setParameters(
new Object[] { AD_User_ID, AD_Role_ID, AD_Org_ID }).first();
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -64,11 +64,8 @@ public class WindowAccessElementHandler extends AbstractElementHandler {
Query query = new Query(ctx.ctx, "AD_Window_Access", "AD_Role_ID=? and AD_Window_ID=?", getTrxName(ctx));
X_AD_Window_Access po = query.setParameters(new Object[]{AD_Role_ID, AD_Window_ID}).first();
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -115,13 +115,8 @@ public class WindowElementHandler extends AbstractElementHandler {
return;
PackOut packOut = ctx.packOut;
boolean createElement = true;
X_AD_Window m_Window = new X_AD_Window(ctx.ctx, AD_Window_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Window.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
createElement = false;
}
}
boolean createElement = isPackOutElement(ctx, m_Window);
//export color
if (m_Window.getAD_Color_ID() > 0) {

View File

@ -67,11 +67,8 @@ public class WorkflowAccessElementHandler extends AbstractElementHandler {
Query query = new Query(ctx.ctx, "AD_Workflow_Access", "AD_Role_ID=? and AD_Workflow_ID=?", getTrxName(ctx));
po = query.setParameters(new Object[]{AD_Role_ID, AD_Workflow_ID}).first();
if (po != null) {
if (ctx.packOut.getFromDate() != null) {
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, po))
return;
}
}
verifyPackOutRequirement(po);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -152,15 +152,10 @@ public class WorkflowElementHandler extends AbstractElementHandler {
int ad_wf_nodenextcondition_id = 0;
AttributesImpl atts = new AttributesImpl();
boolean creatElement = true;
MWorkflow m_Workflow = new MWorkflow(ctx.ctx,
AD_Workflow_ID, null);
if (ctx.packOut.getFromDate() != null) {
if (m_Workflow.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
creatElement = false;
}
}
if (creatElement) {
boolean createElement = isPackOutElement(ctx, m_Workflow);
if (createElement) {
atts.addAttribute("", "", "type", "CDATA", "object");
atts.addAttribute("", "", "type-name", "CDATA", "ad.workflow");
document.startElement("", "", I_AD_Workflow.Table_Name, atts);
@ -213,7 +208,7 @@ public class WorkflowElementHandler extends AbstractElementHandler {
DB.close(rs, pstmt);
DB.close(nodeNextrs, psNodeNext);
DB.close(nodeNConditionrs,psNCondition);
if (creatElement) {
if (createElement) {
document.endElement("", "", MWorkflow.Table_Name);
}
}

View File

@ -109,11 +109,8 @@ public class WorkflowNodeElementHandler extends AbstractElementHandler {
AttributesImpl atts = new AttributesImpl();
MWFNode m_WF_Node = new MWFNode(ctx.ctx, AD_WF_Node_ID,
getTrxName(ctx));
if (ctx.packOut.getFromDate() != null) {
if (m_WF_Node.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_WF_Node))
return;
}
}
verifyPackOutRequirement(m_WF_Node);
addTypeName(atts, "table");
document.startElement("", "", I_AD_WF_Node.Table_Name, atts);

View File

@ -110,11 +110,8 @@ public class WorkflowNodeNextConditionElementHandler extends
MWFNextCondition m_WF_NodeNextCondition = new MWFNextCondition(
ctx.ctx, ad_wf_nodenextcondition_id, null);
if (ctx.packOut.getFromDate() != null) {
if (m_WF_NodeNextCondition.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_WF_NodeNextCondition))
return;
}
}
verifyPackOutRequirement(m_WF_NodeNextCondition);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -95,11 +95,8 @@ public class WorkflowNodeNextElementHandler extends AbstractElementHandler {
MWFNodeNext m_WF_NodeNext = new MWFNodeNext(
ctx.ctx, ad_wf_nodenext_id, null);
if (ctx.packOut.getFromDate() != null) {
if (m_WF_NodeNext.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
if (!isPackOutElement(ctx, m_WF_NodeNext))
return;
}
}
verifyPackOutRequirement(m_WF_NodeNext);
AttributesImpl atts = new AttributesImpl();
addTypeName(atts, "table");

View File

@ -33,6 +33,7 @@ import org.compiere.model.MColumn;
import org.compiere.model.MTable;
import org.compiere.model.PO;
import org.compiere.model.POInfo;
import org.compiere.model.X_AD_EntityType;
import org.compiere.model.X_AD_Package_Imp_Backup;
import org.compiere.model.X_AD_Package_Imp_Detail;
import org.compiere.util.CLogger;
@ -510,4 +511,19 @@ public abstract class AbstractElementHandler implements ElementHandler {
throw new IllegalStateException("2Pack doesn't work with record without official Id and UUID");
}
}
protected boolean isPackOutElement(PIPOContext ctx, PO element) {
if (ctx.packOut.getFromDate() != null) {
if (element.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
return false;
}
}
if (!ctx.packOut.isExportDictionaryEntity() && element.get_ColumnIndex("EntityType") >= 0) {
Object entityType = element.get_Value("EntityType");
if (X_AD_EntityType.ENTITYTYPE_Dictionary.equals(entityType)) {
return false;
}
}
return true;
}
}

View File

@ -109,6 +109,11 @@ public class PackInHandler extends DefaultHandler {
// idempiere
if (qName.equals("idempiere"))
{
String updateDictionary = atts.getValue("UpdateDictionary");
if (updateDictionary != null && updateDictionary.equalsIgnoreCase("true"))
{
m_updateDictionary = true;
}
if (log.isLoggable(Level.INFO)) log.info("idempiere updateMode="+m_updateDictionary);
//check client
@ -292,6 +297,14 @@ public class PackInHandler extends DefaultHandler {
setupHandlers();
} else {
Element e = stack.pop();
if (e.contents != null && e.contents.length() > 0)
{
if (e.contents.toString().length() != e.contents.toString().trim().length())
{
String s = e.contents.toString().trim();
e.contents = new StringBuffer(s);
}
}
if (stack.isEmpty())
{
try {

View File

@ -81,6 +81,7 @@ public class PackOut
private String packoutDirectory;
private PIPOContext pipoContext = new PIPOContext();
private Timestamp fromDate;
private boolean isExportDictionaryEntity = false;
public static final int MAX_OFFICIAL_ID = MTable.MAX_OFFICIAL_ID;
@ -218,6 +219,7 @@ public class PackOut
atts.addAttribute("","","CreatedDate","CDATA",packoutDocument.getCreated().toString());
atts.addAttribute("","","UpdatedDate","CDATA",packoutDocument.getUpdated().toString());
atts.addAttribute("","","PackOutVersion","CDATA",PackOutVersion);
atts.addAttribute("","","UpdateDictionary","CDATA", isExportDictionaryEntity ? "true" : "false");
MClient client = MClient.get(pipoContext.ctx);
StringBuffer sb = new StringBuffer ()
@ -465,4 +467,11 @@ public class PackOut
return false;
}
public boolean isExportDictionaryEntity() {
return isExportDictionaryEntity;
}
public void setExportDictionaryEntity(boolean isExportDictionaryEntity) {
this.isExportDictionaryEntity = isExportDictionaryEntity;
}
} // PackOut

View File

@ -136,6 +136,7 @@ public class PackOutProcess extends SvrProcess
packOut.setFromDate((Timestamp) dateFromValue);
}
packOut.setExportDictionaryEntity(packageExp.isExportDictionaryEntity());
packOut.export(packoutDirectory, null, packoutDocument, packoutItems, get_TrxName());
processedCount = packOut.getExportCount();
exportFile = packOut.getExportFile();

View File

@ -125,8 +125,6 @@ public class ReportStarter implements ProcessCall, ClientProcess
private static CLogger log = CLogger.getCLogger(ReportStarter.class);
private static File REPORT_HOME = null;
private static JasperPrint jasperPrint;
static {
String reportPath = System.getProperty("org.compiere.report.path");
if (reportPath == null) {
@ -749,9 +747,6 @@ public class ReportStarter implements ProcessCall, ClientProcess
} catch (SQLException e) {
}
}
if (virtualizer != null) {
virtualizer.cleanup();
}
}
}
@ -763,11 +758,6 @@ public class ReportStarter implements ProcessCall, ClientProcess
return true;
}
public static JasperPrint getJasperPrint()
{
return jasperPrint;
}
private String makePrefix(String name) {
StringBuilder prefix = new StringBuilder();
char[] nameArray = name.toCharArray();

View File

@ -51,6 +51,7 @@ import org.adempiere.webui.editor.WebEditorFactory;
import org.adempiere.webui.event.ContextMenuListener;
import org.adempiere.webui.panel.HelpController;
import org.adempiere.webui.util.GridTabDataBinder;
import org.adempiere.webui.util.TreeUtils;
import org.adempiere.webui.window.FDialog;
import org.compiere.model.DataStatusEvent;
import org.compiere.model.DataStatusListener;
@ -1304,7 +1305,10 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer
if (recordId <= 0) return;
//force on init render
if (TreeUtils.isOnInitRenderPosted(treePanel.getTree()) || treePanel.getTree().getTreechildren() == null
|| treePanel.getTree().getTreechildren().getItemCount() == 0) {
treePanel.getTree().onInitRender();
}
SimpleTreeModel model = (SimpleTreeModel)(TreeModel<?>) treePanel.getTree().getModel();
if (treePanel.getTree().getSelectedItem() != null) {

View File

@ -134,7 +134,7 @@ public class DPFavourites extends DashboardPanel implements EventListener<Event>
}
}
lblMsg = new Label("(Drag and drop menu item here)");
lblMsg = new Label(Msg.getMsg(Env.getCtx(), "DropMenuItemHere"));
if(bxFav.getChildren().isEmpty()) bxFav.appendChild(lblMsg);
}

View File

@ -99,7 +99,7 @@ public class LoginPanel extends Window implements EventListener<Event>
/**
*
*/
private static final long serialVersionUID = -3317111366328505399L;
private static final long serialVersionUID = -3361823499124119753L;
private static LogAuthFailure logAuthFailure = new LogAuthFailure();
@ -120,6 +120,7 @@ public class LoginPanel extends Window implements EventListener<Event>
protected A btnResetPassword;
protected ConfirmPanel pnlButtons;
protected boolean email_login = MSysConfig.getBooleanValue(MSysConfig.USE_EMAIL_FOR_LOGIN, false);
protected String validLstLanguage = null;
public LoginPanel(Properties ctx, LoginWindow loginWindow)
{
@ -379,6 +380,10 @@ public class LoginPanel extends Window implements EventListener<Event>
btnResetPassword = new A(Msg.getMsg(Language.getBaseAD_Language(), "ForgotMyPassword"));
btnResetPassword.setId("btnResetPassword");
if (lstLanguage.getItems().size() > 0){
validLstLanguage = (String)lstLanguage.getItems().get(0).getLabel();
}
}
public void onEvent(Event event)
@ -396,8 +401,13 @@ public class LoginPanel extends Window implements EventListener<Event>
else if (event.getName().equals(Events.ON_SELECT))
{
if(eventComp.getId().equals(lstLanguage.getId())) {
String langName = (String) lstLanguage.getSelectedItem().getLabel();
languageChanged(langName);
if (lstLanguage.getSelectedItem() == null){
lstLanguage.setValue(validLstLanguage);
}else{
validLstLanguage = lstLanguage.getSelectedItem().getLabel();
}
languageChanged(validLstLanguage);
}
}
else if (event.getTarget() == btnResetPassword)