commit/iDempiere: 2 new changesets

46 views
Skip to first unread message

commits...@bitbucket.org

unread,
Apr 7, 2015, 10:07:00 PM4/7/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/9cd67c579757/
Changeset: 9cd67c579757
Branch: release-2.1
User: hieplq
Date: 2015-04-04 06:37:51+00:00
Summary: IDEMPIERE-2544:to more warning compiler hidden good warning
leak resource
Affected #: 7 files

diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java
--- a/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ReplicationLocal.java
@@ -353,8 +353,9 @@
// no keys - search for parents
if (list.size() == 0)
{
- DB.close(rs);
+ DB.close(rs, pstmt);
rs = null;
+ pstmt = null;
sql = "SELECT ColumnName FROM AD_Column "
+ "WHERE AD_Table_ID=?"
+ " AND IsParent='Y'";

diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.base/src/org/compiere/impexp/OFXFileBankStatementLoader.java
--- a/org.adempiere.base/src/org/compiere/impexp/OFXFileBankStatementLoader.java
+++ b/org.adempiere.base/src/org/compiere/impexp/OFXFileBankStatementLoader.java
@@ -17,6 +17,7 @@
package org.compiere.impexp;

import java.io.FileInputStream;
+import java.io.IOException;

import org.compiere.model.MBankStatementLoader;
import org.xml.sax.SAXException;
@@ -71,6 +72,13 @@
{
m_errorMessage = new StringBuffer("ErrorReadingData");
m_errorDescription = new StringBuffer();
+ }finally{
+ if (m_stream != null)
+ try {
+ m_stream.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
}

return result;

diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.base/src/org/compiere/print/ReportEngine.java
--- a/org.adempiere.base/src/org/compiere/print/ReportEngine.java
+++ b/org.adempiere.base/src/org/compiere/print/ReportEngine.java
@@ -1625,6 +1625,8 @@
.append("FROM C_DocType dt, C_Order o ")
.append("WHERE o.C_DocTypeTarget_ID=dt.C_DocType_ID")
.append(" AND o.C_Order_ID=?");
+ DB.close(rs, pstmt);
+ rs = null; pstmt = null;
pstmt = DB.prepareStatement(sql.toString(), null);
pstmt.setInt(1, C_Order_ID);
rs = pstmt.executeQuery();

diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.base/src/org/compiere/process/FactReconciliation.java
--- a/org.adempiere.base/src/org/compiere/process/FactReconciliation.java
+++ b/org.adempiere.base/src/org/compiere/process/FactReconciliation.java
@@ -2,7 +2,6 @@

import java.math.BigDecimal;
import java.sql.PreparedStatement;
-import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.util.logging.Level;
@@ -51,9 +50,7 @@
*/
protected String doIt()
{
-
PreparedStatement pstmt = null;
- ResultSet rs = null;

String sql = "INSERT into T_Reconciliation " +
"(AD_Client_ID, AD_Org_ID, Created, CreatedBy, Updated, UpdatedBy, " +
@@ -69,8 +66,6 @@

try
{
-
-
pstmt = DB.prepareStatement(sql, get_TrxName());
pstmt.setInt(1, getAD_PInstance_ID());
pstmt.setInt(2, p_Account_ID);
@@ -88,25 +83,26 @@
" AND r.AD_PInstance_ID = t.AD_PInstance_ID) = 0 " +
"AND t.AD_PInstance_ID = ?";

- pstmt = DB.prepareStatement(sql, get_TrxName());
- pstmt.setInt(1, getAD_PInstance_ID());
- count = pstmt.executeUpdate();
- result = Msg.getMsg(getCtx(), "@Deleted@") + ": " + count;
+ DB.close(pstmt);
+ pstmt = null;
+ pstmt = DB.prepareStatement(sql, get_TrxName());
+ pstmt.setInt(1, getAD_PInstance_ID());
+ count = pstmt.executeUpdate();
+ result = Msg.getMsg(getCtx(), "@Deleted@") + ": " + count;
+
+ if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);

- if (log.isLoggable(Level.FINE))log.log(Level.FINE, result);
-
-
- }
- catch (SQLException e)
- {
- log.log(Level.SEVERE, sql, e);
- return e.getLocalizedMessage();
- }
- finally
- {
- DB.close(rs, pstmt);
- rs = null; pstmt = null;
- }
+ }
+ catch (SQLException e)
+ {
+ log.log(Level.SEVERE, sql, e);
+ return e.getLocalizedMessage();
+ }
+ finally
+ {
+ DB.close(pstmt);
+ pstmt = null;
+ }

if (log.isLoggable(Level.FINE)) log.fine((System.currentTimeMillis() - m_start) + " ms");
return "";

diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.base/src/org/compiere/tools/Strip.java
--- a/org.adempiere.base/src/org/compiere/tools/Strip.java
+++ b/org.adempiere.base/src/org/compiere/tools/Strip.java
@@ -18,7 +18,6 @@

import java.io.File;
import java.io.FileInputStream;
-import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

@@ -165,32 +164,15 @@
private boolean copy (File infile, File outfile)
{
FileInputStream fis = null;
- try
- {
+ FileOutputStream fos = null;
+ try{
fis = new FileInputStream(infile);
- }
- catch (FileNotFoundException fnfe)
- {
- System.err.println(fnfe);
- return false;
- }
- //
- FileOutputStream fos = null;
- try
- {
- fos = new FileOutputStream(outfile, false); // no append
- }
- catch (FileNotFoundException fnfe)
- {
- System.err.println(fnfe);
- return false;
- }
-
- int noIn = 0;
- int noOut = 0;
- int noLines = 1;
- try
- {
+ fos = new FileOutputStream(outfile, false); // no append
+
+ int noIn = 0;
+ int noOut = 0;
+ int noLines = 1;
+
int c;
while ((c = fis.read()) != -1)
{
@@ -203,15 +185,24 @@
if (c == 13) // cr
noLines++;
}
- fis.close();
- fos.close();
- }
- catch (IOException ioe)
+ System.out.println(" read: " + noIn + ", written: " + noOut + " - lines: " + noLines);
+ }catch (IOException ioe)
{
System.err.println(ioe);
return false;
+ }finally{
+ if (fos != null)
+ try {
+ fos.close();
+ } catch (IOException e) {
+ }
+ if (fis != null)
+ try {
+ fis.close();
+ } catch (IOException e) {
+ }
+
}
- System.out.println(" read: " + noIn + ", written: " + noOut + " - lines: " + noLines);
return true;
} // stripIt


diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java
--- a/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java
+++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PackIn.java
@@ -233,20 +233,25 @@
ZipFile zf = new ZipFile(m_packageDirectory+File.separator+"blobs"+File.separator+fileName);
Enumeration<?> e = zf.entries();
ArrayList<File> files = new ArrayList<File>();
- while (e.hasMoreElements()) {
- ZipEntry ze = (ZipEntry) e.nextElement();
- File file = new File(m_packageDirectory + File.separator + ze.getName());
- FileOutputStream fout = new FileOutputStream(file);
- InputStream in = zf.getInputStream(ze);
- for (int c = in.read(); c != -1; c = in.read()) {
- fout.write(c);
+ File[] retValue = null;
+ try{
+ while (e.hasMoreElements()) {
+ ZipEntry ze = (ZipEntry) e.nextElement();
+ File file = new File(m_packageDirectory + File.separator + ze.getName());
+ FileOutputStream fout = new FileOutputStream(file);
+ InputStream in = zf.getInputStream(ze);
+ for (int c = in.read(); c != -1; c = in.read()) {
+ fout.write(c);
+ }
+ in.close();
+ fout.close();
+ files.add(file);
}
- in.close();
- fout.close();
- files.add(file);
+ retValue = new File[files.size()];
+ files.toArray(retValue);
+ }catch (Exception ex){
+ zf.close();
}
- File[] retValue = new File[files.size()];
- files.toArray(retValue);
return retValue;
}


diff -r b3a78089180b1d1db708c6bea60c8f4e74c44c86 -r 9cd67c579757014eecd99c0520700b54a24f3a9f org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/action/CSVImportAction.java
@@ -378,12 +378,23 @@
} catch (IOException e) {
throw new AdempiereException(e);
} finally {
- try {
- reader.close();
- in.close();
- if (bw != null)
+ if (in != null)
+ try {
+ in.close();
+ } catch (IOException e) {
+ }
+
+ if (bw != null)
+ try {
bw.close();
- } catch (IOException e) {}
+ } catch (IOException e) {
+ }
+
+ if (reader != null)
+ try {
+ reader.close();
+ } catch (IOException e) {
+ }
}
return is;
}


https://bitbucket.org/idempiere/idempiere/commits/44e38bb4ad1c/
Changeset: 44e38bb4ad1c
Branch: release-2.1
User: globalqss
Date: 2015-04-08 02:06:24+00:00
Summary: IDEMPIERE-2447 Migration script from packin adding unnecessary updates / fix issue -> Unknown column reference type=null
Affected #: 1 file

diff -r 9cd67c579757014eecd99c0520700b54a24f3a9f -r 44e38bb4ad1c9fa6abed4e2f44c4bb7e1d0601fb org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java
--- a/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java
+++ b/org.adempiere.pipo/src/org/adempiere/pipo2/PoFiller.java
@@ -204,11 +204,13 @@
{
Element orgElement = element.properties.get("AD_Org_ID");
String sAD_Org_ID = orgElement != null ? orgElement.contents.toString() : null;
- if (sAD_Org_ID != null && sAD_Org_ID.equals("0") && po.getAD_Org_ID() != 0)
- po.setAD_Org_ID(0);
- else if (sAD_Org_ID != null && sAD_Org_ID.equals("@AD_Org_ID@"))
+ if (sAD_Org_ID != null && sAD_Org_ID.equals("0")) {
+ if (po.getAD_Org_ID() != 0) {
+ po.setAD_Org_ID(0);
+ }
+ } else if (sAD_Org_ID != null && sAD_Org_ID.equals("@AD_Org_ID@")) {
po.setAD_Org_ID(Env.getAD_Org_ID(ctx.ctx));
- else {
+ } else {
if (setTableReference("AD_Client_ID") >= 0)
setTableReference("AD_Org_ID");
}

Repository URL: https://bitbucket.org/idempiere/idempiere/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.

commits...@bitbucket.org

unread,
Apr 8, 2015, 11:16:17 AM4/8/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/fadbf6bea764/
Changeset: fadbf6bea764
Branch: release-2.1
User: hieplq
Date: 2015-04-07 19:11:46+00:00
Summary: IDEMPIERE-2565:NPE when run init client without input city of country has "Allow Cities out of List" = false
Affected #: 1 file

diff -r 4199d3ac468015ad478b7473e09c073216c327c3 -r fadbf6bea7641377be963064715dd7dbe4f4b358 org.adempiere.base/src/org/compiere/model/MLocation.java
--- a/org.adempiere.base/src/org/compiere/model/MLocation.java
+++ b/org.adempiere.base/src/org/compiere/model/MLocation.java
@@ -439,7 +439,7 @@
public boolean isAddressLinesReverse()
{
// Local
- if (getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID())
+ if (MCountry.getDefault(getCtx()) != null && getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID())
return getCountry().isAddressLinesLocalReverse();
return getCountry().isAddressLinesReverse();
} // isAddressLinesReverse


https://bitbucket.org/idempiere/idempiere/commits/2a9e28220570/
Changeset: 2a9e28220570
Branch: release-2.1
User: globalqss
Date: 2015-04-08 15:15:57+00:00
Summary: IDEMPIERE-2565 - found transaction not rolled back when initial client setup was failing with an exception
Affected #: 2 files

diff -r fadbf6bea7641377be963064715dd7dbe4f4b358 -r 2a9e28220570cad335718cd5624a977fb9ea4478 org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java
--- a/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/InitialClientSetup.java
@@ -257,34 +257,38 @@

// Process
MSetup ms = new MSetup(Env.getCtx(), WINDOW_THIS_PROCESS);
+ try {
+ if (! ms.createClient(p_ClientName, p_OrgValue, p_OrgName, p_AdminUserName, p_NormalUserName
+ , p_Phone, p_Phone2, p_Fax, p_EMail, p_TaxID, p_AdminUserEmail, p_NormalUserEmail)) {
+ ms.rollback();
+ throw new AdempiereException("Create client failed");
+ }
+
+ addLog(ms.getInfo());

- if (! ms.createClient(p_ClientName, p_OrgValue, p_OrgName, p_AdminUserName, p_NormalUserName
- , p_Phone, p_Phone2, p_Fax, p_EMail, p_TaxID, p_AdminUserEmail, p_NormalUserEmail)) {
+ // Generate Accounting
+ MCurrency currency = MCurrency.get(getCtx(), p_C_Currency_ID);
+ KeyNamePair currency_kp = new KeyNamePair(p_C_Currency_ID, currency.getDescription());
+ if (!ms.createAccounting(currency_kp,
+ p_IsUseProductDimension, p_IsUseBPDimension, p_IsUseProjectDimension, p_IsUseCampaignDimension, p_IsUseSalesRegionDimension, p_IsUseActivityDimension,
+ coaFile, p_UseDefaultCoA, p_InactivateDefaults)) {
+ ms.rollback();
+ throw new AdempiereException("@AccountSetupError@");
+ }
+
+ // Generate Entities
+ if (!ms.createEntities(p_C_Country_ID, p_CityName, p_C_Region_ID, p_C_Currency_ID, p_Postal, p_Address1)) {
+ ms.rollback();
+ throw new AdempiereException("@AccountSetupError@");
+ }
+ addLog(ms.getInfo());
+
+ // Create Print Documents
+ PrintUtil.setupPrintForm(ms.getAD_Client_ID());
+ } catch (Exception e) {
ms.rollback();
- throw new AdempiereException("Create client failed");
+ throw e;
}
-
- addLog(ms.getInfo());
-
- // Generate Accounting
- MCurrency currency = MCurrency.get(getCtx(), p_C_Currency_ID);
- KeyNamePair currency_kp = new KeyNamePair(p_C_Currency_ID, currency.getDescription());
- if (!ms.createAccounting(currency_kp,
- p_IsUseProductDimension, p_IsUseBPDimension, p_IsUseProjectDimension, p_IsUseCampaignDimension, p_IsUseSalesRegionDimension, p_IsUseActivityDimension,
- coaFile, p_UseDefaultCoA, p_InactivateDefaults)) {
- ms.rollback();
- throw new AdempiereException("@AccountSetupError@");
- }
-
- // Generate Entities
- if (!ms.createEntities(p_C_Country_ID, p_CityName, p_C_Region_ID, p_C_Currency_ID, p_Postal, p_Address1)) {
- ms.rollback();
- throw new AdempiereException("@AccountSetupError@");
- }
- addLog(ms.getInfo());
-
- // Create Print Documents
- PrintUtil.setupPrintForm(ms.getAD_Client_ID());

return "@OK@";
}

diff -r fadbf6bea7641377be963064715dd7dbe4f4b358 -r 2a9e28220570cad335718cd5624a977fb9ea4478 org.adempiere.base/src/org/compiere/model/MLocation.java
--- a/org.adempiere.base/src/org/compiere/model/MLocation.java
+++ b/org.adempiere.base/src/org/compiere/model/MLocation.java
@@ -465,7 +465,7 @@
if (c == null)
return "CountryNotFound";

- boolean local = getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID();
+ boolean local = MCountry.getDefault(getCtx()) != null && getC_Country_ID() == MCountry.getDefault(getCtx()).getC_Country_ID();
String inStr = local ? c.getDisplaySequenceLocal() : c.getDisplaySequence();
StringBuilder outStr = new StringBuilder();

commits...@bitbucket.org

unread,
Apr 8, 2015, 11:41:41 AM4/8/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/3b73421b21e2/
Changeset: 3b73421b21e2
Branch: development
User: globalqss
Date: 2015-04-08 15:33:31+00:00
Summary: IDEMPIERE-2554 Mail : add acknowledgement of receipt - minor peer review serialVersionUID
Affected #: 2 files

diff -r 3b5a8fae85f24ed9aac8485d40c3fb35f39adb2e -r 3b73421b21e296257ff59da5d312429b3d3ec99a org.adempiere.base/src/org/compiere/util/EMail.java
--- a/org.adempiere.base/src/org/compiere/util/EMail.java
+++ b/org.adempiere.base/src/org/compiere/util/EMail.java
@@ -72,7 +72,7 @@
/**
*
*/
- private static final long serialVersionUID = -5857825644737211294L;
+ private static final long serialVersionUID = 955264336741872361L;

//use in server bean
public final static String HTML_MAIL_MARKER = "ContentType=text/html;";

diff -r 3b5a8fae85f24ed9aac8485d40c3fb35f39adb2e -r 3b73421b21e296257ff59da5d312429b3d3ec99a org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java
@@ -98,7 +98,7 @@
/**
*
*/
- private static final long serialVersionUID = 4540369233682337505L;
+ private static final long serialVersionUID = -3675260492572002393L;

/**
* EMail Dialog


https://bitbucket.org/idempiere/idempiere/commits/2d379de481ee/
Changeset: 2d379de481ee
Branch: development
User: hieplq
Date: 2015-04-07 04:58:18+00:00
Summary: IDEMPIERE-2563:packout with datatype without sql make NPE
Affected #: 1 file

diff -r 3b73421b21e296257ff59da5d312429b3d3ec99a -r 2d379de481ee69be1d9f99c7e0545578508e312e org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java
--- a/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java
+++ b/org.adempiere.pipo.handlers/src/org/adempiere/pipo2/handler/GenericPOElementHandler.java
@@ -255,6 +255,10 @@
{
tableId = (Integer)detail.getProperty(DataElementParameters.AD_TABLE_ID);
sql = (String)detail.getProperty(DataElementParameters.SQL_STATEMENT);
+ if (sql == null){
+ m_tableName = MTable.get(packout.getCtx().ctx, tableId).getTableName();
+ sql = "SELECT * FROM " + m_tableName;
+ }
}
else
{

commits...@bitbucket.org

unread,
Apr 12, 2015, 3:57:21 PM4/12/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/be686a00d659/
Changeset: be686a00d659
Branch: release-2.1
User: michal_zilincar
Date: 2015-04-12 19:28:09+00:00
Summary: IDEMPIERE-2575 BOM functionality sales order
Affected #: 1 file

diff -r 3db395d67274df61b00eff1ffd49c0b5c00e042d -r be686a00d659be90b9a4b1fd3d016deb00036031 org.adempiere.base/src/org/compiere/model/MOrder.java
--- a/org.adempiere.base/src/org/compiere/model/MOrder.java
+++ b/org.adempiere.base/src/org/compiere/model/MOrder.java
@@ -1605,7 +1605,7 @@
// New Lines
int lineNo = line.getLine ();
//find default BOM with valid dates and to this product
- MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName());
+ /*/MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDatePromised(), get_TrxName());
if(bom != null)
{
MPPProductBOMLine[] bomlines = bom.getLines(getDatePromised());
@@ -1624,30 +1624,30 @@
newLine.setPrice ();
newLine.save (get_TrxName());
}
- }
+ } */

