IDEMPIERE-1831 Missing AD_Preference_UU in some places+Patch / based on patch from Jan Thielemann

This commit is contained in:
Carlos Ruiz 2014-03-19 12:55:26 -05:00
parent 39affc8346
commit f821b5fbed
3 changed files with 10 additions and 7 deletions

View File

@ -25,6 +25,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.Properties; import java.util.Properties;
import java.util.UUID;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.exceptions.AdempiereException; import org.adempiere.exceptions.AdempiereException;
@ -1352,9 +1353,9 @@ public final class MSetup
{ {
int AD_Preference_ID = getNextID(getAD_Client_ID(), "AD_Preference"); int AD_Preference_ID = getNextID(getAD_Client_ID(), "AD_Preference");
StringBuilder sqlCmd = new StringBuilder ("INSERT INTO AD_Preference "); StringBuilder sqlCmd = new StringBuilder ("INSERT INTO AD_Preference ");
sqlCmd.append("(AD_Preference_ID,").append(m_stdColumns).append(","); sqlCmd.append("(AD_Preference_ID,").append("AD_Preference_UU,").append(m_stdColumns).append(",");
sqlCmd.append("Attribute,Value,AD_Window_ID) VALUES ("); sqlCmd.append("Attribute,Value,AD_Window_ID) VALUES (");
sqlCmd.append(AD_Preference_ID).append(",").append(m_stdValues).append(","); sqlCmd.append(AD_Preference_ID).append(",").append(DB.TO_STRING(UUID.randomUUID().toString())).append(",").append(m_stdValues).append(",");
sqlCmd.append("'").append(Attribute).append("','").append(Value).append("',"); sqlCmd.append("'").append(Attribute).append("','").append(Value).append("',");
if (AD_Window_ID == 0) if (AD_Window_ID == 0)
sqlCmd.append("NULL)"); sqlCmd.append("NULL)");

View File

@ -25,6 +25,7 @@ import java.awt.Insets;
import java.awt.event.ActionEvent; import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import java.awt.event.ActionListener;
import java.util.Properties; import java.util.Properties;
import java.util.UUID;
import java.util.logging.Level; import java.util.logging.Level;
import javax.swing.BorderFactory; import javax.swing.BorderFactory;
@ -494,9 +495,9 @@ public class ValuePreference extends CDialog
int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null); int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null);
// //
StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference (" StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference ("
+ "AD_Preference_ID, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy," + "AD_Preference_ID, AD_Preference_UU, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy,"
+ "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES ("); + "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES (");
sql.append(AD_Preference_ID).append(",").append(Client_ID).append(",").append(Org_ID) sql.append(AD_Preference_ID).append(",").append(DB.TO_STRING(UUID.randomUUID().toString())).append(",").append(Client_ID).append(",").append(Org_ID)
.append(", 'Y',SysDate,").append(m_AD_User_ID).append(",SysDate,").append(m_AD_User_ID).append(", "); .append(", 'Y',SysDate,").append(m_AD_User_ID).append(",SysDate,").append(m_AD_User_ID).append(", ");
if (cbWindow.isSelected()) if (cbWindow.isSelected())
sql.append(m_AD_Window_ID).append(","); sql.append(m_AD_Window_ID).append(",");

View File

@ -17,6 +17,7 @@
package org.adempiere.webui; package org.adempiere.webui;
import java.util.Properties; import java.util.Properties;
import java.util.UUID;
import java.util.logging.Level; import java.util.logging.Level;
import org.adempiere.webui.adwindow.ADWindow; import org.adempiere.webui.adwindow.ADWindow;
@ -65,7 +66,7 @@ public class ValuePreference extends Window implements EventListener<Event>
/** /**
* *
*/ */
private static final long serialVersionUID = -8490929927886340040L; private static final long serialVersionUID = 471820722501563271L;
/** /**
* Factory * Factory
@ -533,9 +534,9 @@ public class ValuePreference extends Window implements EventListener<Event>
int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null); int AD_Preference_ID = DB.getNextID(m_ctx, "AD_Preference", null);
// //
StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference (" StringBuilder sql = new StringBuilder ("INSERT INTO AD_Preference ("
+ "AD_Preference_ID, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy," + "AD_Preference_ID, AD_Preference_UU, AD_Client_ID, AD_Org_ID, IsActive, Created,CreatedBy,Updated,UpdatedBy,"
+ "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES ("); + "AD_Window_ID, AD_User_ID, Attribute, Value) VALUES (");
sql.append(AD_Preference_ID).append(",").append(Client_ID).append(",").append(Org_ID) sql.append(AD_Preference_ID).append(",").append(DB.TO_STRING(UUID.randomUUID().toString())).append(",").append(Client_ID).append(",").append(Org_ID)
.append(", 'Y',SysDate,").append(m_AD_User_ID).append(",SysDate,").append(m_AD_User_ID).append(", "); .append(", 'Y',SysDate,").append(m_AD_User_ID).append(",SysDate,").append(m_AD_User_ID).append(", ");
if (cbWindow.isChecked()) if (cbWindow.isChecked())
sql.append(m_AD_Window_ID).append(","); sql.append(m_AD_Window_ID).append(",");