- /*MProductBOM[] boms = MProductBOM.getBOMLines (product);
+ MProductBOM[] boms = MProductBOM.getBOMLines (product);
for (int j = 0; j < boms.length; j++)
{
- //MProductBOM bom = boms[j];
- MPPProductBOMLine bom = boms[j];
+ MProductBOM bom = boms[j];
+ //MPPProductBOMLine bom = boms[j];
MOrderLine newLine = new MOrderLine (this);
newLine.setLine (++lineNo);
//newLine.setM_Product_ID (bom.getProduct ()
// .getM_Product_ID ());
newLine.setM_Product_ID (bom.getM_Product_ID ());
- //newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
- newLine.setC_UOM_ID (bom.getC_UOM_ID ());
+ newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
+ //newLine.setC_UOM_ID (bom.getC_UOM_ID ());
+ newLine.setQty (line.getQtyOrdered ().multiply (
+ bom.getBOMQty ()));
//newLine.setQty (line.getQtyOrdered ().multiply (
- // bom.getBOMQty ()));
- newLine.setQty (line.getQtyOrdered ().multiply (
- bom.getQtyBOM()));
+ // bom.getQtyBOM()));
if (bom.getDescription () != null)
newLine.setDescription (bom.getDescription ());
//
newLine.setPrice ();
newLine.save (get_TrxName());
- }*/
+ }

// Convert into Comment Line
line.setM_Product_ID (0);


https://bitbucket.org/idempiere/idempiere/commits/0554b1c22bff/
Changeset: 0554b1c22bff
Branch: release-2.1
User: globalqss
Date: 2015-04-12 19:57:07+00:00
Summary: IDEMPIERE-2575 BOM functionality sales order - implement same in MInvoice
Affected #: 2 files

diff -r be686a00d659be90b9a4b1fd3d016deb00036031 -r 0554b1c22bffec6d0d7a2c5ef34681fa178413a5 org.adempiere.base/src/org/compiere/model/MInvoice.java
--- a/org.adempiere.base/src/org/compiere/model/MInvoice.java
+++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java
@@ -45,8 +45,6 @@
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
-import org.eevolution.model.MPPProductBOM;
-import org.eevolution.model.MPPProductBOMLine;


/**
@@ -1538,7 +1536,7 @@
int lineNo = line.getLine ();

//find default BOM with valid dates and to this product
- MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDateInvoiced(), get_TrxName());
+ /*MPPProductBOM bom = MPPProductBOM.get(product, getAD_Org_ID(),getDateInvoiced(), get_TrxName());
if(bom != null)
{
MPPProductBOMLine[] bomlines = bom.getLines(getDateInvoiced());
@@ -1557,25 +1555,20 @@
newLine.setPrice ();
newLine.saveEx (get_TrxName());
}
+ }*/
+
+ for (MProductBOM bom : MProductBOM.getBOMLines(product))
+ {
+ MInvoiceLine newLine = new MInvoiceLine(this);
+ newLine.setLine(++lineNo);
+ newLine.setM_Product_ID(bom.getM_ProductBOM_ID(), true);
+ newLine.setQty(line.getQtyInvoiced().multiply(bom.getBOMQty()));
+ if (bom.getDescription() != null)
+ newLine.setDescription(bom.getDescription());
+ newLine.setPrice();
+ newLine.save(get_TrxName());
}

- /*MProductBOM[] boms = MProductBOM.getBOMLines (product);
- for (int j = 0; j < boms.length; j++)
- {
- MProductBOM bom = boms[j];
- MInvoiceLine newLine = new MInvoiceLine (this);
- newLine.setLine (++lineNo);
- newLine.setM_Product_ID (bom.getProduct().getM_Product_ID(),
- bom.getProduct().getC_UOM_ID());
- newLine.setQty (line.getQtyInvoiced().multiply(
- bom.getBOMQty ())); // Invoiced/Entered
- if (bom.getDescription () != null)
- newLine.setDescription (bom.getDescription ());
- //
- newLine.setPrice ();
- newLine.save (get_TrxName());
- }*/
-
// Convert into Comment Line
line.setM_Product_ID (0);
line.setM_AttributeSetInstance_ID (0);

diff -r be686a00d659be90b9a4b1fd3d016deb00036031 -r 0554b1c22bffec6d0d7a2c5ef34681fa178413a5 org.adempiere.base/src/org/compiere/model/MOrder.java
--- a/org.adempiere.base/src/org/compiere/model/MOrder.java
+++ b/org.adempiere.base/src/org/compiere/model/MOrder.java
@@ -47,8 +47,6 @@
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.compiere.util.Util;
-import org.eevolution.model.MPPProductBOM;
-import org.eevolution.model.MPPProductBOMLine;


/**
@@ -1625,28 +1623,17 @@
newLine.save (get_TrxName());
}
} */
-
- MProductBOM[] boms = MProductBOM.getBOMLines (product);
- for (int j = 0; j < boms.length; j++)
+
+ for (MProductBOM bom : MProductBOM.getBOMLines(product))
{
- MProductBOM bom = boms[j];
- //MPPProductBOMLine bom = boms[j];
- MOrderLine newLine = new MOrderLine (this);
- newLine.setLine (++lineNo);
- //newLine.setM_Product_ID (bom.getProduct ()
- // .getM_Product_ID ());
- newLine.setM_Product_ID (bom.getM_Product_ID ());
- newLine.setC_UOM_ID (bom.getProduct ().getC_UOM_ID ());
- //newLine.setC_UOM_ID (bom.getC_UOM_ID ());
- newLine.setQty (line.getQtyOrdered ().multiply (
- bom.getBOMQty ()));
- //newLine.setQty (line.getQtyOrdered ().multiply (
- // bom.getQtyBOM()));
- if (bom.getDescription () != null)
- newLine.setDescription (bom.getDescription ());
- //
- newLine.setPrice ();
- newLine.save (get_TrxName());
+ MOrderLine newLine = new MOrderLine(this);
+ newLine.setLine(++lineNo);
+ newLine.setM_Product_ID(bom.getM_ProductBOM_ID(), true);
+ newLine.setQty(line.getQtyOrdered().multiply(bom.getBOMQty()));
+ if (bom.getDescription() != null)
+ newLine.setDescription(bom.getDescription());
+ newLine.setPrice();
+ newLine.save(get_TrxName());
}

// Convert into Comment Line

commits...@bitbucket.org

unread,
Apr 15, 2015, 12:26:26 PM4/15/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/736a50d5897c/
Changeset: 736a50d5897c
Branch: release-2.1
User: brerp
Date: 2015-04-15 15:40:23+00:00
Summary: IDEMPIERE-2578 MProduction without TIMING_BEFORE_COMPLETE and TIMING_AFTER_COMPLETE validation
Affected #: 1 file

diff -r 389baf970edc645f09be2b50f1bd1f33db151e33 -r 736a50d5897c0db57b6a6aa9489900633487e98d org.adempiere.base/src/org/compiere/model/MProduction.java
--- a/org.adempiere.base/src/org/compiere/model/MProduction.java
+++ b/org.adempiere.base/src/org/compiere/model/MProduction.java
@@ -67,6 +67,10 @@
return status;
}

+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_BEFORE_COMPLETE);
+ if (m_processMsg != null)
+ return DocAction.STATUS_Invalid;
+
StringBuilder errors = new StringBuilder();
int processed = 0;

@@ -96,7 +100,15 @@
}
}

- setProcessed(true);
+ // User Validation
+ String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE);
+ if (valid != null)
+ {
+ m_processMsg = valid;
+ return DocAction.STATUS_Invalid;
+ }
+
+ setProcessed(true);
setDocAction(DOCACTION_Close);
return DocAction.STATUS_Completed;
}


https://bitbucket.org/idempiere/idempiere/commits/7f2f4050c70b/
Changeset: 7f2f4050c70b
Branch: release-2.1
User: globalqss
Date: 2015-04-15 16:26:09+00:00
Summary: IDEMPIERE-2578 / IDEMPIERE-1715
Affected #: 1 file

diff -r 736a50d5897c0db57b6a6aa9489900633487e98d -r 7f2f4050c70b198976d85315eb8a9cab5b39ccd7 org.adempiere.base/src/org/compiere/model/MProduction.java
--- a/org.adempiere.base/src/org/compiere/model/MProduction.java
+++ b/org.adempiere.base/src/org/compiere/model/MProduction.java
@@ -545,6 +545,12 @@

@Override
public boolean voidIt() {
+ if (log.isLoggable(Level.INFO)) log.info(toString());
+ // Before Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_VOID);
+ if (m_processMsg != null)
+ return false;
+
if (DOCSTATUS_Closed.equals(getDocStatus())
|| DOCSTATUS_Reversed.equals(getDocStatus())
|| DOCSTATUS_Voided.equals(getDocStatus()))
@@ -595,6 +601,11 @@
return reverseCorrectIt();
}

+ // After Void
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_VOID);
+ if (m_processMsg != null)
+ return false;
+
setProcessed(true);
setDocAction(DOCACTION_None);
return true;
@@ -752,8 +763,8 @@
@Override
public boolean reverseAccrualIt() {
if (log.isLoggable(Level.INFO)) log.info(toString());
- // Before reverseCorrect
- m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSECORRECT);
+ // Before reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REVERSEACCRUAL);
if (m_processMsg != null)
return false;

@@ -761,8 +772,8 @@
if (reversal == null)
return false;

- // After reverseCorrect
- m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT);
+ // After reverseAccrual
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSEACCRUAL);
if (m_processMsg != null)
return false;

@@ -773,7 +784,17 @@

@Override
public boolean reActivateIt() {
- throw new UnsupportedOperationException();
+ if (log.isLoggable(Level.INFO)) log.info("reActivateIt - " + toString());
+ // Before reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+
+ // After reActivate
+ m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REACTIVATE);
+ if (m_processMsg != null)
+ return false;
+ return false;
}

@Override

commits...@bitbucket.org

unread,
Apr 24, 2015, 1:09:21 PM4/24/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/b45f48ce2fc1/
Changeset: b45f48ce2fc1
Branch: development
User: druiz_bxservice
Date: 2015-04-23 16:15:01+00:00
Summary: Add functionality to allow user preference window configurable
Affected #: 11 files

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce migration/i2.1z/oracle/201504231737_IDEMPIERE-2556.sql
--- /dev/null
+++ b/migration/i2.1z/oracle/201504231737_IDEMPIERE-2556.sql
@@ -0,0 +1,376 @@
+SET SQLBLANKLINES ON
+SET DEFINE OFF
+
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 20, 2015 8:55:26 AM COT
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202881,0,0,'Y',TO_DATE('2015-04-20 08:55:25','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 08:55:25','YYYY-MM-DD HH24:MI:SS'),100,'AD_UserPreference_ID','AD_UserPreference_ID','AD_UserPreference_ID','D','5098593a-7542-4c49-acc1-30ac6ef6592a')
+;
+
+-- Apr 20, 2015 8:55:26 AM COT
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202882,0,0,'Y',TO_DATE('2015-04-20 08:55:26','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 08:55:26','YYYY-MM-DD HH24:MI:SS'),100,'AD_UserPreference_UU','AD_UserPreference_UU','AD_UserPreference_UU','D','0d6981dd-ceaf-495c-b8ca-11169009a230')
+;
+
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 18, 2015 1:39:54 AM CEST
+INSERT INTO AD_Table (AD_Table_ID,Name,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,IsCentrallyMaintained,AD_Table_UU,Processing,DatabaseViewDrop) VALUES (200174,'User Preference','AD_UserPreference',0,'7',0,0,'Y',TO_DATE('2015-04-18 01:39:54','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:39:54','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','N','N','D','N','N','L','N','Y','b007ed8b-09b4-4d98-92d3-e0df7a6ee79c','N','N')
+;
+
+-- Apr 18, 2015 1:40:55 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212159,1,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200174,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_DATE('2015-04-18 01:40:54','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:54','YYYY-MM-DD HH24:MI:SS'),0,102,'N','N','D','Y','N','N','Y','fcaf04ec-34cb-448b-bf07-f646f5ee50bd','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212160,1,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200174,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_DATE('2015-04-18 01:40:55','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:55','YYYY-MM-DD HH24:MI:SS'),0,113,'N','N','D','Y','N','N','Y','5b18c7ce-e5ad-4a58-904b-e38e0f2e47fd','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212161,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',200174,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,245,'N','N','D','Y','N','N','Y','27578d87-33b0-4ea0-80b1-43e7d9f3cc8a','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212162,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',200174,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,246,'N','N','D','Y','N','N','Y','b6c4231e-f066-4cc0-91c1-86ff083ad818','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:57 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212163,1,'Description','Optional short description of the record','A description is limited to 255 characters.',200174,'Description',255,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,275,'Y','Y','D','Y','N','N','Y','4830a3fb-be29-4ca8-9812-4103787b076b','Y','N','N')
+;
+
+-- Apr 18, 2015 1:40:57 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212164,1,'Comment/Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.',200174,'Help',2000,'N','N','N','N','N',0,'N',14,0,0,'Y',TO_DATE('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,326,'Y','N','D','Y','N','N','Y','39204b78-92fc-4155-98c2-f5cb3bd149b1','Y','N','N')
+;
+
+-- Apr 18, 2015 1:40:58 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212165,1,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200174,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_DATE('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,348,'Y','N','D','Y','N','N','Y','dd04b15b-1e84-444d-bb00-3983bd6598d2','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:58 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212166,1,'User Preference',200174,'AD_UserPreference_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_DATE('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,202881,'N','N','D','Y','N','N','Y','59ca020c-b0cb-4c82-9ad2-887c193cf533','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212167,1.00,'AD_UserPreference_UU',200174,'AD_UserPreference_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_DATE('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,202882,'Y','N','D','N','N','N','Y','03e2b5f6-a80e-4d76-bda3-0969ce4bdbc6','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212168,1,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200174,'Name',60,'N','N','Y','N','Y',1,'N',10,0,0,'Y',TO_DATE('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,469,'Y','Y','D','Y','N','N','Y','ff3c1474-9dd3-4f6c-ba7a-3787ff019178','Y','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212169,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200174,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_DATE('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,607,'N','N','D','Y','N','N','Y','16ce9482-583d-456e-9cfd-dbd05863669c','N','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212170,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200174,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_DATE('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,608,'N','N','D','Y','N','N','Y','daeff8dc-f07d-4c69-b44d-b4151bb9b5a8','N','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212171,1,'Search Key','Search key for the record in the format required - must be unique','A search key allows you a fast method of finding a particular record.
+If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).',200174,'Value',40,'N','N','Y','N','N',0,'N',10,0,0,'Y',TO_DATE('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,620,'Y','Y','D','Y','N','N','Y','a80889b7-d5f1-4bfc-9762-bdf1555d3a32','Y','N','N')
+;
+
+-- Apr 18, 2015 1:41:32 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212163
+;
+
+-- Apr 18, 2015 1:41:32 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212163
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212164
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212164
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212168
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212168
+;
+
+-- Apr 18, 2015 1:41:34 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212171
+;
+
+-- Apr 18, 2015 1:41:34 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212171
+;
+
+-- Apr 18, 2015 1:42:24 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212172,0,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200174,'AD_User_ID',22,'N','N','Y','N','N',0,'N',30,0,0,'Y',TO_DATE('2015-04-18 01:42:23','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:42:23','YYYY-MM-DD HH24:MI:SS'),0,138,'N','N','D','N','N','N','Y','7301ad7b-7c37-4291-af51-42cfef6b3f13','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:45:45 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202879,0,0,'Y',TO_DATE('2015-04-18 01:45:44','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:45:44','YYYY-MM-DD HH24:MI:SS'),0,'AutoCommit','Automatic Commit','Automatic Commit','D','7989bd5a-1364-455e-9c6c-6c20ebca1926')
+;
+
+-- Apr 18, 2015 1:46:16 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202880,0,0,'Y',TO_DATE('2015-04-18 01:46:15','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:46:15','YYYY-MM-DD HH24:MI:SS'),0,'AutoNew','Automatic New Record','Automatic New Record','D','a8e7b2da-3e35-49a8-ada6-562e0a53008e')
+;
+
+-- Apr 18, 2015 1:46:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212173,0,'Automatic Commit',200174,'AutoCommit',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2015-04-18 01:46:58','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:46:58','YYYY-MM-DD HH24:MI:SS'),0,202879,'Y','N','D','N','N','N','Y','8dca64cc-afcd-449a-8414-5eb3f88837c6','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:47:14 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212174,0,'Automatic New Record',200174,'AutoNew',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_DATE('2015-04-18 01:47:13','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:47:13','YYYY-MM-DD HH24:MI:SS'),0,202880,'Y','N','D','N','N','N','Y','43de1985-4cb4-41cf-9b12-1e18c9c4fd11','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADClient_ADUserPreference', FKConstraintType='N',Updated=TO_DATE('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212159
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADOrg_ADUserPreference', FKConstraintType='N',Updated=TO_DATE('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212160
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADUser_ADUserPreference', FKConstraintType='N',Updated=TO_DATE('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212172
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='CreatedBy_ADUserPreference', FKConstraintType='N',Updated=TO_DATE('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212162
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+UPDATE AD_Column SET FKConstraintName='UpdatedBy_ADUserPreference', FKConstraintType='N',Updated=TO_DATE('2015-04-18 01:47:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212170
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+CREATE TABLE AD_UserPreference (AD_Client_ID NUMBER(10) NOT NULL, AD_Org_ID NUMBER(10) NOT NULL, AD_User_ID NUMBER(10) NOT NULL, AD_UserPreference_ID NUMBER(10) NOT NULL, AD_UserPreference_UU VARCHAR2(36) DEFAULT NULL , AutoCommit CHAR(1) DEFAULT NULL CHECK (AutoCommit IN ('Y','N')), AutoNew CHAR(1) DEFAULT NULL CHECK (AutoNew IN ('Y','N')), Created DATE DEFAULT SYSDATE NOT NULL, CreatedBy NUMBER(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated DATE DEFAULT SYSDATE NOT NULL, UpdatedBy NUMBER(10) NOT NULL, CONSTRAINT AD_UserPreference_Key PRIMARY KEY (AD_UserPreference_ID), CONSTRAINT AD_UserPreference_UU_idx UNIQUE (AD_UserPreference_UU))
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADClient_ADUserPreference FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADOrg_ADUserPreference FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADUser_ADUserPreference FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT CreatedBy_ADUserPreference FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT UpdatedBy_ADUserPreference FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:49:31 AM CEST
+INSERT INTO AD_Window (AD_Window_ID,Name,Description,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200073,'User Preference','This window is use to set up the preferences entries for each user.',0,0,'Y',TO_DATE('2015-04-18 01:49:31','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:49:31','YYYY-MM-DD HH24:MI:SS'),0,'M','N','D','Y','N',0,0,'N','69306fa5-a87a-4090-a641-8fa685bdaa34')
+;
+
+-- Apr 18, 2015 1:49:41 AM CEST
+UPDATE AD_Table SET AD_Window_ID=200073,Updated=TO_DATE('2015-04-18 01:49:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Table_ID=200174
+;
+
+-- Apr 18, 2015 1:50:12 AM CEST
+INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200189,'User Preference',200073,10,'Y',200174,0,0,'Y',TO_DATE('2015-04-18 01:50:11','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:11','YYYY-MM-DD HH24:MI:SS'),0,'N','N','N','N','N','N',0,'N','D','Y','N','29b168d0-ccf3-46eb-b036-d33de1660f8e','B')
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203791,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200189,212159,'Y',22,10,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:18','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:18','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','4df42a7c-b811-4865-b188-afeb3b372b3a','Y',10,2)
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203792,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200189,212160,'Y',22,20,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','36c83f6d-b48c-41ff-b589-0c294dc75664','Y','Y',20,4,2)
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (203793,'User Preference',200189,212166,'N',22,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','042216e3-3afe-40de-bcc2-5daa36debcd7','N',2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (203794,'AD_UserPreference_UU',200189,212167,'N',36,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','edbe466d-ecce-4590-a19f-21346b307ad1','N',2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203795,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200189,212172,'Y',22,30,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','690a77df-bed2-4006-8286-0e23ddbd4a57','Y',30,2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203796,'Automatic Commit',200189,212173,'Y',1,40,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','12511838-ebd8-437b-abda-7a0c6645278e','Y',40,2,2)
+;
+
+-- Apr 18, 2015 1:50:21 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203797,'Automatic New Record',200189,212174,'Y',1,50,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','45a82a73-134d-445a-b16c-e94fd39996e5','Y',50,2,2)
+;
+
+-- Apr 18, 2015 1:50:21 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203798,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200189,212165,'Y',1,60,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','0a3ab290-8222-4223-aa62-554f3c4b58de','Y',60,2,2)
+;
+
+-- Apr 18, 2015 1:50:55 AM CEST
+UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2015-04-18 01:50:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203794
+;
+
+-- Apr 18, 2015 1:50:55 AM CEST
+UPDATE AD_Field SET SeqNo=0,Updated=TO_DATE('2015-04-18 01:50:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203793
+;
+
+-- Apr 18, 2015 1:51:07 AM CEST
+UPDATE AD_Field SET IsQuickEntry='Y',Updated=TO_DATE('2015-04-18 01:51:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203797
+;
+
+-- Apr 18, 2015 1:51:10 AM CEST
+UPDATE AD_Field SET IsQuickEntry='Y',Updated=TO_DATE('2015-04-18 01:51:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203796
+;
+
+-- Apr 18, 2015 1:52:56 AM CEST
+INSERT INTO AD_Menu (AD_Menu_ID,Name,Action,AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200109,'User Preference','W',200073,0,0,'Y',TO_DATE('2015-04-18 01:52:55','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:52:55','YYYY-MM-DD HH24:MI:SS'),0,'N','N','N','D','Y','8d876c3e-17a9-4bf2-846e-4dd694055b95')
+;
+
+-- Apr 18, 2015 1:52:56 AM CEST
+INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', SysDate, 0, SysDate, 0,t.AD_Tree_ID, 200109, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200109)
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=218
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=153
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=263
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=166
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=203
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53242
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=236
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=183
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=160
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=278
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=345
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53296
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53014
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53108
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=0, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=114
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=1, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=108
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=2, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200071
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=3, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=200109
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=4, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=115
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=5, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53225
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=6, Updated=SysDate WHERE AD_Tree_ID=10 AND Node_ID=53226
+;
+
+-- Apr 18, 2015 1:54:12 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 ('M','More Preferences',0,0,'Y',TO_DATE('2015-04-18 01:54:11','YYYY-MM-DD HH24:MI:SS'),0,TO_DATE('2015-04-18 01:54:11','YYYY-MM-DD HH24:MI:SS'),0,200350,'MorePreferences','D','213ecc81-49d0-489d-bb1e-2752b4d2ffae')
+;
+
+-- Apr 20, 2015 10:30:31 AM COT
+INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU,StartNewMonth,IsOrgLevelSequence) VALUES ('AD_UserPreference',1000000,'N','N','Table AD_UserPreference','Y','Y',0,0,TO_DATE('2015-04-20 10:30:31','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-20 10:30:31','YYYY-MM-DD HH24:MI:SS'),100,200230,'Y',1000000,1,200000,'abaceddc-0be0-407d-ba83-aa20103127b7','N','N')
+;
+
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 20, 2015 10:11:12 PM CEST
+UPDATE AD_Tab SET WhereClause='AD_User_ID=@#AD_User_ID@ AND AD_Client_ID=@#AD_Client_ID@',Updated=TO_DATE('2015-04-20 22:11:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Tab_ID=200189
+;
+
+-- Apr 20, 2015 10:11:23 PM CEST
+UPDATE C_AcctProcessor SET DateLastRun=TO_DATE('2015-04-20 22:11:22','YYYY-MM-DD HH24:MI:SS'), DateNextRun=TO_DATE('2015-04-20 22:21:22','YYYY-MM-DD HH24:MI:SS'),Updated=TO_DATE('2015-04-20 22:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE C_AcctProcessor_ID=100
+;
+
+-- Apr 20, 2015 10:11:33 PM CEST
+UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2015-04-20 22:11:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212173
+;
+
+-- Apr 20, 2015 10:11:35 PM CEST
+ALTER TABLE AD_UserPreference MODIFY AutoCommit CHAR(1) DEFAULT 'Y'
+;
+
+-- Apr 20, 2015 10:11:41 PM CEST
+UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2015-04-20 22:11:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212174
+;
+
+-- Apr 20, 2015 10:11:43 PM CEST
+ALTER TABLE AD_UserPreference MODIFY AutoNew CHAR(1) DEFAULT 'Y'
+;
+
+-- Apr 23, 2015 5:12:40 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201033,'44ac19d8-71af-40d9-a786-972c57a7bec0',TO_DATE('2015-04-23 17:12:39','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','ad_userpreference_user_idx',TO_DATE('2015-04-23 17:12:39','YYYY-MM-DD HH24:MI:SS'),0,200174,'N','Y','N','N','N')
+;
+
+-- Apr 23, 2015 5:12:56 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201258,'52b7953f-564d-49bf-b090-f1df9821c3c4',TO_DATE('2015-04-23 17:12:56','YYYY-MM-DD HH24:MI:SS'),0,'D','Y',TO_DATE('2015-04-23 17:12:56','YYYY-MM-DD HH24:MI:SS'),0,212172,201033,10)
+;
+
+-- Apr 23, 2015 5:14:40 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201259,'7bf0c71a-b50f-44d3-ac62-a3c37fc61d95',TO_DATE('2015-04-23 17:14:40','YYYY-MM-DD HH24:MI:SS'),0,'D','Y',TO_DATE('2015-04-23 17:14:40','YYYY-MM-DD HH24:MI:SS'),0,212159,201033,20)
+;
+
+-- Apr 23, 2015 5:14:55 PM CEST
+CREATE UNIQUE INDEX ad_userpreference_user_idx ON AD_UserPreference (AD_User_ID,AD_Client_ID)
+;
+
+SELECT register_migration_script('201504180139_IDEMPIERE-2556.sql') FROM dual
+;
+

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce migration/i2.1z/postgresql/201504231737_IDEMPIERE-2556.sql
--- /dev/null
+++ b/migration/i2.1z/postgresql/201504231737_IDEMPIERE-2556.sql
@@ -0,0 +1,372 @@
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 20, 2015 8:55:26 AM COT
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202881,0,0,'Y',TO_TIMESTAMP('2015-04-20 08:55:25','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 08:55:25','YYYY-MM-DD HH24:MI:SS'),100,'AD_UserPreference_ID','AD_UserPreference_ID','AD_UserPreference_ID','D','5098593a-7542-4c49-acc1-30ac6ef6592a')
+;
+
+-- Apr 20, 2015 8:55:26 AM COT
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202882,0,0,'Y',TO_TIMESTAMP('2015-04-20 08:55:26','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 08:55:26','YYYY-MM-DD HH24:MI:SS'),100,'AD_UserPreference_UU','AD_UserPreference_UU','AD_UserPreference_UU','D','0d6981dd-ceaf-495c-b8ca-11169009a230')
+;
+
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 18, 2015 1:39:54 AM CEST
+INSERT INTO AD_Table (AD_Table_ID,Name,TableName,LoadSeq,AccessLevel,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSecurityEnabled,IsDeleteable,IsHighVolume,IsView,EntityType,ImportTable,IsChangeLog,ReplicationType,CopyColumnsFromTable,IsCentrallyMaintained,AD_Table_UU,Processing,DatabaseViewDrop) VALUES (200174,'User Preference','AD_UserPreference',0,'7',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:39:54','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:39:54','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','N','N','D','N','N','L','N','Y','b007ed8b-09b4-4d98-92d3-e0df7a6ee79c','N','N')
+;
+
+-- Apr 18, 2015 1:40:55 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212159,1,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200174,129,'AD_Client_ID','@#AD_Client_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:54','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:54','YYYY-MM-DD HH24:MI:SS'),0,102,'N','N','D','Y','N','N','Y','fcaf04ec-34cb-448b-bf07-f646f5ee50bd','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,AD_Val_Rule_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212160,1,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200174,104,'AD_Org_ID','@#AD_Org_ID@',22,'N','N','Y','N','N',0,'N',19,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:55','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:55','YYYY-MM-DD HH24:MI:SS'),0,113,'N','N','D','Y','N','N','Y','5b18c7ce-e5ad-4a58-904b-e38e0f2e47fd','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212161,1,'Created','Date this record was created','The Created field indicates the date that this record was created.',200174,'Created','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,245,'N','N','D','Y','N','N','Y','27578d87-33b0-4ea0-80b1-43e7d9f3cc8a','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:56 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212162,1,'Created By','User who created this records','The Created By field indicates the user who created this record.',200174,'CreatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,246,'N','N','D','Y','N','N','Y','b6c4231e-f066-4cc0-91c1-86ff083ad818','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:57 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212163,1,'Description','Optional short description of the record','A description is limited to 255 characters.',200174,'Description',255,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:56','YYYY-MM-DD HH24:MI:SS'),0,275,'Y','Y','D','Y','N','N','Y','4830a3fb-be29-4ca8-9812-4103787b076b','Y','N','N')
+;
+
+-- Apr 18, 2015 1:40:57 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212164,1,'Comment/Help','Comment or Hint','The Help field contains a hint, comment or help about the use of this item.',200174,'Help',2000,'N','N','N','N','N',0,'N',14,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,326,'Y','N','D','Y','N','N','Y','39204b78-92fc-4155-98c2-f5cb3bd149b1','Y','N','N')
+;
+
+-- Apr 18, 2015 1:40:58 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212165,1,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200174,'IsActive','Y',1,'N','N','Y','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:57','YYYY-MM-DD HH24:MI:SS'),0,348,'Y','N','D','Y','N','N','Y','dd04b15b-1e84-444d-bb00-3983bd6598d2','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:58 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212166,1,'User Preference',200174,'AD_UserPreference_ID',22,'Y','N','Y','N','N',0,'N',13,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,202881,'N','N','D','Y','N','N','Y','59ca020c-b0cb-4c82-9ad2-887c193cf533','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212167,1.00,'AD_UserPreference_UU',200174,'AD_UserPreference_UU',36,'N','N','N','N','N','N',10,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:58','YYYY-MM-DD HH24:MI:SS'),0,202882,'Y','N','D','N','N','N','Y','03e2b5f6-a80e-4d76-bda3-0969ce4bdbc6','N','N','N')
+;
+
+-- Apr 18, 2015 1:40:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212168,1,'Name','Alphanumeric identifier of the entity','The name of an entity (record) is used as an default search option in addition to the search key. The name is up to 60 characters in length.',200174,'Name',60,'N','N','Y','N','Y',1,'N',10,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,469,'Y','Y','D','Y','N','N','Y','ff3c1474-9dd3-4f6c-ba7a-3787ff019178','Y','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212169,1,'Updated','Date this record was updated','The Updated field indicates the date that this record was updated.',200174,'Updated','SYSDATE',7,'N','N','Y','N','N',0,'N',16,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:40:59','YYYY-MM-DD HH24:MI:SS'),0,607,'N','N','D','Y','N','N','Y','16ce9482-583d-456e-9cfd-dbd05863669c','N','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Reference_Value_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212170,1,'Updated By','User who updated this records','The Updated By field indicates the user who updated this record.',200174,'UpdatedBy',22,'N','N','Y','N','N',0,'N',18,110,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,608,'N','N','D','Y','N','N','Y','daeff8dc-f07d-4c69-b44d-b4151bb9b5a8','N','N','N')
+;
+
+-- Apr 18, 2015 1:41:00 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,IsToolbarButton,IsSecure) VALUES (212171,1,'Search Key','Search key for the record in the format required - must be unique','A search key allows you a fast method of finding a particular record.
+If you leave the search key empty, the system automatically creates a numeric number. The document sequence used for this fallback number is defined in the "Maintain Sequence" window with the name "DocumentNo_<TableName>", where TableName is the actual name of the table (e.g. C_Order).',200174,'Value',40,'N','N','Y','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:41:00','YYYY-MM-DD HH24:MI:SS'),0,620,'Y','Y','D','Y','N','N','Y','a80889b7-d5f1-4bfc-9762-bdf1555d3a32','Y','N','N')
+;
+
+-- Apr 18, 2015 1:41:32 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212163
+;
+
+-- Apr 18, 2015 1:41:32 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212163
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212164
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212164
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212168
+;
+
+-- Apr 18, 2015 1:41:33 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212168
+;
+
+-- Apr 18, 2015 1:41:34 AM CEST
+DELETE FROM AD_Column_Trl WHERE AD_Column_ID=212171
+;
+
+-- Apr 18, 2015 1:41:34 AM CEST
+DELETE FROM AD_Column WHERE AD_Column_ID=212171
+;
+
+-- Apr 18, 2015 1:42:24 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212172,0,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200174,'AD_User_ID',22,'N','N','Y','N','N',0,'N',30,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:42:23','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:42:23','YYYY-MM-DD HH24:MI:SS'),0,138,'N','N','D','N','N','N','Y','7301ad7b-7c37-4291-af51-42cfef6b3f13','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:45:45 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202879,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:45:44','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:45:44','YYYY-MM-DD HH24:MI:SS'),0,'AutoCommit','Automatic Commit','Automatic Commit','D','7989bd5a-1364-455e-9c6c-6c20ebca1926')
+;
+
+-- Apr 18, 2015 1:46:16 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,PrintName,EntityType,AD_Element_UU) VALUES (202880,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:46:15','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:46:15','YYYY-MM-DD HH24:MI:SS'),0,'AutoNew','Automatic New Record','Automatic New Record','D','a8e7b2da-3e35-49a8-ada6-562e0a53008e')
+;
+
+-- Apr 18, 2015 1:46:59 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212173,0,'Automatic Commit',200174,'AutoCommit',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:46:58','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:46:58','YYYY-MM-DD HH24:MI:SS'),0,202879,'Y','N','D','N','N','N','Y','8dca64cc-afcd-449a-8414-5eb3f88837c6','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:47:14 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212174,0,'Automatic New Record',200174,'AutoNew',1,'N','N','N','N','N',0,'N',20,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:47:13','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:47:13','YYYY-MM-DD HH24:MI:SS'),0,202880,'Y','N','D','N','N','N','Y','43de1985-4cb4-41cf-9b12-1e18c9c4fd11','Y',0,'N','N')
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADClient_ADUserPreference', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212159
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADOrg_ADUserPreference', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212160
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='ADUser_ADUserPreference', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212172
+;
+
+-- Apr 18, 2015 1:47:40 AM CEST
+UPDATE AD_Column SET FKConstraintName='CreatedBy_ADUserPreference', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-18 01:47:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212162
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+UPDATE AD_Column SET FKConstraintName='UpdatedBy_ADUserPreference', FKConstraintType='N',Updated=TO_TIMESTAMP('2015-04-18 01:47:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212170
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+CREATE TABLE AD_UserPreference (AD_Client_ID NUMERIC(10) NOT NULL, AD_Org_ID NUMERIC(10) NOT NULL, AD_User_ID NUMERIC(10) NOT NULL, AD_UserPreference_ID NUMERIC(10) NOT NULL, AD_UserPreference_UU VARCHAR(36) DEFAULT NULL , AutoCommit CHAR(1) DEFAULT NULL CHECK (AutoCommit IN ('Y','N')), AutoNew CHAR(1) DEFAULT NULL CHECK (AutoNew IN ('Y','N')), Created TIMESTAMP DEFAULT statement_timestamp() NOT NULL, CreatedBy NUMERIC(10) NOT NULL, IsActive CHAR(1) DEFAULT 'Y' CHECK (IsActive IN ('Y','N')) NOT NULL, Updated TIMESTAMP DEFAULT statement_timestamp() NOT NULL, UpdatedBy NUMERIC(10) NOT NULL, CONSTRAINT AD_UserPreference_Key PRIMARY KEY (AD_UserPreference_ID), CONSTRAINT AD_UserPreference_UU_idx UNIQUE (AD_UserPreference_UU))
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADClient_ADUserPreference FOREIGN KEY (AD_Client_ID) REFERENCES ad_client(ad_client_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADOrg_ADUserPreference FOREIGN KEY (AD_Org_ID) REFERENCES ad_org(ad_org_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT ADUser_ADUserPreference FOREIGN KEY (AD_User_ID) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT CreatedBy_ADUserPreference FOREIGN KEY (CreatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:47:41 AM CEST
+ALTER TABLE AD_UserPreference ADD CONSTRAINT UpdatedBy_ADUserPreference FOREIGN KEY (UpdatedBy) REFERENCES ad_user(ad_user_id) DEFERRABLE INITIALLY DEFERRED
+;
+
+-- Apr 18, 2015 1:49:31 AM CEST
+INSERT INTO AD_Window (AD_Window_ID,Name,Description,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,WindowType,Processing,EntityType,IsSOTrx,IsDefault,WinHeight,WinWidth,IsBetaFunctionality,AD_Window_UU) VALUES (200073,'User Preference','This window is use to set up the preferences entries for each user.',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:49:31','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:49:31','YYYY-MM-DD HH24:MI:SS'),0,'M','N','D','Y','N',0,0,'N','69306fa5-a87a-4090-a641-8fa685bdaa34')
+;
+
+-- Apr 18, 2015 1:49:41 AM CEST
+UPDATE AD_Table SET AD_Window_ID=200073,Updated=TO_TIMESTAMP('2015-04-18 01:49:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Table_ID=200174
+;
+
+-- Apr 18, 2015 1:50:12 AM CEST
+INSERT INTO AD_Tab (AD_Tab_ID,Name,AD_Window_ID,SeqNo,IsSingleRow,AD_Table_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,HasTree,IsInfoTab,IsTranslationTab,IsReadOnly,Processing,ImportFields,TabLevel,IsSortTab,EntityType,IsInsertRecord,IsAdvancedTab,AD_Tab_UU,TreeDisplayedOn) VALUES (200189,'User Preference',200073,10,'Y',200174,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:11','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:11','YYYY-MM-DD HH24:MI:SS'),0,'N','N','N','N','N','N',0,'N','D','Y','N','29b168d0-ccf3-46eb-b036-d33de1660f8e','B')
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203791,'Client','Client/Tenant for this installation.','A Client is a company or a legal entity. You cannot share data between Clients. Tenant is a synonym for Client.',200189,212159,'Y',22,10,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:18','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:18','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','4df42a7c-b811-4865-b188-afeb3b372b3a','Y',10,2)
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsAllowCopy,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203792,'Organization','Organizational entity within client','An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.',200189,212160,'Y',22,20,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','36c83f6d-b48c-41ff-b589-0c294dc75664','Y','Y',20,4,2)
+;
+
+-- Apr 18, 2015 1:50:19 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (203793,'User Preference',200189,212166,'N',22,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','042216e3-3afe-40de-bcc2-5daa36debcd7','N',2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,ColumnSpan) VALUES (203794,'AD_UserPreference_UU',200189,212167,'N',36,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:19','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','edbe466d-ecce-4590-a19f-21346b307ad1','N',2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203795,'User/Contact','User within the system - Internal or Business Partner Contact','The User identifies a unique user in the system. This could be an internal user or a business partner contact',200189,212172,'Y',22,30,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','690a77df-bed2-4006-8286-0e23ddbd4a57','Y',30,2)
+;
+
+-- Apr 18, 2015 1:50:20 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203796,'Automatic Commit',200189,212173,'Y',1,40,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:20','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','12511838-ebd8-437b-abda-7a0c6645278e','Y',40,2,2)
+;
+
+-- Apr 18, 2015 1:50:21 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203797,'Automatic New Record',200189,212174,'Y',1,50,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','45a82a73-134d-445a-b16c-e94fd39996e5','Y',50,2,2)
+;
+
+-- Apr 18, 2015 1:50:21 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan) VALUES (203798,'Active','The record is active in the system','There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reports.
+There are two reasons for de-activating and not deleting records:
+(1) The system requires the record for audit purposes.
+(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are invoices for this partner record existing. You de-activate the Business Partner and prevent that this record is used for future entries.',200189,212165,'Y',1,60,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:50:21','YYYY-MM-DD HH24:MI:SS'),0,'N','Y','D','0a3ab290-8222-4223-aa62-554f3c4b58de','Y',60,2,2)
+;
+
+-- Apr 18, 2015 1:50:55 AM CEST
+UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2015-04-18 01:50:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203794
+;
+
+-- Apr 18, 2015 1:50:55 AM CEST
+UPDATE AD_Field SET SeqNo=0,Updated=TO_TIMESTAMP('2015-04-18 01:50:55','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203793
+;
+
+-- Apr 18, 2015 1:51:07 AM CEST
+UPDATE AD_Field SET IsQuickEntry='Y',Updated=TO_TIMESTAMP('2015-04-18 01:51:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203797
+;
+
+-- Apr 18, 2015 1:51:10 AM CEST
+UPDATE AD_Field SET IsQuickEntry='Y',Updated=TO_TIMESTAMP('2015-04-18 01:51:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Field_ID=203796
+;
+
+-- Apr 18, 2015 1:52:56 AM CEST
+INSERT INTO AD_Menu (AD_Menu_ID,Name,"action",AD_Window_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsSummary,IsSOTrx,IsReadOnly,EntityType,IsCentrallyMaintained,AD_Menu_UU) VALUES (200109,'User Preference','W',200073,0,0,'Y',TO_TIMESTAMP('2015-04-18 01:52:55','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:52:55','YYYY-MM-DD HH24:MI:SS'),0,'N','N','N','D','Y','8d876c3e-17a9-4bf2-846e-4dd694055b95')
+;
+
+-- Apr 18, 2015 1:52:56 AM CEST
+INSERT INTO AD_TreeNodeMM (AD_Client_ID,AD_Org_ID, IsActive,Created,CreatedBy,Updated,UpdatedBy, AD_Tree_ID, Node_ID, Parent_ID, SeqNo, AD_TreeNodeMM_UU) SELECT t.AD_Client_ID, 0, 'Y', statement_timestamp(), 0, statement_timestamp(), 0,t.AD_Tree_ID, 200109, 0, 999, Generate_UUID() FROM AD_Tree t WHERE t.AD_Client_ID=0 AND t.IsActive='Y' AND t.IsAllNodes='Y' AND t.TreeType='MM' AND NOT EXISTS (SELECT * FROM AD_TreeNodeMM e WHERE e.AD_Tree_ID=t.AD_Tree_ID AND Node_ID=200109)
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=218
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=153
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=263
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=166
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=203
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53242
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=236
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=7, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=183
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=8, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=160
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=9, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=278
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=10, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=345
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=11, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53296
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=12, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53014
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=0, SeqNo=13, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53108
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=0, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=114
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=1, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=108
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=2, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200071
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=3, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=200109
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=4, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=115
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=5, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53225
+;
+
+-- Apr 18, 2015 1:53:00 AM CEST
+UPDATE AD_TreeNodeMM SET Parent_ID=159, SeqNo=6, Updated=statement_timestamp() WHERE AD_Tree_ID=10 AND Node_ID=53226
+;
+
+-- Apr 18, 2015 1:54:12 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 ('M','More Preferences',0,0,'Y',TO_TIMESTAMP('2015-04-18 01:54:11','YYYY-MM-DD HH24:MI:SS'),0,TO_TIMESTAMP('2015-04-18 01:54:11','YYYY-MM-DD HH24:MI:SS'),0,200350,'MorePreferences','D','213ecc81-49d0-489d-bb1e-2752b4d2ffae')
+;
+
+-- Apr 20, 2015 10:30:31 AM COT
+INSERT INTO AD_Sequence (Name,CurrentNext,IsAudited,StartNewYear,Description,IsActive,IsTableID,AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,AD_Sequence_ID,IsAutoSequence,StartNo,IncrementNo,CurrentNextSys,AD_Sequence_UU,StartNewMonth,IsOrgLevelSequence) VALUES ('AD_UserPreference',1000000,'N','N','Table AD_UserPreference','Y','Y',0,0,TO_TIMESTAMP('2015-04-20 10:30:31','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-20 10:30:31','YYYY-MM-DD HH24:MI:SS'),100,200230,'Y',1000000,1,200000,'abaceddc-0be0-407d-ba83-aa20103127b7','N','N')
+;
+
+-- Apr 20, 2015 10:11:12 PM CEST
+UPDATE AD_Tab SET WhereClause='AD_User_ID=@#AD_User_ID@ AND AD_Client_ID=@#AD_Client_ID@',Updated=TO_TIMESTAMP('2015-04-20 22:11:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Tab_ID=200189
+;
+
+-- Apr 20, 2015 10:11:23 PM CEST
+UPDATE C_AcctProcessor SET DateLastRun=TO_TIMESTAMP('2015-04-20 22:11:22','YYYY-MM-DD HH24:MI:SS'), DateNextRun=TO_TIMESTAMP('2015-04-20 22:21:22','YYYY-MM-DD HH24:MI:SS'),Updated=TO_TIMESTAMP('2015-04-20 22:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE C_AcctProcessor_ID=100
+;
+
+-- Apr 20, 2015 10:11:33 PM CEST
+UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2015-04-20 22:11:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212173
+;
+
+-- Apr 20, 2015 10:11:35 PM CEST
+INSERT INTO t_alter_column values('ad_userpreference','AutoCommit','CHAR(1)',null,'Y')
+;
+
+-- Apr 20, 2015 10:11:41 PM CEST
+UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2015-04-20 22:11:41','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212174
+;
+
+-- Apr 20, 2015 10:11:43 PM CEST
+INSERT INTO t_alter_column values('ad_userpreference','AutoNew','CHAR(1)',null,'Y')
+;
+
+-- Apr 23, 2015 5:12:40 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201033,'44ac19d8-71af-40d9-a786-972c57a7bec0',TO_TIMESTAMP('2015-04-23 17:12:39','YYYY-MM-DD HH24:MI:SS'),0,'D','Y','ad_userpreference_user_idx',TO_TIMESTAMP('2015-04-23 17:12:39','YYYY-MM-DD HH24:MI:SS'),0,200174,'N','Y','N','N','N')
+;
+
+-- Apr 23, 2015 5:12:56 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201258,'52b7953f-564d-49bf-b090-f1df9821c3c4',TO_TIMESTAMP('2015-04-23 17:12:56','YYYY-MM-DD HH24:MI:SS'),0,'D','Y',TO_TIMESTAMP('2015-04-23 17:12:56','YYYY-MM-DD HH24:MI:SS'),0,212172,201033,10)
+;
+
+-- Apr 23, 2015 5:14:40 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201259,'7bf0c71a-b50f-44d3-ac62-a3c37fc61d95',TO_TIMESTAMP('2015-04-23 17:14:40','YYYY-MM-DD HH24:MI:SS'),0,'D','Y',TO_TIMESTAMP('2015-04-23 17:14:40','YYYY-MM-DD HH24:MI:SS'),0,212159,201033,20)
+;
+
+-- Apr 23, 2015 5:14:55 PM CEST
+CREATE UNIQUE INDEX ad_userpreference_user_idx ON AD_UserPreference (AD_User_ID,AD_Client_ID)
+;
+
+SELECT register_migration_script('201504180139_IDEMPIERE-2556.sql') FROM dual
+;
+

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java
@@ -0,0 +1,160 @@
+/******************************************************************************
+ * Product: iDempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software, you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via in...@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+package org.compiere.model;
+
+import java.math.BigDecimal;
+import java.sql.Timestamp;
+import org.compiere.util.KeyNamePair;
+
+/** Generated Interface for AD_UserPreference
+ * @author iDempiere (generated)
+ * @version Release 2.1
+ */
+public interface I_AD_UserPreference
+{
+
+ /** TableName=AD_UserPreference */
+ public static final String Table_Name = "AD_UserPreference";
+
+ /** AD_Table_ID=200174 */
+ public static final int Table_ID = 200174;
+
+ KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
+
+ /** AccessLevel = 7 - System - Client - Org
+ */
+ BigDecimal accessLevel = BigDecimal.valueOf(7);
+
+ /** Load Meta Data */
+
+ /** Column name AD_Client_ID */
+ public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
+
+ /** Get Client.
+ * Client/Tenant for this installation.
+ */
+ public int getAD_Client_ID();
+
+ /** Column name AD_Org_ID */
+ public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
+
+ /** Set Organization.
+ * Organizational entity within client
+ */
+ public void setAD_Org_ID (int AD_Org_ID);
+
+ /** Get Organization.
+ * Organizational entity within client
+ */
+ public int getAD_Org_ID();
+
+ /** Column name AD_User_ID */
+ public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
+
+ /** Set User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID);
+
+ /** Get User/Contact.
+ * User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID();
+
+ public org.compiere.model.I_AD_User getAD_User() throws RuntimeException;
+
+ /** Column name AD_UserPreference_ID */
+ public static final String COLUMNNAME_AD_UserPreference_ID = "AD_UserPreference_ID";
+
+ /** Set User Preference */
+ public void setAD_UserPreference_ID (int AD_UserPreference_ID);
+
+ /** Get User Preference */
+ public int getAD_UserPreference_ID();
+
+ /** Column name AD_UserPreference_UU */
+ public static final String COLUMNNAME_AD_UserPreference_UU = "AD_UserPreference_UU";
+
+ /** Set AD_UserPreference_UU */
+ public void setAD_UserPreference_UU (String AD_UserPreference_UU);
+
+ /** Get AD_UserPreference_UU */
+ public String getAD_UserPreference_UU();
+
+ /** Column name AutoCommit */
+ public static final String COLUMNNAME_AutoCommit = "AutoCommit";
+
+ /** Set Automatic Commit */
+ public void setAutoCommit (boolean AutoCommit);
+
+ /** Get Automatic Commit */
+ public boolean isAutoCommit();
+
+ /** Column name AutoNew */
+ public static final String COLUMNNAME_AutoNew = "AutoNew";
+
+ /** Set Automatic New Record */
+ public void setAutoNew (boolean AutoNew);
+
+ /** Get Automatic New Record */
+ public boolean isAutoNew();
+
+ /** Column name Created */
+ public static final String COLUMNNAME_Created = "Created";
+
+ /** Get Created.
+ * Date this record was created
+ */
+ public Timestamp getCreated();
+
+ /** Column name CreatedBy */
+ public static final String COLUMNNAME_CreatedBy = "CreatedBy";
+
+ /** Get Created By.
+ * User who created this records
+ */
+ public int getCreatedBy();
+
+ /** Column name IsActive */
+ public static final String COLUMNNAME_IsActive = "IsActive";
+
+ /** Set Active.
+ * The record is active in the system
+ */
+ public void setIsActive (boolean IsActive);
+
+ /** Get Active.
+ * The record is active in the system
+ */
+ public boolean isActive();
+
+ /** Column name Updated */
+ public static final String COLUMNNAME_Updated = "Updated";
+
+ /** Get Updated.
+ * Date this record was updated
+ */
+ public Timestamp getUpdated();
+
+ /** Column name UpdatedBy */
+ public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
+
+ /** Get Updated By.
+ * User who updated this records
+ */
+ public int getUpdatedBy();
+}

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.base/src/org/compiere/model/MUserPreference.java
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/model/MUserPreference.java
@@ -0,0 +1,87 @@
+package org.compiere.model;
+
+import java.sql.ResultSet;
+import java.util.Properties;
+
+import org.compiere.util.Env;
+
+public class MUserPreference extends X_AD_UserPreference{
+
+ /** Auto Commit */
+ public static final String P_AUTO_COMMIT = "AutoCommit";
+ public static final String P_AUTO_NEW = "AutoNew";
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 2406291562249262021L;
+
+ public MUserPreference(Properties ctx, int AD_UserPreference_ID,
+ String trxName) {
+ super(ctx, AD_UserPreference_ID, trxName);
+
+ } //MUserPreference
+
+ public MUserPreference(Properties ctx, ResultSet rs, String trxName)
+ {
+ super(ctx, rs, trxName);
+ } //MUserPreference
+
+ public void setAD_User_ID (int AD_User_ID)
+ {
+ if (AD_User_ID == 0)
+ set_ValueNoCheck (COLUMNNAME_AD_User_ID, AD_User_ID);
+ else
+ super.setAD_User_ID(AD_User_ID);
+ } //setAD_User_ID
+
+ private static MUserPreference createUserPreferences(int AD_User_ID, int AD_Client_ID){
+ MUserPreference preferences = new MUserPreference(Env.getCtx(), 0, null);
+ preferences.setAD_User_ID(AD_User_ID);
+ preferences.setAD_Client_ID(AD_Client_ID);
+ preferences.saveEx();
+
+ return preferences;
+ } //createUserPreferences
+
+ public static MUserPreference getUserPreference(int AD_User_ID, int AD_Client_ID){
+ Query query = new Query(Env.getCtx(), MUserPreference.Table_Name, "NVL(AD_User_ID,0) = ? AND NVL(AD_Client_ID,0) = ?", null);
+ MUserPreference preferences = query.setParameters(new Object[]{AD_User_ID, AD_Client_ID}).firstOnly();
+
+ if(preferences==null){
+ preferences = createUserPreferences(AD_User_ID, AD_Client_ID);
+ }
+
+ return preferences;
+ }
+
+ private static String convert(boolean value) {
+ return value ? "Y" : "N";
+ }
+
+ public String getPreference(String key){
+ Object value = get_Value(key);
+ if( value!=null ){
+ if(value instanceof Boolean)
+ value = convert((boolean) value);
+
+ return value.toString();
+ }
+
+ return "";
+ }
+
+ public void fillPreferences(){
+ MTable t = new MTable(Env.getCtx(), MUserPreference.Table_ID, null);
+ for (MColumn c: t.getColumns(false)){
+ if( !c.getColumnName().equals("AD_Client_ID") && !c.getColumnName().equals("AD_Org_ID") &&
+ !c.getColumnName().equals("AD_User_ID") && !c.getColumnName().equals("AD_UserPreference_ID") &&
+ !c.getColumnName().equals("AD_UserPreference_UU") && !c.getColumnName().equals("Created") &&
+ !c.getColumnName().equals("CreatedBy") && !c.getColumnName().equals("Updated") &&
+ !c.getColumnName().equals("UpdatedBy") && !c.getColumnName().equals("IsActive") )
+
+ Env.getCtx().setProperty(c.getColumnName(), getPreference(c.getColumnName()));
+ }
+ }
+
+}

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java
--- /dev/null
+++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java
@@ -0,0 +1,176 @@
+/******************************************************************************
+ * Product: iDempiere ERP & CRM Smart Business Solution *
+ * Copyright (C) 1999-2012 ComPiere, Inc. All Rights Reserved. *
+ * This program is free software, you can redistribute it and/or modify it *
+ * under the terms version 2 of the GNU General Public License as published *
+ * by the Free Software Foundation. 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., *
+ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
+ * For the text or an alternative of this public license, you may reach us *
+ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
+ * or via in...@compiere.org or http://www.compiere.org/license.html *
+ *****************************************************************************/
+/** Generated Model - DO NOT CHANGE */
+package org.compiere.model;
+
+import java.sql.ResultSet;
+import java.util.Properties;
+
+/** Generated Model for AD_UserPreference
+ * @author iDempiere (generated)
+ * @version Release 2.1 - $Id$ */
+public class X_AD_UserPreference extends PO implements I_AD_UserPreference, I_Persistent
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 20150418L;
+
+ /** Standard Constructor */
+ public X_AD_UserPreference (Properties ctx, int AD_UserPreference_ID, String trxName)
+ {
+ super (ctx, AD_UserPreference_ID, trxName);
+ /** if (AD_UserPreference_ID == 0)
+ {
+ setAD_User_ID (0);
+ setAD_UserPreference_ID (0);
+ } */
+ }
+
+ /** Load Constructor */
+ public X_AD_UserPreference (Properties ctx, ResultSet rs, String trxName)
+ {
+ super (ctx, rs, trxName);
+ }
+
+ /** AccessLevel
+ * @return 7 - System - Client - Org
+ */
+ protected int get_AccessLevel()
+ {
+ return accessLevel.intValue();
+ }
+
+ /** Load Meta Data */
+ protected POInfo initPO (Properties ctx)
+ {
+ POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
+ return poi;
+ }
+
+ public String toString()
+ {
+ StringBuffer sb = new StringBuffer ("X_AD_UserPreference[")
+ .append(get_ID()).append("]");
+ return sb.toString();
+ }
+
+ public org.compiere.model.I_AD_User getAD_User() throws RuntimeException
+ {
+ return (org.compiere.model.I_AD_User)MTable.get(getCtx(), org.compiere.model.I_AD_User.Table_Name)
+ .getPO(getAD_User_ID(), get_TrxName()); }
+
+ /** Set User/Contact.
+ @param AD_User_ID
+ User within the system - Internal or Business Partner Contact
+ */
+ public void setAD_User_ID (int AD_User_ID)
+ {
+ if (AD_User_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_AD_User_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
+ }
+
+ /** Get User/Contact.
+ @return User within the system - Internal or Business Partner Contact
+ */
+ public int getAD_User_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set User Preference.
+ @param AD_UserPreference_ID User Preference */
+ public void setAD_UserPreference_ID (int AD_UserPreference_ID)
+ {
+ if (AD_UserPreference_ID < 1)
+ set_ValueNoCheck (COLUMNNAME_AD_UserPreference_ID, null);
+ else
+ set_ValueNoCheck (COLUMNNAME_AD_UserPreference_ID, Integer.valueOf(AD_UserPreference_ID));
+ }
+
+ /** Get User Preference.
+ @return User Preference */
+ public int getAD_UserPreference_ID ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserPreference_ID);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
+ /** Set AD_UserPreference_UU.
+ @param AD_UserPreference_UU AD_UserPreference_UU */
+ public void setAD_UserPreference_UU (String AD_UserPreference_UU)
+ {
+ set_Value (COLUMNNAME_AD_UserPreference_UU, AD_UserPreference_UU);
+ }
+
+ /** Get AD_UserPreference_UU.
+ @return AD_UserPreference_UU */
+ public String getAD_UserPreference_UU ()
+ {
+ return (String)get_Value(COLUMNNAME_AD_UserPreference_UU);
+ }
+
+ /** Set Automatic Commit.
+ @param AutoCommit Automatic Commit */
+ public void setAutoCommit (boolean AutoCommit)
+ {
+ set_Value (COLUMNNAME_AutoCommit, Boolean.valueOf(AutoCommit));
+ }
+
+ /** Get Automatic Commit.
+ @return Automatic Commit */
+ public boolean isAutoCommit ()
+ {
+ Object oo = get_Value(COLUMNNAME_AutoCommit);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Automatic New Record.
+ @param AutoNew Automatic New Record */
+ public void setAutoNew (boolean AutoNew)
+ {
+ set_Value (COLUMNNAME_AutoNew, Boolean.valueOf(AutoNew));
+ }
+
+ /** Get Automatic New Record.
+ @return Automatic New Record */
+ public boolean isAutoNew ()
+ {
+ Object oo = get_Value(COLUMNNAME_AutoNew);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+}
\ No newline at end of file

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.base/src/org/compiere/util/Env.java
--- a/org.adempiere.base/src/org/compiere/util/Env.java
+++ b/org.adempiere.base/src/org/compiere/util/Env.java
@@ -445,7 +445,9 @@
* Set Auto Commit
* @param ctx context
* @param autoCommit auto commit (save)
+ * @Deprecated user setProperty instead
*/
+ @Deprecated
public static void setAutoCommit (Properties ctx, boolean autoCommit)
{
if (ctx == null)
@@ -470,7 +472,9 @@
* Set Auto New Record
* @param ctx context
* @param autoNew auto new record
+ * @Deprecated user setProperty instead
*/
+ @Deprecated
public static void setAutoNew (Properties ctx, boolean autoNew)
{
if (ctx == null)

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.base/src/org/compiere/util/Login.java
--- a/org.adempiere.base/src/org/compiere/util/Login.java
+++ b/org.adempiere.base/src/org/compiere/util/Login.java
@@ -43,6 +43,7 @@
import org.compiere.model.MTable;
import org.compiere.model.MTree_Base;
import org.compiere.model.MUser;
+import org.compiere.model.MUserPreference;
import org.compiere.model.ModelValidationEngine;
import org.compiere.model.Query;

@@ -838,9 +839,9 @@
// Load Role Info
MRole.getDefault(m_ctx, true);

- // Other
- Env.setAutoCommit(m_ctx, Ini.isPropertyBool(Ini.P_A_COMMIT));
- Env.setAutoNew(m_ctx, Ini.isPropertyBool(Ini.P_A_NEW));
+ // Other
+ loadUserPreferences();
+
if (MRole.getDefault(m_ctx, false).isShowAcct())
Env.setContext(m_ctx, "#ShowAcct", Ini.getProperty(Ini.P_SHOW_ACCT));
else
@@ -1002,7 +1003,15 @@
// Call ModelValidators afterLoadPreferences - teo_sarca FR [ 1670025 ]
ModelValidationEngine.get().afterLoadPreferences(m_ctx);
return retValue;
- } // loadPreferences
+ } // loadPreferences
+
+ /**
+ * Load preferences based on user
+ */
+ public void loadUserPreferences(){
+ MUserPreference userPreference = MUserPreference.getUserPreference(Env.getAD_User_ID(m_ctx), Env.getAD_Client_ID(m_ctx));
+ userPreference.fillPreferences();
+ }// loadUserPreferences

/**
* Load Default Value for Table into Context.

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java
@@ -47,6 +47,7 @@
import org.compiere.model.MSystem;
import org.compiere.model.MTable;
import org.compiere.model.MUser;
+import org.compiere.model.MUserPreference;
import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Language;
@@ -100,6 +101,8 @@
private String langSession;

private UserPreference userPreference;
+
+ private MUserPreference userPreferences;

private Keylistener keyListener;

@@ -234,14 +237,10 @@

// to reload preferences when the user refresh the browser
userPreference = loadUserPreference(Env.getAD_User_ID(ctx));
-
+ userPreferences = MUserPreference.getUserPreference(Env.getAD_User_ID(ctx), Env.getAD_Client_ID(ctx));
+
//auto commit user preference
- String autoCommit = userPreference.getProperty(UserPreference.P_AUTO_COMMIT);
- Env.setAutoCommit(ctx, "true".equalsIgnoreCase(autoCommit) || "y".equalsIgnoreCase(autoCommit));
-
- //auto new user preference
- String autoNew = userPreference.getProperty(UserPreference.P_AUTO_NEW);
- Env.setAutoNew(ctx, "true".equalsIgnoreCase(autoNew) || "y".equalsIgnoreCase(autoNew));
+ userPreferences.fillPreferences();

keyListener = new Keylistener();
keyListener.setPage(this.getPage());

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/grid/WQuickEntry.java
@@ -69,11 +69,11 @@

private static CLogger log = CLogger.getCLogger(WQuickEntry.class);

- private int m_WindowNo;
+ protected int m_WindowNo;
private int parent_WindowNo;

List<GridField> quickFields = new ArrayList<GridField>();
- List<WEditor> quickEditors = new ArrayList<WEditor>();
+ protected List<WEditor> quickEditors = new ArrayList<WEditor>();
List<Object> initialValues = new ArrayList<Object>();
List<GridTab> quickTabs = new ArrayList<GridTab>();
List<PO> quickPOs = new ArrayList<PO>();
@@ -81,7 +81,7 @@
/** Read Only */
private boolean m_readOnly = false;

- private Vlayout centerPanel = new Vlayout();
+ protected Vlayout centerPanel = new Vlayout();

private ConfirmPanel confirmPanel = new ConfirmPanel(true, false, false, false, false, false);

@@ -116,13 +116,23 @@
initPOs();

} // WQuickEntry
+
+ public WQuickEntry(int AD_Window_ID)
+ {
+ super();
+
+ m_AD_Window_ID = AD_Window_ID;
+ parent_WindowNo = 0;
+ m_WindowNo = 0;
+ log.info("R/O=" + m_readOnly);
+ } // WQuickEntry

/**
* Static Init
* @throws Exception
*/

- void jbInit() throws Exception
+ private void jbInit() throws Exception
{
this.setWidth("350px");
this.setBorder("normal");
@@ -138,7 +148,7 @@
/**
* Dynamic Init
*/
- private void initPOs()
+ protected void initPOs()
{
GridWindow gridwindow = GridWindow.get(Env.getCtx(), m_WindowNo, m_AD_Window_ID);
this.setTitle(gridwindow.getName());
@@ -206,7 +216,8 @@
layout.setHflex("10");

Span span = new Span();
- span.setHflex("3");
+ if(parent_WindowNo!= 0)
+ span.setHflex("3");
layout.appendChild(span);
Label label = editor.getLabel();
span.appendChild(label);
@@ -214,7 +225,8 @@

layout.appendChild(field);
((HtmlBasedComponent)field).setHflex("7");
-
+
+ //editor.setValue("Y");
centerPanel.appendChild(layout);
}

@@ -319,7 +331,7 @@
* Save.
* @return true if saved
*/
- private boolean actionSave()
+ protected boolean actionSave()
{
log.config("");
boolean anyChange = false;
@@ -458,7 +470,8 @@
@Override
public void detach() {
super.detach();
- SessionManager.getAppDesktop().unregisterWindow(m_WindowNo);
+ if(m_WindowNo!=0)
+ SessionManager.getAppDesktop().unregisterWindow(m_WindowNo);
}

public void valueChange(ValueChangeEvent evt)

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/UserPanel.java
@@ -20,6 +20,7 @@
import java.util.Properties;

import org.adempiere.util.Callback;
+import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.component.Label;
import org.adempiere.webui.component.Menupopup;
import org.adempiere.webui.component.Messagebox;
@@ -202,7 +203,7 @@
}
preferencePopup = new WPreference();
preferencePopup.setPage(component.getPage());
- preferencePopup.open(preference, "after_start");
+ LayoutUtils.openPopupWindow(preference, preferencePopup, "after_start");
}
else if (feedback == event.getTarget())
{

diff -r 0fc582f22f384a53d6aec09fef070af34f56f305 -r b45f48ce2fc1cab579382e69b432916f781215ce org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
@@ -13,14 +13,17 @@
*****************************************************************************/
package org.adempiere.webui.window;

+import java.util.logging.Level;
+
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.ToolBar;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
import org.adempiere.webui.editor.WYesNoEditor;
-import org.adempiere.webui.session.SessionManager;
+import org.adempiere.webui.grid.WQuickEntry;
import org.adempiere.webui.theme.ThemeManager;
-import org.adempiere.webui.util.UserPreference;
+import org.compiere.model.MUserPreference;
+import org.compiere.util.CLogger;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.Component;
@@ -29,50 +32,66 @@
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.A;
import org.zkoss.zul.Div;
-import org.zkoss.zul.Popup;
import org.zkoss.zul.Separator;
-import org.zkoss.zul.Window.Mode;
/**
*
* @author hengsin
*
*/
-public class WPreference extends Popup implements EventListener<Event> {
+public class WPreference extends WQuickEntry implements EventListener<Event> {
/**
*
*/
private static final long serialVersionUID = -8223456746437563389L;
+ private static CLogger log = CLogger.getCLogger(WPreference.class);

- private WYesNoEditor autoCommit;
- private WYesNoEditor autoNew;
- private WYesNoEditor adempiereSys;
- private WYesNoEditor logMigrationScript;
- private WGadgets gadgets;
- private A addgadgets;
-
+ private WYesNoEditor adempiereSys;
+ private WYesNoEditor logMigrationScript;
+ private WGadgets gadgets;
+ private A addgadgets;
+ private A morePreferences;
+ private MUserPreference preferences = null;
+ private int recordId = 0;
+

public WPreference() {
- super();
+ super(Env.getZoomWindowID(MUserPreference.Table_ID, 0));
+
+ try
+ {
+ jbInit();
+ }
+ catch(Exception ex)
+ {
+ log.log(Level.SEVERE, ex.getMessage());
+ }
+
+ initPOs();
+ loadPreferences();
+
+ this.setTitle("");
+ } //WPreference
+
+ private void loadPreferences(){
+ preferences = MUserPreference.getUserPreference(Env.getAD_User_ID(Env.getCtx()), Env.getAD_Client_ID(Env.getCtx()));
+ recordId = preferences.get_ID();
+
+ loadRecord(recordId);
+ } //loadPreferences
+
+ protected void jbInit() throws Exception
+ {
+ this.setWidth("230px");
+ this.setBorder("normal");
+ this.setClosable(true);
+ this.setSizable(true);
+ this.appendChild(centerPanel);
init();
- }
+ } //jbInit

private void init() {

Div div = new Div();
- div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
- autoCommit = new WYesNoEditor("AutoCommit", Msg.getMsg(Env.getCtx(), "AutoCommit", true),
- null, false, false, true);
- div.appendChild(autoCommit.getComponent());
- autoCommit.getComponent().setTooltiptext(Msg.getMsg(Env.getCtx(), "AutoCommit", false));
- this.appendChild(div);
-
- autoNew = new WYesNoEditor("AutoNew", Msg.getMsg(Env.getCtx(), "AutoNew", true),
- null, false, false, true);
- autoNew.getComponent().setTooltiptext(Msg.getMsg(Env.getCtx(), "AutoNew", false));
- div = new Div();
- div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
- div.appendChild(autoNew.getComponent());
- this.appendChild(div);

if (Env.getAD_Client_ID(Env.getCtx()) <= 20 && Env.getAD_User_ID(Env.getCtx()) <= 102) {
adempiereSys = new WYesNoEditor("AdempiereSys", Msg.getMsg(Env.getCtx(), "AdempiereSys", true),
@@ -101,6 +120,15 @@
addgadgets.addEventListener(Events.ON_CLICK, this);
div.appendChild(addgadgets);
this.appendChild(div);
+
+ div = new Div();
+ div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
+ morePreferences= new A();
+ morePreferences.setLabel(Msg.translate(Env.getCtx(), "MorePreferences"));
+ morePreferences.addEventListener(Events.ON_CLICK, this);
+ div.appendChild(morePreferences);
+ this.appendChild(div);
+
Separator separator = new Separator();
separator.setSpacing("20px");
div = new Div();
@@ -112,22 +140,19 @@
toolbar.setAlign("end");
this.appendChild(toolbar);
ToolBarButton btn = new ToolBarButton("");
- btn.setName("btnSave");
- btn.setImage(ThemeManager.getThemeResource("images/Save24.png"));
- btn.setTooltiptext(Msg.getMsg(Env.getCtx(),"Save"));
- btn.addEventListener(Events.ON_CLICK, this);
- toolbar.appendChild(btn);
- toolbar.setStyle("border: none");
+ btn.setName("btnSave");
+ btn.setImage(ThemeManager.getThemeResource("images/Save24.png"));
+ btn.setTooltiptext(Msg.getMsg(Env.getCtx(),"Save"));
+ btn.addEventListener(Events.ON_CLICK, this);
+ toolbar.appendChild(btn);
+ toolbar.setStyle("border: none");

- UserPreference preference = SessionManager.getSessionApplication().getUserPreference();
- autoCommit.setValue(preference.getProperty(UserPreference.P_AUTO_COMMIT));
- autoNew.setValue(preference.getProperty(UserPreference.P_AUTO_NEW));
- }
+ } //init

public void onEvent(Event event) throws Exception {
String nameEvent=event.getName();
Component com =event.getTarget();
-
+
if (Events.ON_CLICK.equals(nameEvent)) {
if (com instanceof ToolBarButton) {
onSave();
@@ -144,22 +169,19 @@
AEnv.showWindow(gadgets);
gadgets.focus();
}
+
+ if (com == morePreferences) {
+ AEnv.zoom(MUserPreference.Table_ID, recordId);
+ }
}
- }
+ } //onEvent

private void onSave() {
- UserPreference preference = SessionManager.getSessionApplication().getUserPreference();
- preference.setProperty(UserPreference.P_AUTO_COMMIT,
- (Boolean)autoCommit.getValue() ? "Y" : "N");
- preference.setProperty(UserPreference.P_AUTO_NEW,
- (Boolean)autoNew.getValue() ? "Y" : "N");
+ actionSave();

- preference.savePreference();
+ //Set all preferences in the Context
+ preferences.fillPreferences();

- //update context
- Env.setAutoCommit(Env.getCtx(), "y".equalsIgnoreCase(preference.getProperty(UserPreference.P_AUTO_COMMIT)));
- Env.setAutoNew(Env.getCtx(), "y".equalsIgnoreCase(preference.getProperty(UserPreference.P_AUTO_NEW)));
-
// Log Migration Script and AdempiereSys are just in-memory preferences, must not be saved
if (logMigrationScript != null)
Env.getCtx().setProperty("LogMigrationScript", (Boolean)logMigrationScript.getValue() ? "Y" : "N");
@@ -167,5 +189,5 @@
Env.getCtx().setProperty("AdempiereSys", (Boolean)adempiereSys.getValue() ? "Y" : "N");

this.detach();
- }
+ } //onSave
}


https://bitbucket.org/idempiere/idempiere/commits/1861093d9de8/
Changeset: 1861093d9de8
Branch: development
User: globalqss
Date: 2015-04-24 17:08:56+00:00
Summary: IDEMPIERE-2556 User preferences window configurable / peer review
Affected #: 5 files

diff -r b45f48ce2fc1cab579382e69b432916f781215ce -r 1861093d9de8f5a1061a69e24428ef9513aa206a migration/i2.1z/oracle/201504231737_IDEMPIERE-2556.sql
--- a/migration/i2.1z/oracle/201504231737_IDEMPIERE-2556.sql
+++ b/migration/i2.1z/oracle/201504231737_IDEMPIERE-2556.sql
@@ -335,10 +335,6 @@
UPDATE AD_Tab SET WhereClause='AD_User_ID=@#AD_User_ID@ AND AD_Client_ID=@#AD_Client_ID@',Updated=TO_DATE('2015-04-20 22:11:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Tab_ID=200189
;

--- Apr 20, 2015 10:11:23 PM CEST
-UPDATE C_AcctProcessor SET DateLastRun=TO_DATE('2015-04-20 22:11:22','YYYY-MM-DD HH24:MI:SS'), DateNextRun=TO_DATE('2015-04-20 22:21:22','YYYY-MM-DD HH24:MI:SS'),Updated=TO_DATE('2015-04-20 22:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE C_AcctProcessor_ID=100
-;
-
-- Apr 20, 2015 10:11:33 PM CEST
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_DATE('2015-04-20 22:11:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212173
;
@@ -371,6 +367,6 @@
CREATE UNIQUE INDEX ad_userpreference_user_idx ON AD_UserPreference (AD_User_ID,AD_Client_ID)
;

-SELECT register_migration_script('201504180139_IDEMPIERE-2556.sql') FROM dual
+SELECT register_migration_script('201504231737_IDEMPIERE-2556.sql') FROM dual
;


diff -r b45f48ce2fc1cab579382e69b432916f781215ce -r 1861093d9de8f5a1061a69e24428ef9513aa206a migration/i2.1z/postgresql/201504231737_IDEMPIERE-2556.sql
--- a/migration/i2.1z/postgresql/201504231737_IDEMPIERE-2556.sql
+++ b/migration/i2.1z/postgresql/201504231737_IDEMPIERE-2556.sql
@@ -331,10 +331,6 @@
UPDATE AD_Tab SET WhereClause='AD_User_ID=@#AD_User_ID@ AND AD_Client_ID=@#AD_Client_ID@',Updated=TO_TIMESTAMP('2015-04-20 22:11:12','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Tab_ID=200189
;

--- Apr 20, 2015 10:11:23 PM CEST
-UPDATE C_AcctProcessor SET DateLastRun=TO_TIMESTAMP('2015-04-20 22:11:22','YYYY-MM-DD HH24:MI:SS'), DateNextRun=TO_TIMESTAMP('2015-04-20 22:21:22','YYYY-MM-DD HH24:MI:SS'),Updated=TO_TIMESTAMP('2015-04-20 22:11:23','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE C_AcctProcessor_ID=100
-;
-
-- Apr 20, 2015 10:11:33 PM CEST
UPDATE AD_Column SET DefaultValue='Y',Updated=TO_TIMESTAMP('2015-04-20 22:11:33','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=0 WHERE AD_Column_ID=212173
;
@@ -367,6 +363,6 @@
CREATE UNIQUE INDEX ad_userpreference_user_idx ON AD_UserPreference (AD_User_ID,AD_Client_ID)
;

-SELECT register_migration_script('201504180139_IDEMPIERE-2556.sql') FROM dual
+SELECT register_migration_script('201504231737_IDEMPIERE-2556.sql') FROM dual
;


diff -r b45f48ce2fc1cab579382e69b432916f781215ce -r 1861093d9de8f5a1061a69e24428ef9513aa206a org.adempiere.base/src/org/compiere/model/MUserPreference.java
--- a/org.adempiere.base/src/org/compiere/model/MUserPreference.java
+++ b/org.adempiere.base/src/org/compiere/model/MUserPreference.java
@@ -1,3 +1,28 @@
+/**********************************************************************
+* 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: *
+* - Diego Ruiz - BX Service GmbH *
+**********************************************************************/
+
package org.compiere.model;

import java.sql.ResultSet;
@@ -6,16 +31,11 @@
import org.compiere.util.Env;

public class MUserPreference extends X_AD_UserPreference{
-
- /** Auto Commit */
- public static final String P_AUTO_COMMIT = "AutoCommit";
- public static final String P_AUTO_NEW = "AutoNew";
-
/**
*
*/
- private static final long serialVersionUID = 2406291562249262021L;
-
+ private static final long serialVersionUID = 4653362918831026642L;
+
public MUserPreference(Properties ctx, int AD_UserPreference_ID,
String trxName) {
super(ctx, AD_UserPreference_ID, trxName);
@@ -45,7 +65,7 @@
} //createUserPreferences

public static MUserPreference getUserPreference(int AD_User_ID, int AD_Client_ID){
- Query query = new Query(Env.getCtx(), MUserPreference.Table_Name, "NVL(AD_User_ID,0) = ? AND NVL(AD_Client_ID,0) = ?", null);
+ Query query = new Query(Env.getCtx(), MUserPreference.Table_Name, "AD_User_ID=? AND AD_Client_ID=?", null);
MUserPreference preferences = query.setParameters(new Object[]{AD_User_ID, AD_Client_ID}).firstOnly();

if(preferences==null){
@@ -70,18 +90,38 @@

return "";
}
-
+
public void fillPreferences(){
- MTable t = new MTable(Env.getCtx(), MUserPreference.Table_ID, null);
- for (MColumn c: t.getColumns(false)){
- if( !c.getColumnName().equals("AD_Client_ID") && !c.getColumnName().equals("AD_Org_ID") &&
- !c.getColumnName().equals("AD_User_ID") && !c.getColumnName().equals("AD_UserPreference_ID") &&
- !c.getColumnName().equals("AD_UserPreference_UU") && !c.getColumnName().equals("Created") &&
- !c.getColumnName().equals("CreatedBy") && !c.getColumnName().equals("Updated") &&
- !c.getColumnName().equals("UpdatedBy") && !c.getColumnName().equals("IsActive") )
-
- Env.getCtx().setProperty(c.getColumnName(), getPreference(c.getColumnName()));
+ for (int i=0; i < get_ColumnCount(); i++) {
+ String colName = get_ColumnName(i);
+ if (! ( "AD_Client_ID".equals(colName)
+ || "AD_Org_ID".equals(colName)
+ || "AD_User_ID".equals(colName)
+ || "AD_UserPreference_ID".equals(colName)
+ || "AD_UserPreference_UU".equals(colName)
+ || "Created".equals(colName)
+ || "CreatedBy".equals(colName)
+ || "Updated".equals(colName)
+ || "UpdatedBy".equals(colName)
+ || "IsActive".equals(colName))) {
+ Env.setContext(getCtx(), colName, getPreference(colName));
+ Env.setContext(getCtx(), "P|" + colName, getPreference(colName));
+ }
}
}
-
+
+ @Override
+ protected boolean beforeSave(boolean newRecord) {
+ if (getAD_Org_ID() != 0)
+ setAD_Org_ID(0);
+ return true;
+ }
+
+ @Override
+ protected boolean afterSave(boolean newRecord, boolean success) {
+ if (success)
+ fillPreferences();
+ return success;
+ }
+
}

diff -r b45f48ce2fc1cab579382e69b432916f781215ce -r 1861093d9de8f5a1061a69e24428ef9513aa206a org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/util/UserPreference.java
@@ -28,12 +28,14 @@
* @author hengsin
* @author Teo Sarca, www.arhipac.ro
* <li>FR [ 2694043 ] Query. first/firstOnly usage best practice
+ *
+ * IDEMPIERE-2556 - this class is now for global code-managed preferences - user selectable preferences are managed in table AD_UserPreference
*/
public final class UserPreference implements Serializable {
/**
*
*/
- private static final long serialVersionUID = -9128019013390545760L;
+ private static final long serialVersionUID = -2619860653017483658L;

/** Language */
public static final String P_LANGUAGE = "Language";
@@ -52,17 +54,9 @@
public static final String P_WAREHOUSE = "Warehouse";
private static final String DEFAULT_WAREHOUSE = "";

- /** Auto Commit */
- public static final String P_AUTO_COMMIT = "AutoCommit";
- private static final String DEFAULT_AUTO_COMMIT = "Y";
-
/** Language Name Context **/
public static final String LANGUAGE_NAME = "#LanguageName";

- /** Auto New **/
- public static final String P_AUTO_NEW = "AutoNew";
- public static final String DEFAULT_AUTO_NEW = "Y";
-
/** Menu Collapsed **/
public static final String P_MENU_COLLAPSED = "MenuCollapsed";
public static final String DEFAULT_MENU_COLLAPSED = "N";
@@ -82,8 +76,6 @@
P_CLIENT,
P_ORG,
P_WAREHOUSE,
- P_AUTO_COMMIT,
- P_AUTO_NEW,
P_MENU_COLLAPSED,
P_HELP_COLLAPSED,
P_HEADER_COLLAPSED};
@@ -94,8 +86,6 @@
DEFAULT_CLIENT,
DEFAULT_ORG,
DEFAULT_WAREHOUSE,
- DEFAULT_AUTO_COMMIT,
- DEFAULT_AUTO_NEW,
DEFAULT_MENU_COLLAPSED,
DEFAULT_HELP_COLLAPSED,
DEFAULT_HEADER_COLLAPSED};

diff -r b45f48ce2fc1cab579382e69b432916f781215ce -r 1861093d9de8f5a1061a69e24428ef9513aa206a org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java
@@ -32,7 +32,6 @@
import org.zkoss.zk.ui.event.Events;
import org.zkoss.zul.A;
import org.zkoss.zul.Div;
-import org.zkoss.zul.Separator;
/**
*
* @author hengsin
@@ -92,6 +91,12 @@
private void init() {

Div div = new Div();
+ div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
+ morePreferences= new A();
+ morePreferences.setLabel(Msg.translate(Env.getCtx(), "MorePreferences"));
+ morePreferences.addEventListener(Events.ON_CLICK, this);
+ div.appendChild(morePreferences);
+ this.appendChild(div);

if (Env.getAD_Client_ID(Env.getCtx()) <= 20 && Env.getAD_User_ID(Env.getCtx()) <= 102) {
adempiereSys = new WYesNoEditor("AdempiereSys", Msg.getMsg(Env.getCtx(), "AdempiereSys", true),
@@ -113,29 +118,6 @@
logMigrationScript.setValue(Env.getCtx().getProperty("LogMigrationScript"));
}

- div = new Div();
- div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
- addgadgets= new A();
- addgadgets.setLabel( Msg.translate(Env.getCtx(), "ManageGadgets"));
- addgadgets.addEventListener(Events.ON_CLICK, this);
- div.appendChild(addgadgets);
- this.appendChild(div);
-
- div = new Div();
- div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
- morePreferences= new A();
- morePreferences.setLabel(Msg.translate(Env.getCtx(), "MorePreferences"));
- morePreferences.addEventListener(Events.ON_CLICK, this);
- div.appendChild(morePreferences);
- this.appendChild(div);
-
- Separator separator = new Separator();
- separator.setSpacing("20px");
- div = new Div();
- div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
- div.appendChild(separator);
- this.appendChild(div);
-
ToolBar toolbar = new ToolBar();
toolbar.setAlign("end");
this.appendChild(toolbar);
@@ -147,6 +129,14 @@
toolbar.appendChild(btn);
toolbar.setStyle("border: none");

+ div = new Div();
+ div.setStyle("background-color: transparent !important; border: none; margin: 5px;");
+ addgadgets= new A();
+ addgadgets.setLabel( Msg.translate(Env.getCtx(), "ManageGadgets"));
+ addgadgets.addEventListener(Events.ON_CLICK, this);
+ div.appendChild(addgadgets);
+ this.appendChild(div);
+
} //init

public void onEvent(Event event) throws Exception {
@@ -179,9 +169,6 @@
private void onSave() {
actionSave();

- //Set all preferences in the Context
- preferences.fillPreferences();
-
// Log Migration Script and AdempiereSys are just in-memory preferences, must not be saved
if (logMigrationScript != null)
Env.getCtx().setProperty("LogMigrationScript", (Boolean)logMigrationScript.getValue() ? "Y" : "N");

commits...@bitbucket.org

unread,
Apr 27, 2015, 3:37:24 PM4/27/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/1a168e80e58f/
Changeset: 1a168e80e58f
Branch: release-2.1
User: nmicoud
Date: 2015-04-27 19:34:02+00:00
Summary: IDEMPIERE-2131 List Validation allow same Name
Affected #: 2 files

diff -r 6b6b48279cb9fc6fec333d694769ad90ba3691ac -r 1a168e80e58fb50cdec528c89f01e7aaee2b2461 migration/i2.1/oracle/2015042711234_IDEMPIERE-2131.sql
--- /dev/null
+++ b/migration/i2.1/oracle/2015042711234_IDEMPIERE-2131.sql
@@ -0,0 +1,46 @@
+SET SQLBLANKLINES ON
+SET DEFINE OFF
+
+-- IDEMPIERE 2131 - List Validation allow same Name
+-- Apr 27, 2015 12:23:21 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201034,'6ce794ab-6190-4691-a97c-a76abf645e23',TO_DATE('2015-04-27 12:23:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_name',TO_DATE('2015-04-27 12:23:20','YYYY-MM-DD HH24:MI:SS'),100,104,'N','Y','N','N','N')
+;
+
+-- Apr 27, 2015 12:23:36 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
+;
+
+-- Apr 27, 2015 12:23:42 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
+;
+
+-- Apr 27, 2015 12:24:37 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201035,'2b1a6eed-7a54-44ef-85a7-c5f40836db2d',TO_DATE('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_trl_name',TO_DATE('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,136,'N','Y','N','N','N')
+;
+
+-- Apr 27, 2015 12:24:48 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201262,'72671b8e-722e-4f2a-9788-ea3cfd90adaa',TO_DATE('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,336,201035,10)
+;
+
+-- Apr 27, 2015 12:24:57 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201263,'c8f21da7-96f7-4daf-8c2b-a935c67deadb',TO_DATE('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,337,201035,20)
+;
+
+-- Apr 27, 2015 12:25:04 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201264,'c33d3433-8fd7-44a2-b5a8-ccac81357cb4',TO_DATE('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,338,201035,30)
+;
+
+-- Apr 27, 2015 12:25:07 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:25:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201262
+;
+
+-- Apr 27, 2015 12:29:37 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201260
+;
+
+-- Apr 27, 2015 12:29:40 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:29:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201261
+;
+
+SELECT register_migration_script('2015042711234_IDEMPIERE-2131.sql') FROM dual
+;
\ No newline at end of file

diff -r 6b6b48279cb9fc6fec333d694769ad90ba3691ac -r 1a168e80e58fb50cdec528c89f01e7aaee2b2461 migration/i2.1/postgresql/2015042711234_IDEMPIERE-2131.sql
--- /dev/null
+++ b/migration/i2.1/postgresql/2015042711234_IDEMPIERE-2131.sql
@@ -0,0 +1,43 @@
+-- IDEMPIERE 2131 - List Validation allow same Name
+-- Apr 27, 2015 12:23:21 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201034,'6ce794ab-6190-4691-a97c-a76abf645e23',TO_TIMESTAMP('2015-04-27 12:23:20','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_name',TO_TIMESTAMP('2015-04-27 12:23:20','YYYY-MM-DD HH24:MI:SS'),100,104,'N','Y','N','N','N')
+;
+
+-- Apr 27, 2015 12:23:36 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
+;
+
+-- Apr 27, 2015 12:23:42 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
+;
+
+-- Apr 27, 2015 12:24:37 PM CEST
+INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201035,'2b1a6eed-7a54-44ef-85a7-c5f40836db2d',TO_TIMESTAMP('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_trl_name',TO_TIMESTAMP('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,136,'N','Y','N','N','N')
+;
+
+-- Apr 27, 2015 12:24:48 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201262,'72671b8e-722e-4f2a-9788-ea3cfd90adaa',TO_TIMESTAMP('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,336,201035,10)
+;
+
+-- Apr 27, 2015 12:24:57 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201263,'c8f21da7-96f7-4daf-8c2b-a935c67deadb',TO_TIMESTAMP('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,337,201035,20)
+;
+
+-- Apr 27, 2015 12:25:04 PM CEST
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201264,'c33d3433-8fd7-44a2-b5a8-ccac81357cb4',TO_TIMESTAMP('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,338,201035,30)
+;
+
+-- Apr 27, 2015 12:25:07 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:25:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201262
+;
+
+-- Apr 27, 2015 12:29:37 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201260
+;
+
+-- Apr 27, 2015 12:29:40 PM CEST
+UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:29:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201261
+;
+
+SELECT register_migration_script('2015042711234_IDEMPIERE-2131.sql') FROM dual
+;
\ No newline at end of file


https://bitbucket.org/idempiere/idempiere/commits/02b980536ca9/
Changeset: 02b980536ca9
Branch: release-2.1
User: globalqss
Date: 2015-04-27 19:35:10+00:00
Summary: IDEMPIERE-2131 List Validation allow same Name / peer review
Affected #: 2 files

diff -r 1a168e80e58fb50cdec528c89f01e7aaee2b2461 -r 02b980536ca92c0e6ce81d68aa3126cc4cd12a5f migration/i2.1/oracle/2015042711234_IDEMPIERE-2131.sql
--- a/migration/i2.1/oracle/2015042711234_IDEMPIERE-2131.sql
+++ b/migration/i2.1/oracle/2015042711234_IDEMPIERE-2131.sql
@@ -7,40 +7,16 @@
;

-- Apr 27, 2015 12:23:36 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
;

-- Apr 27, 2015 12:23:42 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
;

--- Apr 27, 2015 12:24:37 PM CEST
-INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201035,'2b1a6eed-7a54-44ef-85a7-c5f40836db2d',TO_DATE('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_trl_name',TO_DATE('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,136,'N','Y','N','N','N')
-;
-
--- Apr 27, 2015 12:24:48 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201262,'72671b8e-722e-4f2a-9788-ea3cfd90adaa',TO_DATE('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_DATE('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,336,201035,10)
-;
-
--- Apr 27, 2015 12:24:57 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201263,'c8f21da7-96f7-4daf-8c2b-a935c67deadb',TO_DATE('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,337,201035,20)
-;
-
--- Apr 27, 2015 12:25:04 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201264,'c33d3433-8fd7-44a2-b5a8-ccac81357cb4',TO_DATE('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_DATE('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,338,201035,30)
-;
-
--- Apr 27, 2015 12:25:07 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:25:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201262
-;
-
--- Apr 27, 2015 12:29:37 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201260
-;
-
--- Apr 27, 2015 12:29:40 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_DATE('2015-04-27 12:29:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201261
+-- Apr 27, 2015 2:24:31 PM COT
+CREATE UNIQUE INDEX ad_ref_list_name ON AD_Ref_List (AD_Reference_ID,Name)
;

SELECT register_migration_script('2015042711234_IDEMPIERE-2131.sql') FROM dual
-;
\ No newline at end of file
+;

diff -r 1a168e80e58fb50cdec528c89f01e7aaee2b2461 -r 02b980536ca92c0e6ce81d68aa3126cc4cd12a5f migration/i2.1/postgresql/2015042711234_IDEMPIERE-2131.sql
--- a/migration/i2.1/postgresql/2015042711234_IDEMPIERE-2131.sql
+++ b/migration/i2.1/postgresql/2015042711234_IDEMPIERE-2131.sql
@@ -4,40 +4,16 @@
;

-- Apr 27, 2015 12:23:36 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201260,'815e5b09-1d18-40a4-8318-0f61812aa56b',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:23:36','YYYY-MM-DD HH24:MI:SS'),100,151,201034,10)
;

-- Apr 27, 2015 12:23:42 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
+INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201261,'d4fb4782-2768-4897-b0b4-e8daee756311',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:23:41','YYYY-MM-DD HH24:MI:SS'),100,149,201034,20)
;

--- Apr 27, 2015 12:24:37 PM CEST
-INSERT INTO AD_TableIndex (AD_Client_ID,AD_Org_ID,AD_TableIndex_ID,AD_TableIndex_UU,Created,CreatedBy,EntityType,IsActive,Name,Updated,UpdatedBy,AD_Table_ID,IsCreateConstraint,IsUnique,Processing,TableIndexDrop,IsKey) VALUES (0,0,201035,'2b1a6eed-7a54-44ef-85a7-c5f40836db2d',TO_TIMESTAMP('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','ad_ref_list_trl_name',TO_TIMESTAMP('2015-04-27 12:24:37','YYYY-MM-DD HH24:MI:SS'),100,136,'N','Y','N','N','N')
-;
-
--- Apr 27, 2015 12:24:48 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201262,'72671b8e-722e-4f2a-9788-ea3cfd90adaa',TO_TIMESTAMP('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,'U','Y',TO_TIMESTAMP('2015-04-27 12:24:48','YYYY-MM-DD HH24:MI:SS'),100,336,201035,10)
-;
-
--- Apr 27, 2015 12:24:57 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201263,'c8f21da7-96f7-4daf-8c2b-a935c67deadb',TO_TIMESTAMP('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:24:56','YYYY-MM-DD HH24:MI:SS'),100,337,201035,20)
-;
-
--- Apr 27, 2015 12:25:04 PM CEST
-INSERT INTO AD_IndexColumn (AD_Client_ID,AD_Org_ID,AD_IndexColumn_ID,AD_IndexColumn_UU,Created,CreatedBy,EntityType,IsActive,Updated,UpdatedBy,AD_Column_ID,AD_TableIndex_ID,SeqNo) VALUES (0,0,201264,'c33d3433-8fd7-44a2-b5a8-ccac81357cb4',TO_TIMESTAMP('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,'D','Y',TO_TIMESTAMP('2015-04-27 12:25:03','YYYY-MM-DD HH24:MI:SS'),100,338,201035,30)
-;
-
--- Apr 27, 2015 12:25:07 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:25:07','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201262
-;
-
--- Apr 27, 2015 12:29:37 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:29:37','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201260
-;
-
--- Apr 27, 2015 12:29:40 PM CEST
-UPDATE AD_IndexColumn SET EntityType='D',Updated=TO_TIMESTAMP('2015-04-27 12:29:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_IndexColumn_ID=201261
+-- Apr 27, 2015 2:24:31 PM COT
+CREATE UNIQUE INDEX ad_ref_list_name ON AD_Ref_List (AD_Reference_ID,Name)
;

SELECT register_migration_script('2015042711234_IDEMPIERE-2131.sql') FROM dual
-;
\ No newline at end of file
+;

commits...@bitbucket.org

unread,
Apr 27, 2015, 5:54:06 PM4/27/15
to idempi...@googlegroups.com
2 new commits in iDempiere:

https://bitbucket.org/idempiere/idempiere/commits/26ea39ef3c4b/
Changeset: 26ea39ef3c4b
Branch: development
User: druiz_bxservice
Date: 2015-04-27 20:21:29+00:00
Summary: IDEMPIERE-2553 enter amounts without decimal separator
Affected #: 3 files

diff -r 1861093d9de8f5a1061a69e24428ef9513aa206a -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 migration/i2.1z/oracle/201504271636_IDEMPIERE-2553.sql
--- /dev/null
+++ b/migration/i2.1z/oracle/201504271636_IDEMPIERE-2553.sql
@@ -0,0 +1,43 @@
+SET SQLBLANKLINES ON
+SET DEFINE OFF
+
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 27, 2015 10:32:35 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (202883,0,0,'Y',TO_DATE('2015-04-27 10:32:34','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-27 10:32:34','YYYY-MM-DD HH24:MI:SS'),100,'AutomaticDecimalPlacesForAmoun','Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point','Automatic Decimal Places For Amounts','D','369fb0de-beae-468d-b6f6-eb08022b5d99')
+;
+
+-- Apr 27, 2015 10:36:04 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212178,0,'Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point',200174,'AutomaticDecimalPlacesForAmoun','0',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_DATE('2015-04-27 10:36:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-27 10:36:04','YYYY-MM-DD HH24:MI:SS'),100,202883,'Y','N','D','N','N','N','Y','ece77164-32a7-4cc5-a549-64f9179f0ff7','Y',0,'N','N')
+;
+
+-- Apr 27, 2015 10:36:06 AM CEST
+ALTER TABLE AD_UserPreference ADD AutomaticDecimalPlacesForAmoun NUMBER(10) DEFAULT 0
+;
+
+-- Apr 27, 2015 10:36:18 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203800,'Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point',200189,212178,'Y',10,70,'N','N','N','N',0,0,'Y',TO_DATE('2015-04-27 10:36:17','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2015-04-27 10:36:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1e15c066-264b-4f32-8f17-43fff3948d88','Y',70,2)
+;
+
+-- Apr 27, 2015 10:36:32 AM CEST
+UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_DATE('2015-04-27 10:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203800
+;
+
+-- Apr 27, 2015 10:36:32 AM CEST
+UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-04-27 10:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203798
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_DATE('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
+;
+

diff -r 1861093d9de8f5a1061a69e24428ef9513aa206a -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 migration/i2.1z/postgresql/201504271636_IDEMPIERE-2553.sql
--- /dev/null
+++ b/migration/i2.1z/postgresql/201504271636_IDEMPIERE-2553.sql
@@ -0,0 +1,42 @@
+-- IDEMPIERE-2556 User preferences window configurable
+-- Apr 27, 2015 10:32:35 AM CEST
+INSERT INTO AD_Element (AD_Element_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,ColumnName,Name,Description,Help,PrintName,EntityType,AD_Element_UU) VALUES (202883,0,0,'Y',TO_TIMESTAMP('2015-04-27 10:32:34','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-27 10:32:34','YYYY-MM-DD HH24:MI:SS'),100,'AutomaticDecimalPlacesForAmoun','Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point','Automatic Decimal Places For Amounts','D','369fb0de-beae-468d-b6f6-eb08022b5d99')
+;
+
+-- Apr 27, 2015 10:36:04 AM CEST
+INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,DefaultValue,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (212178,0,'Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point',200174,'AutomaticDecimalPlacesForAmoun','0',10,'N','N','N','N','N',0,'N',11,0,0,'Y',TO_TIMESTAMP('2015-04-27 10:36:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-27 10:36:04','YYYY-MM-DD HH24:MI:SS'),100,202883,'Y','N','D','N','N','N','Y','ece77164-32a7-4cc5-a549-64f9179f0ff7','Y',0,'N','N')
+;
+
+-- Apr 27, 2015 10:36:06 AM CEST
+ALTER TABLE AD_UserPreference ADD COLUMN AutomaticDecimalPlacesForAmoun NUMERIC(10) DEFAULT '0'
+;
+
+-- Apr 27, 2015 10:36:18 AM CEST
+INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (203800,'Automatic Decimal Places For Amounts','Automatically insert a decimal point','Automatically insert a decimal point',200189,212178,'Y',10,70,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2015-04-27 10:36:17','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2015-04-27 10:36:17','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','1e15c066-264b-4f32-8f17-43fff3948d88','Y',70,2)
+;
+
+-- Apr 27, 2015 10:36:32 AM CEST
+UPDATE AD_Field SET IsDisplayed='Y', SeqNo=60, XPosition=1,Updated=TO_TIMESTAMP('2015-04-27 10:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203800
+;
+
+-- Apr 27, 2015 10:36:32 AM CEST
+UPDATE AD_Field SET SeqNo=70,Updated=TO_TIMESTAMP('2015-04-27 10:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203798
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_TIMESTAMP('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
+;
+
+-- Apr 27, 2015 9:53:47 PM CEST
+UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
+;
+
+

diff -r 1861093d9de8f5a1061a69e24428ef9513aa206a -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
@@ -18,6 +18,7 @@
package org.adempiere.webui.editor;

import java.math.BigDecimal;
+import java.math.RoundingMode;
import java.text.DecimalFormat;

import org.adempiere.webui.ValuePreference;
@@ -57,7 +58,7 @@
private int displayType;

private boolean tableEditor;
-
+
public WNumberEditor()
{
this("Number", false, false, true, DisplayType.Number, "");
@@ -176,11 +177,35 @@
return;
}

+ //IDEMPIERE-2553 - Enter amounts without decimal separator
+ if(displayType == DisplayType.Amount || displayType == DisplayType.CostPrice){
+ if (newValue != null && newValue instanceof BigDecimal) {
+ newValue = addDecimalPlaces((BigDecimal)newValue);
+ }
+ }
+
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
super.fireValueChange(changeEvent);
oldValue = getComponent().getValue(); // IDEMPIERE-963 - check again the value could be changed by callout
}
}
+
+ /**
+ * IDEMPIERE-2553 - Enter amounts without decimal separator
+ * @param oldValue
+ * @return
+ */
+ public BigDecimal addDecimalPlaces(BigDecimal oldValue){
+ if(oldValue.toString().contains("."))
+ return oldValue;
+
+ Integer decimalPlaces = Integer.parseInt(Env.getCtx().getProperty("AutomaticDecimalPlacesForAmoun"));
+ if(decimalPlaces <= 0)
+ return oldValue;
+
+ BigDecimal newValue = oldValue.divide(BigDecimal.valueOf(Math.pow(10,decimalPlaces)),decimalPlaces,BigDecimal.ROUND_HALF_UP);
+ return newValue;
+ } //getAddDecimalPlaces

@Override
public NumberBox getComponent() {


https://bitbucket.org/idempiere/idempiere/commits/94b158493142/
Changeset: 94b158493142
Branch: development
User: globalqss
Date: 2015-04-27 21:53:49+00:00
Summary: IDEMPIERE-2553 enter amounts without decimal separator / peer review
Affected #: 5 files

diff -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 -r 94b15849314298fbc2314f09ab9792ae8fb76a21 migration/i2.1z/oracle/201504271636_IDEMPIERE-2553.sql
--- a/migration/i2.1z/oracle/201504271636_IDEMPIERE-2553.sql
+++ b/migration/i2.1z/oracle/201504271636_IDEMPIERE-2553.sql
@@ -26,18 +26,21 @@
UPDATE AD_Field SET SeqNo=70,Updated=TO_DATE('2015-04-27 10:36:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=203798

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_DATE('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
+UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_DATE('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
+UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
+UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
+UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
;

+SELECT register_migration_script('201504271636_IDEMPIERE-2553.sql') FROM dual
+;
+

diff -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 -r 94b15849314298fbc2314f09ab9792ae8fb76a21 migration/i2.1z/postgresql/201504271636_IDEMPIERE-2553.sql
--- a/migration/i2.1z/postgresql/201504271636_IDEMPIERE-2553.sql
+++ b/migration/i2.1z/postgresql/201504271636_IDEMPIERE-2553.sql
@@ -24,19 +24,22 @@
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_TIMESTAMP('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
+UPDATE AD_Element SET Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."',Updated=TO_TIMESTAMP('2015-04-27 21:53:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=202883
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
+UPDATE AD_Column SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
+UPDATE AD_InfoColumn SET ColumnName='AutomaticDecimalPlacesForAmoun', Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Element_ID=202883 AND IsCentrallyMaintained='Y'
;

-- Apr 27, 2015 9:53:47 PM CEST
-UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode is no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
+UPDATE AD_Field SET Name='Automatic Decimal Places For Amounts', Description='Automatically insert a decimal point', Help='i.e. "Entering 2 only results in a value of 0.02 for the entry. If you use the "." key during entry of a value, the decimal point is included at the place you specify. This mode has no effect on multiplication and division operations. If 0 is entered it will work as usual."' WHERE AD_Column_ID IN (SELECT AD_Column_ID FROM AD_Column WHERE AD_Element_ID=202883) AND IsCentrallyMaintained='Y'
;


+SELECT register_migration_script('201504271636_IDEMPIERE-2553.sql') FROM dual
+;
+

diff -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 -r 94b15849314298fbc2314f09ab9792ae8fb76a21 org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java
--- a/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java
+++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java
@@ -80,10 +80,10 @@
/** Column name AD_UserPreference_ID */
public static final String COLUMNNAME_AD_UserPreference_ID = "AD_UserPreference_ID";

- /** Set User Preference */
+ /** Set AD_UserPreference_ID */
public void setAD_UserPreference_ID (int AD_UserPreference_ID);

- /** Get User Preference */
+ /** Get AD_UserPreference_ID */
public int getAD_UserPreference_ID();

/** Column name AD_UserPreference_UU */
@@ -104,6 +104,19 @@
/** Get Automatic Commit */
public boolean isAutoCommit();

+ /** Column name AutomaticDecimalPlacesForAmoun */
+ public static final String COLUMNNAME_AutomaticDecimalPlacesForAmoun = "AutomaticDecimalPlacesForAmoun";
+
+ /** Set Automatic Decimal Places For Amounts.
+ * Automatically insert a decimal point
+ */
+ public void setAutomaticDecimalPlacesForAmoun (int AutomaticDecimalPlacesForAmoun);
+
+ /** Get Automatic Decimal Places For Amounts.
+ * Automatically insert a decimal point
+ */
+ public int getAutomaticDecimalPlacesForAmoun();
+
/** Column name AutoNew */
public static final String COLUMNNAME_AutoNew = "AutoNew";

@@ -142,6 +155,32 @@
*/
public boolean isActive();

+ /** Column name IsAddressLinesReverse */
+ public static final String COLUMNNAME_IsAddressLinesReverse = "IsAddressLinesReverse";
+
+ /** Set Reverse Address Lines.
+ * Print Address in reverse Order
+ */
+ public void setIsAddressLinesReverse (boolean IsAddressLinesReverse);
+
+ /** Get Reverse Address Lines.
+ * Print Address in reverse Order
+ */
+ public boolean isAddressLinesReverse();
+
+ /** Column name IsAllowCopy */
+ public static final String COLUMNNAME_IsAllowCopy = "IsAllowCopy";
+
+ /** Set Allow Copy.
+ * Determine if a column must be copied when pushing the button to copy record
+ */
+ public void setIsAllowCopy (boolean IsAllowCopy);
+
+ /** Get Allow Copy.
+ * Determine if a column must be copied when pushing the button to copy record
+ */
+ public boolean isAllowCopy();
+
/** Column name Updated */
public static final String COLUMNNAME_Updated = "Updated";


diff -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 -r 94b15849314298fbc2314f09ab9792ae8fb76a21 org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java
--- a/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java
+++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java
@@ -29,7 +29,7 @@
/**
*
*/
- private static final long serialVersionUID = 20150418L;
+ private static final long serialVersionUID = 20150427L;

/** Standard Constructor */
public X_AD_UserPreference (Properties ctx, int AD_UserPreference_ID, String trxName)
@@ -39,6 +39,8 @@
{
setAD_User_ID (0);
setAD_UserPreference_ID (0);
+ setIsAllowCopy (false);
+// N
} */
}

@@ -98,8 +100,8 @@
return ii.intValue();
}

- /** Set User Preference.
- @param AD_UserPreference_ID User Preference */
+ /** Set AD_UserPreference_ID.
+ @param AD_UserPreference_ID AD_UserPreference_ID */
public void setAD_UserPreference_ID (int AD_UserPreference_ID)
{
if (AD_UserPreference_ID < 1)
@@ -108,8 +110,8 @@
set_ValueNoCheck (COLUMNNAME_AD_UserPreference_ID, Integer.valueOf(AD_UserPreference_ID));
}

- /** Get User Preference.
- @return User Preference */
+ /** Get AD_UserPreference_ID.
+ @return AD_UserPreference_ID */
public int getAD_UserPreference_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_AD_UserPreference_ID);
@@ -153,6 +155,26 @@
return false;
}

+ /** Set Automatic Decimal Places For Amounts.
+ @param AutomaticDecimalPlacesForAmoun
+ Automatically insert a decimal point
+ */
+ public void setAutomaticDecimalPlacesForAmoun (int AutomaticDecimalPlacesForAmoun)
+ {
+ set_Value (COLUMNNAME_AutomaticDecimalPlacesForAmoun, Integer.valueOf(AutomaticDecimalPlacesForAmoun));
+ }
+
+ /** Get Automatic Decimal Places For Amounts.
+ @return Automatically insert a decimal point
+ */
+ public int getAutomaticDecimalPlacesForAmoun ()
+ {
+ Integer ii = (Integer)get_Value(COLUMNNAME_AutomaticDecimalPlacesForAmoun);
+ if (ii == null)
+ return 0;
+ return ii.intValue();
+ }
+
/** Set Automatic New Record.
@param AutoNew Automatic New Record */
public void setAutoNew (boolean AutoNew)
@@ -173,4 +195,52 @@
}
return false;
}
+
+ /** Set Reverse Address Lines.
+ @param IsAddressLinesReverse
+ Print Address in reverse Order
+ */
+ public void setIsAddressLinesReverse (boolean IsAddressLinesReverse)
+ {
+ set_Value (COLUMNNAME_IsAddressLinesReverse, Boolean.valueOf(IsAddressLinesReverse));
+ }
+
+ /** Get Reverse Address Lines.
+ @return Print Address in reverse Order
+ */
+ public boolean isAddressLinesReverse ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsAddressLinesReverse);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
+
+ /** Set Allow Copy.
+ @param IsAllowCopy
+ Determine if a column must be copied when pushing the button to copy record
+ */
+ public void setIsAllowCopy (boolean IsAllowCopy)
+ {
+ set_Value (COLUMNNAME_IsAllowCopy, Boolean.valueOf(IsAllowCopy));
+ }
+
+ /** Get Allow Copy.
+ @return Determine if a column must be copied when pushing the button to copy record
+ */
+ public boolean isAllowCopy ()
+ {
+ Object oo = get_Value(COLUMNNAME_IsAllowCopy);
+ if (oo != null)
+ {
+ if (oo instanceof Boolean)
+ return ((Boolean)oo).booleanValue();
+ return "Y".equals(oo);
+ }
+ return false;
+ }
}
\ No newline at end of file

diff -r 26ea39ef3c4b431162cf7fe7eb4c8784a5243826 -r 94b15849314298fbc2314f09ab9792ae8fb76a21 org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
--- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
+++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WNumberEditor.java
@@ -18,7 +18,6 @@
package org.adempiere.webui.editor;

import java.math.BigDecimal;
-import java.math.RoundingMode;
import java.text.DecimalFormat;

import org.adempiere.webui.ValuePreference;
@@ -199,11 +198,18 @@
if(oldValue.toString().contains("."))
return oldValue;

- Integer decimalPlaces = Integer.parseInt(Env.getCtx().getProperty("AutomaticDecimalPlacesForAmoun"));
+ int decimalPlaces = Env.getContextAsInt(Env.getCtx(), "AutomaticDecimalPlacesForAmoun");
if(decimalPlaces <= 0)
return oldValue;
-
- BigDecimal newValue = oldValue.divide(BigDecimal.valueOf(Math.pow(10,decimalPlaces)),decimalPlaces,BigDecimal.ROUND_HALF_UP);
+
+ BigDecimal divisor;
+ if (decimalPlaces == 2) // most common case
+ divisor = Env.ONEHUNDRED;
+ else if (decimalPlaces == 1)
+ divisor = BigDecimal.TEN;
+ else
+ divisor = BigDecimal.TEN.pow(decimalPlaces);
+ BigDecimal newValue = oldValue.divide(divisor, decimalPlaces, BigDecimal.ROUND_HALF_UP);
return newValue;
} //getAddDecimalPlaces
Reply all
Reply to author
Forward
0 new messages