[managerial accounting] Implements User1 table replacing c_user1
authorEduardo Argal Guibert <eduardo.argal@openbravo.com>
Wed, 14 Nov 2012 19:03:27 +0100
changeset 18848 b730a4f4d398
parent 18847 bdf86e29b17f
child 18849 bbd58936069a
[managerial accounting] Implements User1 table replacing c_user1
src-db/database/model/tables/A_AMORTIZATION.xml
src-db/database/model/tables/A_AMORTIZATIONLINE.xml
src-db/database/model/tables/A_AMORTLINE_ACCTDIMENSION.xml
src-db/database/model/tables/C_BUDGETLINE.xml
src-db/database/model/tables/C_CASH.xml
src-db/database/model/tables/C_DP_MANAGEMENT.xml
src-db/database/model/tables/C_INVOICE.xml
src-db/database/model/tables/C_INVOICELINE.xml
src-db/database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml
src-db/database/model/tables/C_ORDER.xml
src-db/database/model/tables/C_ORDERLINE.xml
src-db/database/model/tables/C_ORDERLINE_ACCTDIMENSION.xml
src-db/database/model/tables/C_SETTLEMENT.xml
src-db/database/model/tables/C_USER1.xml
src-db/database/model/tables/C_VALIDCOMBINATION.xml
src-db/database/model/tables/FACT_ACCT.xml
src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml
src-db/database/model/tables/FIN_PAYMENT.xml
src-db/database/model/tables/GL_JOURNAL.xml
src-db/database/model/tables/GL_JOURNALLINE.xml
src-db/database/model/tables/M_INOUT.xml
src-db/database/model/tables/M_INOUTLINE.xml
src-db/database/model/tables/M_INOUTLINE_ACCTDIMENSION.xml
src-db/database/model/tables/M_INVENTORY.xml
src-db/database/model/tables/M_MOVEMENT.xml
src-db/database/model/tables/M_PRODUCTION.xml
src-db/database/model/tables/USER1.xml
src-db/database/model/triggers/C_USER1_TRG.xml
src-db/database/model/triggers/USER1_TRG.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml
src-db/database/sourcedata/AD_REFERENCE.xml
src-db/database/sourcedata/AD_TABLE.xml
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql
src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql
src/org/openbravo/erpCommon/ad_forms/DocLineInOut_data.xsql
src/org/openbravo/erpCommon/ad_forms/DocLineInvoice_data.xsql
src/org/openbravo/erpCommon/utility/WindowTreeUtility.java
src/org/openbravo/erpCommon/utility/WindowTree_data.xsql
--- a/src-db/database/model/tables/A_AMORTIZATION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/A_AMORTIZATION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -111,8 +111,8 @@
       <foreign-key foreignTable="AD_ORG" name="A_AMORTIZATION_ORG">
         <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="A_AMORTIZATION_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="A_AMORTIZATION_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="A_AMORTIZATION_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/A_AMORTIZATIONLINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/A_AMORTIZATIONLINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -69,7 +69,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -98,12 +98,12 @@
       <foreign-key foreignTable="C_PROJECT" name="A_AMORTLINE_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="A_AMORTLINE_C_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="A_AMORTLINE_C_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="A_AMORTLINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <check name="A_AMORTIZATIONL_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/A_AMORTLINE_ACCTDIMENSION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/A_AMORTLINE_ACCTDIMENSION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -49,7 +49,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -101,8 +101,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="A_AMORTLINE_ACCTD_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="A_AMORTLINE_ACCTD_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="A_AMORTLINE_ACCTD_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="A_AMORTLINE_ACCTD_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/C_BUDGETLINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_BUDGETLINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -166,12 +166,12 @@
       <foreign-key foreignTable="C_PERIOD" name="C_BUDGETLINE_C_PERIOD">
         <reference local="C_PERIOD_ID" foreign="C_PERIOD_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_BUDGETLINE_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_BUDGETLINE_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_BUDGETLINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="C_BPARTNER" name="C_BUSPARTNER_C_BUDGETLINE">
         <reference local="C_BPARTNER_ID" foreign="C_BPARTNER_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/C_CASH.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_CASH.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -122,12 +122,12 @@
       <foreign-key foreignTable="C_PROJECT" name="C_CASH_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_CASH_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_CASH_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_CASH_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <index name="C_CASH_UPDATED" unique="false">
         <index-column name="UPDATED"/>
       </index>
--- a/src-db/database/model/tables/C_DP_MANAGEMENT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_DP_MANAGEMENT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -114,11 +114,11 @@
       <foreign-key foreignTable="C_PROJECT" name="C_DP_MANAGEMENT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_DP_MANAGEMENT_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_DP_MANAGEMENT_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_DP_MANAGEMENT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
     </table>
   </database>
--- a/src-db/database/model/tables/C_INVOICE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_INVOICE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -332,8 +332,8 @@
       <foreign-key foreignTable="AD_USER" name="C_INVOICE_SALESREP">
         <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_INVOICE_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="C_INVOICE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_INVOICE_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/C_INVOICELINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_INVOICELINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -201,7 +201,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -272,8 +272,8 @@
       <foreign-key foreignTable="S_RESOURCEASSIGNMENT" name="C_INVOICELINE_S_RESOURCEASSIGN">
         <reference local="S_RESOURCEASSIGNMENT_ID" foreign="S_RESOURCEASSIGNMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_INVOICELINE_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="C_INVOICELINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_INVOICELINE_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_INVOICELINE_ACCTDIMENSION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -101,8 +101,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="C_INVOICELINE_ACCTD_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_INVOICELINE_ACCTD_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="C_INVOICELINE_ACCTD_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_INVOICELINE_ACCTD_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/C_ORDER.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_ORDER.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -385,9 +385,6 @@
       <foreign-key foreignTable="C_RETURN_REASON" name="C_ORDER_C_RETURN_REASON">
         <reference local="C_RETURN_REASON_ID" foreign="C_RETURN_REASON_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_ORDER_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_ORDER_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
@@ -421,6 +418,9 @@
       <foreign-key foreignTable="AD_USER" name="C_ORDER_SALESREP">
         <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_ORDER_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="FIN_PAYMENT_PRIORITY" name="FIN_ORDER_PAYMENT_PRIORITY">
         <reference local="FIN_PAYMENT_PRIORITY_ID" foreign="FIN_PAYMENT_PRIORITY_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/C_ORDERLINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_ORDERLINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -229,7 +229,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -287,9 +287,6 @@
       <foreign-key foreignTable="C_UOM" name="C_ORDERLINE_C_UOM">
         <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_ORDERLINE_C_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_ORDERLINE_C_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
@@ -323,6 +320,9 @@
       <foreign-key foreignTable="C_ORDERLINE" name="C_ORDERLINE_SOPOREF">
         <reference local="REF_ORDERLINE_ID" foreign="C_ORDERLINE_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_ORDERLINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <foreign-key foreignTable="M_WAREHOUSE_RULE" name="C_ORDERLINE_WAREHOUSERULE">
         <reference local="M_WAREHOUSE_RULE_ID" foreign="M_WAREHOUSE_RULE_ID"/>
       </foreign-key>
--- a/src-db/database/model/tables/C_ORDERLINE_ACCTDIMENSION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_ORDERLINE_ACCTDIMENSION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -49,7 +49,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -101,8 +101,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="C_ORDERLINE_ACCTD_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_ORDERLINE_ACCTD_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="C_ORDERLINE_ACCTD_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_ORDERLINE_ACCTD_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/C_SETTLEMENT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_SETTLEMENT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -150,12 +150,12 @@
       <foreign-key foreignTable="C_PROJECT" name="C_SETTLEMENT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_SETTLEMENT_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_SETTLEMENT_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="C_SETTLEMENT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <index name="C_SETTLEMENT_UPDATED" unique="false">
         <index-column name="UPDATED"/>
       </index>
--- a/src-db/database/model/tables/C_USER1.xml	Wed Nov 14 18:56:25 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TABLE C_USER1">
-    <table name="C_USER1" primaryKey="C_USER1_KEY">
-      <column name="C_USER1_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[Y]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
-        <default><![CDATA[SYSDATE]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
-        <default><![CDATA[SYSDATE]]></default>
-        <onCreateDefault/>
-      </column>
-      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="VALUE" primaryKey="false" required="true" type="VARCHAR" size="40" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false">
-        <default/>
-        <onCreateDefault/>
-      </column>
-      <column name="ISSUMMARY" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
-        <default><![CDATA[N]]></default>
-        <onCreateDefault/>
-      </column>
-      <foreign-key foreignTable="AD_CLIENT" name="C_USER1_AD_CLIENT">
-        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
-      </foreign-key>
-      <foreign-key foreignTable="AD_ORG" name="C_USER1_AD_ORG">
-        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
-      </foreign-key>
-      <unique name="C_USER1_VALUE">
-        <unique-column name="AD_CLIENT_ID"/>
-        <unique-column name="VALUE"/>
-      </unique>
-      <check name="C_USER1_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
-      <check name="C_USER1_ISSUMMARY_CHK"><![CDATA[ISSUMMARY IN ('Y', 'N')]]></check>
-    </table>
-  </database>
--- a/src-db/database/model/tables/C_VALIDCOMBINATION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/C_VALIDCOMBINATION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -140,8 +140,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="C_VALIDCOMBINATION_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="C_VALIDCOMBINATION_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="C_VALIDCOMBINATION_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="C_VALIDCOMBINATION_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/FACT_ACCT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/FACT_ACCT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -270,8 +270,8 @@
       <foreign-key foreignTable="M_LOCATOR" name="FACT_ACCT_M_LOCATOR">
         <reference local="M_LOCATOR_ID" foreign="M_LOCATOR_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="FACT_ACCT_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="FACT_ACCT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="FACT_ACCT_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -178,8 +178,8 @@
       <foreign-key foreignTable="C_PROJECT" name="FIN_FINACC_TRANS_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="FIN_FINACC_TRANS_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="FIN_FINACC_TRANS_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="FIN_FINACC_TRANS_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/FIN_PAYMENT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/FIN_PAYMENT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -174,8 +174,8 @@
       <foreign-key foreignTable="FIN_PAYMENT" name="FIN_PAYMENT_REVERSED">
         <reference local="FIN_REV_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="FIN_PAYMENT_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="FIN_PAYMENT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="FIN_PAYMENT_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/GL_JOURNAL.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/GL_JOURNAL.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -175,8 +175,8 @@
       <foreign-key foreignTable="GL_JOURNALBATCH" name="GL_JOURNAL_GL_JOURNALBATCH">
         <reference local="GL_JOURNALBATCH_ID" foreign="GL_JOURNALBATCH_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="GL_JOURNAL_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="GL_JOURNAL_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="GL_JOURNAL_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/GL_JOURNALLINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/GL_JOURNALLINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -182,8 +182,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="GL_JOURNALLINE_M_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="GL_JOURNALLINE_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="GL_JOURNALLINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="GL_JOURNALLINE_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/M_INOUT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_INOUT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -304,9 +304,6 @@
       <foreign-key foreignTable="C_PROJECT" name="M_INOUT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_INOUT_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_INOUT_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
@@ -325,6 +322,9 @@
       <foreign-key foreignTable="AD_USER" name="M_INOUT_SALESREP">
         <reference local="SALESREP_ID" foreign="AD_USER_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="M_INOUT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <index name="M_INOUT_BPARTNER" unique="false">
         <index-column name="C_BPARTNER_ID"/>
       </index>
--- a/src-db/database/model/tables/M_INOUTLINE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_INOUTLINE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -97,7 +97,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -144,9 +144,6 @@
       <foreign-key foreignTable="C_UOM" name="M_INOUTLINE_C_UOM">
         <reference local="C_UOM_ID" foreign="C_UOM_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_INOUTLINE_C_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_INOUTLINE_C_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
@@ -168,6 +165,9 @@
       <foreign-key foreignTable="M_PRODUCT_UOM" name="M_INOUTLINE_M_PRODUCT_UOM">
         <reference local="M_PRODUCT_UOM_ID" foreign="M_PRODUCT_UOM_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="M_INOUTLINE_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <index name="M_INOUTLINE_INOUT" unique="false">
         <index-column name="M_INOUT_ID"/>
       </index>
--- a/src-db/database/model/tables/M_INOUTLINE_ACCTDIMENSION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_INOUTLINE_ACCTDIMENSION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -49,7 +49,7 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="C_USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="USER1_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
@@ -101,8 +101,8 @@
       <foreign-key foreignTable="M_PRODUCT" name="M_INOUTLINE_ACCTD_PRODUCT">
         <reference local="M_PRODUCT_ID" foreign="M_PRODUCT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_INOUTLINE_ACCTD_USER1">
-        <reference local="C_USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="M_INOUTLINE_ACCTD_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_INOUTLINE_ACCTD_USER2">
         <reference local="C_USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/M_INVENTORY.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_INVENTORY.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -114,8 +114,8 @@
       <foreign-key foreignTable="M_WAREHOUSE" name="M_INVENTORY_M_WAREHOUSE">
         <reference local="M_WAREHOUSE_ID" foreign="M_WAREHOUSE_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_INVENTORY_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
+      <foreign-key foreignTable="USER1" name="M_INVENTORY_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
       </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_INVENTORY_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
--- a/src-db/database/model/tables/M_MOVEMENT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_MOVEMENT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -107,12 +107,12 @@
       <foreign-key foreignTable="C_PROJECT" name="M_MOVEMENT_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_MOVEMENT_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_MOVEMENT_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="M_MOVEMENT_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <check name="M_MOVEMENT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="M_MOVEMENT_MOVE_FROMTO_LOC_CHK"><![CDATA[MOVE_FROMTO_LOCATOR IN ('Y', 'N')]]></check>
       <check name="M_MOVEMENT_PROCESSED_CHK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
--- a/src-db/database/model/tables/M_PRODUCTION.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/model/tables/M_PRODUCTION.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -123,12 +123,12 @@
       <foreign-key foreignTable="C_PROJECT" name="M_PRODUCTION_C_PROJECT">
         <reference local="C_PROJECT_ID" foreign="C_PROJECT_ID"/>
       </foreign-key>
-      <foreign-key foreignTable="C_USER1" name="M_PRODUCTION_C_USER1">
-        <reference local="USER1_ID" foreign="C_USER1_ID"/>
-      </foreign-key>
       <foreign-key foreignTable="C_USER2" name="M_PRODUCTION_C_USER2">
         <reference local="USER2_ID" foreign="C_USER2_ID"/>
       </foreign-key>
+      <foreign-key foreignTable="USER1" name="M_PRODUCTION_USER1">
+        <reference local="USER1_ID" foreign="USER1_ID"/>
+      </foreign-key>
       <check name="M_PRODUCTION_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="M_PRODUCTION_ISCREATED_CHECK"><![CDATA[ISCREATED IN ('Y', 'N')]]></check>
       <check name="M_PRODUCTION_PROCESSED_CHECK"><![CDATA[PROCESSED IN ('Y', 'N')]]></check>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/tables/USER1.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+  <database name="TABLE USER1">
+    <table name="USER1" primaryKey="USER1_KEY">
+      <column name="USER1_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
+        <default><![CDATA[SYSDATE]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="VALUE" primaryKey="false" required="true" type="VARCHAR" size="40" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="NAME" primaryKey="false" required="true" type="VARCHAR" size="60" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="DESCRIPTION" primaryKey="false" required="false" type="VARCHAR" size="255" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="ISSUMMARY" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <foreign-key foreignTable="AD_CLIENT" name="USER1_AD_CLIENT">
+        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
+      </foreign-key>
+      <foreign-key foreignTable="AD_ORG" name="USER1_AD_ORG">
+        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
+      </foreign-key>
+      <unique name="USER1_VALUE">
+        <unique-column name="AD_CLIENT_ID"/>
+        <unique-column name="VALUE"/>
+      </unique>
+      <check name="USER1_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="USER1_ISSUMMARY_CHK"><![CDATA[ISSUMMARY IN ('Y', 'N')]]></check>
+    </table>
+  </database>
--- a/src-db/database/model/triggers/C_USER1_TRG.xml	Wed Nov 14 18:56:25 2012 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-<?xml version="1.0"?>
-  <database name="TRIGGER C_USER1_TRG">
-    <trigger name="C_USER1_TRG" table="C_USER1" fires="after" insert="true" update="true" delete="true" foreach="row">
-      <body><![CDATA[
-/*************************************************************************
-* The contents of this file are subject to the Openbravo  Public  License
-* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
-* Version 1.1  with a permitted attribution clause; you may not  use this
-* file except in compliance with the License. You  may  obtain  a copy of
-* the License at http://www.openbravo.com/legal/license.html
-* Software distributed under the License  is  distributed  on  an "AS IS"
-* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-* License for the specific  language  governing  rights  and  limitations
-* under the License.
-* The Original Code is Openbravo ERP.
-* The Initial Developer of the Original Code is Openbravo SLU
-* All portions are Copyright (C) 2012 Openbravo SLU
-* All Rights Reserved.
-* Contributor(s):  ______________________________________.
-************************************************************************/
-    v_Tree_ID VARCHAR2(32);
-    v_count NUMBER;
-    
-BEGIN
-    
-    IF AD_isTriggerEnabled()='N' THEN RETURN;
-    END IF;
-
-
-  IF (INSERTING) THEN    
-
-    --  Create TreeNode --
-    SELECT c.AD_Tree_User1_ID
-    INTO v_Tree_ID
-    FROM AD_ClientInfo c
-    WHERE c.AD_Client_ID=:new.AD_Client_ID;
-
-    --  Insert into TreeNode
-    INSERT
-    INTO AD_TreeNode
-      (
-        AD_TreeNode_ID, AD_Client_ID, AD_Org_ID, IsActive,
-        Created, CreatedBy, Updated,
-        UpdatedBy, AD_Tree_ID, Node_ID,
-        Parent_ID, SeqNo
-      )
-      VALUES
-      (
-        get_uuid(), :new.AD_Client_ID, :new.AD_Org_ID, :new.IsActive,
-        :new.Created, :new.CreatedBy, :new.Updated,
-        :new.UpdatedBy, v_Tree_ID, :new.C_User1_ID,
-        '0',(
-        CASE :new.IsSummary
-          WHEN 'Y'
-          THEN 100
-          ELSE 999
-        END
-        )
-      );
-   
-  ELSIF (DELETING) THEN
-    --  Delete TreeNode --
-    --  get AD_Tree_ID
-    SELECT c.AD_Tree_User1_ID
-    INTO v_Tree_ID
-    FROM AD_ClientInfo c
-    WHERE c.AD_Client_ID=:old.AD_Client_ID;
-    
-    SELECT COUNT(*) 
-    INTO v_count 
-    FROM AD_TREENODE 
-    WHERE parent_id=:old.C_User1_ID
-    AND AD_TREE_ID=v_Tree_ID;
-
-    IF(v_count>0) THEN
-      RAISE_APPLICATION_ERROR(-20000, '@DimensionHasChildren@');
-    END IF;
-
-    DELETE
-    FROM AD_TREENODE
-    WHERE AD_CLIENT_ID=:old.AD_Client_ID
-    AND AD_Tree_ID=v_Tree_ID
-    AND Node_ID=:old.C_User1_ID;
-  END IF;
-END C_USER1_TRG
-]]></body>
-    </trigger>
-  </database>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/USER1_TRG.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -0,0 +1,88 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER USER1_TRG">
+    <trigger name="USER1_TRG" table="USER1" fires="after" insert="true" update="true" delete="true" foreach="row">
+      <body><![CDATA[
+/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License.
+* The Original Code is Openbravo ERP.
+* The Initial Developer of the Original Code is Openbravo SLU
+* All portions are Copyright (C) 2012 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+    v_Tree_ID VARCHAR2(32);
+    v_count NUMBER;
+    
+BEGIN
+    
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+
+
+  IF (INSERTING) THEN    
+
+    --  Create TreeNode --
+    SELECT c.AD_Tree_User1_ID
+    INTO v_Tree_ID
+    FROM AD_ClientInfo c
+    WHERE c.AD_Client_ID=:new.AD_Client_ID;
+
+    --  Insert into TreeNode
+    INSERT
+    INTO AD_TreeNode
+      (
+        AD_TreeNode_ID, AD_Client_ID, AD_Org_ID, IsActive,
+        Created, CreatedBy, Updated,
+        UpdatedBy, AD_Tree_ID, Node_ID,
+        Parent_ID, SeqNo
+      )
+      VALUES
+      (
+        get_uuid(), :new.AD_Client_ID, :new.AD_Org_ID, :new.IsActive,
+        :new.Created, :new.CreatedBy, :new.Updated,
+        :new.UpdatedBy, v_Tree_ID, :new.User1_ID,
+        '0',(
+        CASE :new.IsSummary
+          WHEN 'Y'
+          THEN 100
+          ELSE 999
+        END
+        )
+      );
+   
+  ELSIF (DELETING) THEN
+    --  Delete TreeNode --
+    --  get AD_Tree_ID
+    SELECT c.AD_Tree_User1_ID
+    INTO v_Tree_ID
+    FROM AD_ClientInfo c
+    WHERE c.AD_Client_ID=:old.AD_Client_ID;
+    
+    SELECT COUNT(*) 
+    INTO v_count 
+    FROM AD_TREENODE 
+    WHERE parent_id=:old.User1_ID
+    AND AD_TREE_ID=v_Tree_ID;
+
+    IF(v_count>0) THEN
+      RAISE_APPLICATION_ERROR(-20000, '@DimensionHasChildren@');
+    END IF;
+
+    DELETE
+    FROM AD_TREENODE
+    WHERE AD_CLIENT_ID=:old.AD_Client_ID
+    AND AD_Tree_ID=v_Tree_ID
+    AND Node_ID=:old.User1_ID;
+  END IF;
+END USER1_TRG
+]]></body>
+    </trigger>
+  </database>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -228430,7 +228430,7 @@
 <!--3BC8041C5D9244729D0742298A6C074F-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--3BC8041C5D9244729D0742298A6C074F-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--3BC8041C5D9244729D0742298A6C074F-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--3BC8041C5D9244729D0742298A6C074F-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--3BC8041C5D9244729D0742298A6C074F-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--3BC8041C5D9244729D0742298A6C074F-->  <AD_TABLE_ID><![CDATA[320]]></AD_TABLE_ID>
 <!--3BC8041C5D9244729D0742298A6C074F-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--3BC8041C5D9244729D0742298A6C074F-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -228574,7 +228574,7 @@
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--3C96A94065F14A29B64ACA59226F7AC8-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--3C96A94065F14A29B64ACA59226F7AC8-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <AD_TABLE_ID><![CDATA[333]]></AD_TABLE_ID>
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--3C96A94065F14A29B64ACA59226F7AC8-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -272550,7 +272550,7 @@
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--8749C3DA3EE640049CE47CFBFF47F538-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--8749C3DA3EE640049CE47CFBFF47F538-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <AD_TABLE_ID><![CDATA[800061]]></AD_TABLE_ID>
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--8749C3DA3EE640049CE47CFBFF47F538-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -276831,7 +276831,7 @@
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--8CAD7261EEDA4B9399990094D1D285FB-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--8CAD7261EEDA4B9399990094D1D285FB-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <AD_TABLE_ID><![CDATA[260]]></AD_TABLE_ID>
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--8CAD7261EEDA4B9399990094D1D285FB-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -285028,7 +285028,7 @@
 <!--A79602D83E05467292AF6614D5047042-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--A79602D83E05467292AF6614D5047042-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--A79602D83E05467292AF6614D5047042-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--A79602D83E05467292AF6614D5047042-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--A79602D83E05467292AF6614D5047042-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--A79602D83E05467292AF6614D5047042-->  <AD_TABLE_ID><![CDATA[7309051A30494738A6CFBA1CBA50DF6D]]></AD_TABLE_ID>
 <!--A79602D83E05467292AF6614D5047042-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--A79602D83E05467292AF6614D5047042-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -290056,7 +290056,7 @@
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--B16A8E3E912041B5BBA658A7E41B93E9-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--B16A8E3E912041B5BBA658A7E41B93E9-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <AD_TABLE_ID><![CDATA[16D0C2D87F744A508861CD957C4D3793]]></AD_TABLE_ID>
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID>
 <!--B16A8E3E912041B5BBA658A7E41B93E9-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
@@ -290750,7 +290750,7 @@
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--B46323A21354425EAA2FB28EA4D86B37-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--B46323A21354425EAA2FB28EA4D86B37-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <AD_TABLE_ID><![CDATA[61F97E1F887D4167A7795FF67A921D91]]></AD_TABLE_ID>
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--B46323A21354425EAA2FB28EA4D86B37-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
@@ -302489,7 +302489,7 @@
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <HELP><![CDATA[The user defined element displays the optional elements that have been defined for this account combination.]]></HELP>
-<!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <AD_TABLE_ID><![CDATA[7103F2A1BBE64BE5A7EF75F0E9315D69]]></AD_TABLE_ID>
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <AD_REFERENCE_ID><![CDATA[95E2A8B50A254B2AAE6774B8C2F28120]]></AD_REFERENCE_ID>
 <!--F89A3CE45B7B4F2990CD43E9E23AFC0C-->  <AD_REFERENCE_VALUE_ID><![CDATA[0E0D1661E18E4E05A118785A7CF146B8]]></AD_REFERENCE_VALUE_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -22583,7 +22583,7 @@
 <!--5491745132934260A5F00EF178EBC04B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--5491745132934260A5F00EF178EBC04B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5491745132934260A5F00EF178EBC04B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--5491745132934260A5F00EF178EBC04B-->  <COLUMNNAME><![CDATA[C_User1_ID]]></COLUMNNAME>
+<!--5491745132934260A5F00EF178EBC04B-->  <COLUMNNAME><![CDATA[User1_ID]]></COLUMNNAME>
 <!--5491745132934260A5F00EF178EBC04B-->  <NAME><![CDATA[1st Dimension]]></NAME>
 <!--5491745132934260A5F00EF178EBC04B-->  <PRINTNAME><![CDATA[1st Dimension]]></PRINTNAME>
 <!--5491745132934260A5F00EF178EBC04B-->  <DESCRIPTION><![CDATA[A display of optional elements that are previously defined for this account combination.]]></DESCRIPTION>
--- a/src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -90,6 +90,15 @@
 <!--8E6C239D71044E0FA6F194C449B1527B-->  <NAME><![CDATA[FIN]]></NAME>
 <!--8E6C239D71044E0FA6F194C449B1527B--></AD_MODULE_DBPREFIX>
 
+<!--B67AE38F239348659A840A204286C617--><AD_MODULE_DBPREFIX>
+<!--B67AE38F239348659A840A204286C617-->  <AD_MODULE_DBPREFIX_ID><![CDATA[B67AE38F239348659A840A204286C617]]></AD_MODULE_DBPREFIX_ID>
+<!--B67AE38F239348659A840A204286C617-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B67AE38F239348659A840A204286C617-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B67AE38F239348659A840A204286C617-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B67AE38F239348659A840A204286C617-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B67AE38F239348659A840A204286C617-->  <NAME><![CDATA[USER1]]></NAME>
+<!--B67AE38F239348659A840A204286C617--></AD_MODULE_DBPREFIX>
+
 <!--CDD7216821494D928ED06EB7B50147CB--><AD_MODULE_DBPREFIX>
 <!--CDD7216821494D928ED06EB7B50147CB-->  <AD_MODULE_DBPREFIX_ID><![CDATA[CDD7216821494D928ED06EB7B50147CB]]></AD_MODULE_DBPREFIX_ID>
 <!--CDD7216821494D928ED06EB7B50147CB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -4693,7 +4693,7 @@
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--5E6828AAA48A4DC8A29C550AD84406DA-->  <NAME><![CDATA[C_User1]]></NAME>
+<!--5E6828AAA48A4DC8A29C550AD84406DA-->  <NAME><![CDATA[User1]]></NAME>
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <DESCRIPTION><![CDATA[Refers the user dimension 1 table]]></DESCRIPTION>
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <HELP><![CDATA[Refers the user dimension 1 table]]></HELP>
 <!--5E6828AAA48A4DC8A29C550AD84406DA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
--- a/src-db/database/sourcedata/AD_TABLE.xml	Wed Nov 14 18:56:25 2012 +0100
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Wed Nov 14 19:03:27 2012 +0100
@@ -8266,7 +8266,7 @@
 <!--16D0C2D87F744A508861CD957C4D3793-->  <NAME><![CDATA[UserDimension1]]></NAME>
 <!--16D0C2D87F744A508861CD957C4D3793-->  <DESCRIPTION><![CDATA[User Defined Dimension 1 ]]></DESCRIPTION>
 <!--16D0C2D87F744A508861CD957C4D3793-->  <HELP><![CDATA[User Defined Dimension 1 ]]></HELP>
-<!--16D0C2D87F744A508861CD957C4D3793-->  <TABLENAME><![CDATA[C_User1]]></TABLENAME>
+<!--16D0C2D87F744A508861CD957C4D3793-->  <TABLENAME><![CDATA[User1]]></TABLENAME>
 <!--16D0C2D87F744A508861CD957C4D3793-->  <CLASSNAME><![CDATA[UserDimension1]]></CLASSNAME>
 <!--16D0C2D87F744A508861CD957C4D3793-->  <ISVIEW><![CDATA[N]]></ISVIEW>
 <!--16D0C2D87F744A508861CD957C4D3793-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom.java	Wed Nov 14 19:03:27 2012 +0100
@@ -1608,7 +1608,7 @@
                   priceStd, lineNetAmt.toString(), priceGross, grossAmt.toString(),
                   priceListGross.toString(), priceStdGross.toString(), isDeferred, planType,
                   periodNumber, startingPeriodId, 
-                  data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].cUser1Id, data[i].cUser2Id);
+                  data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].user1Id, data[i].cUser2Id);
 
               if (!data[i].mInoutlineId.isEmpty() && strType.equals("SHIPMENT")) {
                 CreateFromInvoiceData.insertShipmentAcctDimension(conn, this, strSequence,
@@ -1810,7 +1810,7 @@
                       CreateFromShipmentData.isInvoiced(conn, this, data[i].cInvoicelineId),
                       (qtyIsNegative ? "-" + total : total), data[i].mProductUomId,
                       strmAttributesetinstanceId, data[i].aAssetId, data[i].cProjectId,
-                      data[i].cCostcenterId, data[i].cUser1Id, data[i].cUser2Id);
+                      data[i].cCostcenterId, data[i].user1Id, data[i].cUser2Id);
 
                   if (strType.equals("INVOICE") && !data[i].cInvoicelineId.isEmpty()) {
                     CreateFromShipmentData.insertInvoiceAcctDimension(conn, this, strSequence,
@@ -1840,7 +1840,7 @@
                     data[i].cUomId, strMovementqty, data[i].cOrderlineId, strLocator,
                     CreateFromShipmentData.isInvoiced(conn, this, data[i].cInvoicelineId),
                     strQuantityorder, strProductUomId, strmAttributesetinstanceId,
-                    data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].cUser1Id,
+                    data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].user1Id,
                     data[i].cUser2Id);
 
                 if (strType.equals("INVOICE") && !data[i].cInvoicelineId.isEmpty()) {
@@ -2015,7 +2015,7 @@
                       CreateFromShipmentData.isInvoiced(conn, this, data[i].cInvoicelineId),
                       (qtyIsNegative ? "-" + total : total), data[i].mProductUomId,
                       data[i].mAttributesetinstanceId, data[i].aAssetId, data[i].cProjectId,
-                      data[i].cCostcenterId, data[i].cUser1Id, data[i].cUser2Id);
+                      data[i].cCostcenterId, data[i].user1Id, data[i].cUser2Id);
 
                   if (strType.equals("INVOICE") && !data[i].cInvoicelineId.isEmpty()) {
                     CreateFromShipmentData.insertInvoiceAcctDimension(conn, this, strSequence,
@@ -2046,7 +2046,7 @@
                     data[i].cUomId, data[i].id, data[i].cOrderlineId, strLocator,
                     CreateFromShipmentData.isInvoiced(conn, this, data[i].cInvoicelineId),
                     data[i].quantityorder, data[i].mProductUomId, data[i].mAttributesetinstanceId,
-                    data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].cUser1Id,
+                    data[i].aAssetId, data[i].cProjectId, data[i].cCostcenterId, data[i].user1Id,
                     data[i].cUser2Id);
 
                 if (strType.equals("INVOICE") && !data[i].cInvoicelineId.isEmpty()) {
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Invoice_data.xsql	Wed Nov 14 19:03:27 2012 +0100
@@ -38,7 +38,7 @@
         '' as M_InOutLine_ID, '' AS PriceActual, '' AS PriceList, '' AS PriceLimit, '' AS Description, '' as PriceStd,
         '' AS QUANTITYORDER, '' AS M_Product_UOM_ID, '' AS M_ATTRIBUTESETINSTANCE_ID, '' AS M_Offer_ID, '' AS PricePrecision,
         l.taxbaseamt, l.CancelPriceAD, '' AS Rate, '' AS gross_unit_price, '' AS grosspricelist, '' AS grosspricestd,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_ORDERLINE l left join M_MATCHPO m on  l.C_OrderLine_ID=m.C_OrderLine_ID
                                                  AND m.C_InvoiceLine_ID IS NOT NULL, 
         C_ORDER o, C_UOM uom,  M_PRODUCT p
@@ -58,7 +58,7 @@
                        HAVING (SUM(COALESCE(CI.QtyINVOICED, 0))-(COALESCE(CO.QtyORDERED,0)-SUM(COALESCE(m.Qty,0)))) >= 0 )   
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, l.QtyOrdered,l.C_UOM_ID,
         uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.taxbaseamt,l.CancelPriceAD,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, c_user2_id
         HAVING (l.QtyOrdered-SUM(COALESCE(m.Qty,0))) <> 0
         ORDER BY NAME, l.Line
       ]]>
@@ -106,7 +106,7 @@
         SELECT o.C_ORDER_ID as ID, Ad_Column_Identifier(to_char('C_Order'), to_char(o.c_order_id), to_char(?)) AS NAME,o.DocumentNo AS NAMEORDER,
         l.QtyOrdered-COALESCE(l.QTYINVOICED,0) AS QTY, l.C_UOM_ID,uom.UOMSymbol, l.M_Product_ID,
 	Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?)) AS RELATION_NAME, 
-        l.C_OrderLine_ID,l.Line, l.ad_Org_id, l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.C_OrderLine_ID,l.Line, l.ad_Org_id, l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_INVOICE_CANDIDATE_V ic, C_UOM uom, C_ORDER o, C_ORDERLINE l, M_PRODUCT p 
         WHERE l.C_UOM_ID=uom.C_UOM_ID
         AND o.C_ORDER_ID = ic.C_ORDER_ID 
@@ -117,7 +117,7 @@
         AND ic.C_Order_ID = ? 
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, l.QtyOrdered,
         l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.QTYINVOICED, l.ad_org_id,
-        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         ORDER BY NAME, l.Line
       ]]>
     </Sql>
@@ -241,10 +241,10 @@
       A.C_OrderLine_ID,A.Line, uom.stdprecision AS stdprecision, cur.priceprecision, 
       B.M_InOutLine_ID, A.Description, (CASE WHEN B.M_InOutLine_ID IS NULL THEN A.quantityOrder ELSE B.quantityOrder END) AS quantityOrder, 
       (CASE WHEN B.M_InOutLine_ID IS NULL THEN A.M_Product_UOM_ID ELSE B.M_Product_UOM_ID END) AS M_Product_UOM_ID, A.M_ATTRIBUTESETINSTANCE_ID, A.ad_org_id,
-      A.taxbaseamt, A.a_asset_id, A.c_project_id, A.c_costcenter_id, A.c_user1_id, A.c_user2_id
+      A.taxbaseamt, A.a_asset_id, A.c_project_id, A.c_costcenter_id, A.user1_id, A.c_user2_id
       FROM c_currency cur,C_UOM uom, M_PRODUCT p, 
       (SELECT l.a_asset_id, l.c_project_id, l.c_costcenter_id,
-      l.c_user1_id, l.c_user2_id, l.ad_org_id,l.C_CURRENCY_ID,l.C_UOM_ID, l.M_Product_ID, l.Line, l.Description, l.C_OrderLine_ID, (l.QtyOrdered-SUM(COALESCE(mp.Qty,0))-
+      l.user1_id, l.c_user2_id, l.ad_org_id,l.C_CURRENCY_ID,l.C_UOM_ID, l.M_Product_ID, l.Line, l.Description, l.C_OrderLine_ID, (l.QtyOrdered-SUM(COALESCE(mp.Qty,0))-
        COALESCE((SELECT SUM(COALESCE(CI.QtyINVOICED, 0))  
        FROM C_ORDERLINE CO LEFT JOIN C_INVOICELINE CI ON CI.C_ORDERLINE_ID = CO.C_ORDERLINE_ID
        WHERE  CI.C_INVOICE_ID=? AND CO.C_ORDERLINE_ID = l.c_orderline_id
@@ -257,7 +257,7 @@
         FROM C_ORDERLINE l left join M_MATCHPO mp on l.C_OrderLine_ID=mp.C_OrderLine_ID
                                                   and mp.C_InvoiceLine_ID IS NOT NULL
         GROUP BY l.ad_org_id,l.C_CURRENCY_ID,l.C_UOM_ID, l.M_Product_ID, l.Line, l.Description, l.C_OrderLine_ID, l.QtyOrdered, l.quantityOrder, l.M_Product_UOM_ID,
-        l.M_ATTRIBUTESETINSTANCE_ID, l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id) A left join 
+        l.M_ATTRIBUTESETINSTANCE_ID, l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id) A left join 
       (SELECT il.M_InOutLine_ID, il.C_OrderLine_ID, (il.MovementQty-SUM(COALESCE(mi.Qty,0))) AS QTY,
       il.quantityOrder*C_DIVIDE((il.MovementQty-SUM(COALESCE(mi.Qty,0))),(il.MovementQty)) as quantityOrder, il.M_Product_UOM_ID
         FROM M_INOUTLINE il left join M_MATCHINV mi on il.M_InOutLine_ID=mi.M_InOutLine_ID,
@@ -287,7 +287,7 @@
         l.C_OrderLine_ID,l.Line, max(uom.stdprecision) AS stdprecision, cur.priceprecision, il.M_InOutLine_ID as M_InOutLine_ID, l.Description,
         (CASE WHEN il.M_INOUTLINE_ID IS NULL THEN l.quantityOrder*C_DIVIDE((l.QtyOrdered-COALESCE(l.QTYINVOICED ,0)),(l.QtyOrdered)) ELSE il.quantityOrder END) AS quantityOrder, 
         (CASE WHEN il.M_INOUTLINE_ID IS NULL THEN l.M_Product_UOM_ID ELSE il.M_Product_UOM_ID END) AS M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id,
-        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_ORDERLINE l left join (SELECT M_InOutLine.* FROM M_InOutLine, M_InOut
                                       WHERE M_InOut.M_InOut_ID = M_InOutLine.M_InOut_ID
                                       AND M_InOutLine.IsInvoiced = 'N'
@@ -298,7 +298,7 @@
         GROUP BY l.QtyOrdered,l.qtydelivered,l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, 
         l.QTYINVOICED, il.M_InOutLine_ID, il.MovementQty, l.Description, l.quantityOrder, il.quantityOrder, 
         l.M_Product_UOM_ID, il.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID,l.ad_org_id, cur.priceprecision,
-        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.taxbaseamt, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         HAVING (l.QtyOrdered-COALESCE(l.QTYINVOICED ,0)) <> 0 
         ORDER BY l.Line
       ]]>
@@ -459,7 +459,7 @@
       s.DocumentNo AS NAMESHIPMENT,
         (l.MovementQty-SUM(COALESCE(mi.Qty,0))) AS QTY, l.C_UOM_ID, COALESCE(uomt.UOMSymbol, uom.UOMSymbol) AS UOMSymbol, 
         l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?))||' '||(CASE WHEN ma.serno IS NOT NULL THEN TO_CHAR('('||' '||ma.serno||' '||')') ELSE TO_CHAR('')  END) AS RELATION_NAME, l.M_InOutLine_ID,l.Line, l.M_InOutLine_ID as C_OrderLine_ID,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM M_INOUTLINE l
                 left join M_ATTRIBUTESETINSTANCE ma on l.M_ATTRIBUTESETINSTANCE_ID = ma.M_ATTRIBUTESETINSTANCE_ID
                 left join M_MATCHINV mi             on l.M_InOutLine_ID=mi.M_InOutLine_ID
@@ -480,7 +480,7 @@
         AND (l.c_orderline_id is null OR pl.istaxincluded = ?)
         GROUP BY s.M_InOut_ID, s.DocumentNo, s.MovementDate, l.MovementQty,l.C_UOM_ID,uom.UOMSymbol, uomt.UOMSymbol,
         l.M_Product_ID,p.NAME, ma.serno, l.M_InOutLine_ID,l.Line,l.C_OrderLine_ID,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         HAVING  (l.MovementQty-SUM(COALESCE(mi.Qty,0))) <> 0
         ORDER BY NAME, l.Line
       ]]>
@@ -502,7 +502,7 @@
         s.DocumentNo AS NAMESHIPMENT, 
         l.MovementQty AS QTY, l.C_UOM_ID,COALESCE(uomt.UOMSymbol, uom.UOMSymbol) AS UOMSymbol, 
         l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?))||' '|| (CASE WHEN ma.serno IS NOT NULL THEN TO_CHAR('('||' '||ma.serno||' '||')') ELSE TO_CHAR('')  END) AS RELATION_NAME, l.M_InOutLine_ID,l.Line, l.M_InOutLine_ID as C_OrderLine_ID,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM M_INOUTLINE l
               left join M_ATTRIBUTESETINSTANCE ma on l.M_ATTRIBUTESETINSTANCE_ID = ma.M_ATTRIBUTESETINSTANCE_ID
               left join c_orderline ol on l.c_orderline_id = ol.c_orderline_id
@@ -523,7 +523,7 @@
         AND (l.c_orderline_id is null OR pl.istaxincluded = ?)
         GROUP BY s.M_InOut_ID, s.DocumentNo, s.MovementDate, l.MovementQty,l.C_UOM_ID,uom.UOMSymbol, uomt.UOMSymbol,
         l.M_Product_ID,p.NAME,ma.serno, l.M_InOutLine_ID,l.Line,l.C_OrderLine_ID,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         ORDER BY NAME, l.Line
       ]]>
     </Sql>
@@ -543,14 +543,14 @@
       SELECT (l.MovementQty-SUM(COALESCE(mi.Qty,0))) AS ID, l.C_UOM_ID,uom.UOMSymbol, l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?)) AS NAME, 
       l.M_InOutLine_ID,l.Line, l.C_OrderLine_ID, max(uom.STDPRECISION) as stdprecision, l.Description, l.quantityOrder*C_DIVIDE((l.MovementQty-SUM(COALESCE(mi.Qty,0))),l.MovementQty) as quantityOrder, 
       l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, COALESCE(co.taxbaseamt,0) * C_DIVIDE((l.MovementQty-SUM(COALESCE(mi.Qty,0))),COALESCE(co.qtyordered,1)) as taxbaseamt,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       FROM M_INOUTLINE l left join M_MATCHINV mi on l.M_InOutLine_ID=mi.M_InOutLine_ID
             left join C_ORDERLINE co ON co.C_ORDERLINE_ID=l.C_ORDERLINE_ID,
       C_UOM uom,  M_PRODUCT p
       WHERE l.C_UOM_ID=uom.C_UOM_ID
       AND l.M_Product_ID=p.M_Product_ID
       GROUP BY l.MovementQty,l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.M_InOutLine_ID,l.Line,l.C_OrderLine_ID, l.Description,l.quantityOrder, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, co.taxbaseamt,co.qtyordered,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       ORDER BY l.Line
       ]]>
     </Sql>
@@ -564,13 +564,13 @@
         SELECT l.MovementQty AS ID, l.C_UOM_ID,uom.UOMSymbol, l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?)) AS NAME, l.M_InOutLine_ID,l.Line,
         l.C_OrderLine_ID, max(uom.STDPRECISION) as stdprecision, l.Description,l.quantityOrder, l.M_Product_UOM_ID,
         l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_UOM uom, M_INOUTLINE l, M_PRODUCT p 
         WHERE l.C_UOM_ID=uom.C_UOM_ID
         AND l.M_Product_ID=p.M_Product_ID 
         AND l.isinvoiced = 'N' 
         GROUP BY l.MovementQty,l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.M_InOutLine_ID,l.Line,l.C_OrderLine_ID, l.Description, l.quantityOrder, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         ORDER BY l.Line
       ]]>
     </Sql>
@@ -646,7 +646,7 @@
         M_Attributesetinstance_ID, PriceStd, taxbaseamt, excludeforwithholding,
         gross_unit_price, line_gross_amount, grosspricelist, grosspricestd,
         isdeferred, defplantype, periodnumber, c_period_id,
-        a_asset_id, c_project_id, c_costcenter_id, c_user1_id, c_user2_id
+        a_asset_id, c_project_id, c_costcenter_id, user1_id, c_user2_id
         )
       VALUES 
         (?, ?, ?, ?, 'Y', 
@@ -696,7 +696,7 @@
     <Parameter name="aAssetId"/>
     <Parameter name="cProjectId"/>
     <Parameter name="cCostcenterId"/>
-    <Parameter name="cUser1Id"/>
+    <Parameter name="user1Id"/>
     <Parameter name="cUser2Id"/>
   </SqlMethod>
   <SqlMethod name="insertAcctDimension" type="preparedStatement" connection="true" return="rowCount">
@@ -711,7 +711,7 @@
         )
         (SELECT GET_UUID(), ?, ?, ?, 'Y',
          now(), ?, now(), ?, C_Project_ID, C_Campaign_ID,
-         C_User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
+         User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
          C_BPartner_ID, M_Product_ID, A_Asset_ID, Amt
          FROM C_OrderLine_AcctDimension
          WHERE C_OrderLine_ID = ?
@@ -737,7 +737,7 @@
         )
         (SELECT GET_UUID(), ?, ?, ?, 'Y',
          now(), ?, now(), ?, C_Project_ID, C_Campaign_ID,
-         C_User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
+         User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
          C_BPartner_ID, M_Product_ID, A_Asset_ID,
          (Quantity*(SELECT PriceActual FROM C_InvoiceLine WHERE C_InvoiceLine_ID = ?))
          FROM M_InOutLine_AcctDimension
--- a/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_actionButton/CreateFrom_Shipment_data.xsql	Wed Nov 14 19:03:27 2012 +0100
@@ -39,7 +39,7 @@
         l.M_ATTRIBUTESETINSTANCE_ID = M_ATTRIBUTESETINSTANCE.M_ATTRIBUTESETINSTANCE_ID) as ATTRIBUTESETINSTANCENAME, 
         (SELECT C_UOM.NAME FROM M_PRODUCT_UOM, C_UOM WHERE M_PRODUCT_UOM_ID = l.M_PRODUCT_UOM_ID AND M_PRODUCT_UOM.C_UOM_ID = C_UOM.C_UOM_ID) as SECUOMSYMBOL,
         COALESCE(l.M_PRODUCT_UOM_ID,null,'0') as HAVESEC,'' as HAVESECUOM,'' AS LOCATOR,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_ORDERLINE l left join  M_MATCHPO m on l.C_OrderLine_ID=m.C_OrderLine_ID
                                                  and m.M_InOutLine_ID IS NOT NULL,
         C_ORDER o, C_UOM uom, M_PRODUCT p, C_DOCTYPE dt
@@ -54,7 +54,7 @@
         AND l.M_Product_ID=p.M_Product_ID
         AND l.C_Order_ID = ? 
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, l.QtyOrdered,l.qtydelivered, 
-        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.DESCRIPTION, l.QUANTITYORDER, l.M_PRODUCT_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.DESCRIPTION, l.QUANTITYORDER, l.M_PRODUCT_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         HAVING (l.QtyOrdered-SUM(COALESCE(m.Qty,0))) <> 0
         ORDER BY NAME, l.Line
       ]]>
@@ -100,7 +100,7 @@
         l.QtyOrdered-COALESCE(l.qtydelivered,0) AS QTY, l.C_UOM_ID,uom.UOMSymbol, l.M_Product_ID,
 	Ad_Column_Identifier(TO_CHAR('M_Product'), TO_CHAR(l.m_product_id), TO_CHAR(?)) AS RELATION_NAME, 
         l.C_OrderLine_ID,l.Line, l.C_OrderLine_ID AS ID, l.DESCRIPTION AS DESCRIPTION,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM M_INOUT_CANDIDATE_V ic, C_ORDER o, C_UOM uom, C_ORDERLINE l, M_PRODUCT p 
         WHERE o.C_ORDER_ID = l.C_ORDER_ID
         AND o.C_ORDER_ID = ic.C_ORDER_ID 
@@ -112,7 +112,7 @@
         AND l.QtyOrdered <> COALESCE(l.qtydelivered,0)
         GROUP BY o.C_ORDER_ID, o.DocumentNo, o.DateOrdered, o.GrandTotal, l.QtyOrdered,l.qtydelivered, 
         l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, l.ad_org_id, l.DESCRIPTION,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         ORDER BY NAME, l.Line
       ]]>
     </Sql>
@@ -227,7 +227,7 @@
       MAX(mu.C_UOM_ID) AS C_UOM_ID_Conversion, MAX(uom1.STDPRECISION) AS STDPRECISION, 
       l.QUANTITYORDER*C_DIVIDE((l.QtyOrdered-SUM(COALESCE(m.Qty,0))),(l.QtyOrdered)) AS quantityOrder, l.M_Product_UOM_ID,
       l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION AS DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       FROM C_ORDERLINE l left join M_MATCHPO m on l.C_OrderLine_ID=m.C_OrderLine_ID
                                               and  m.M_InOutLine_ID IS NOT NULL 
                          left join M_Product_UOM mu on l.M_Product_UOM_ID = mu.M_Product_UOM_ID
@@ -237,7 +237,7 @@
       AND l.M_Product_ID=p.M_Product_ID
       GROUP BY l.QtyOrdered,l.qtydelivered,l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, 
       uom1.BREAKDOWN, l.QUANTITYORDER, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       ORDER BY l.Line
       ]]>
     </Sql>
@@ -254,7 +254,7 @@
       MAX(mu.C_UOM_ID) AS C_UOM_ID_Conversion, MAX(uom1.STDPRECISION) AS STDPRECISION, 
       l.QUANTITYORDER*C_DIVIDE((l.QtyOrdered - COALESCE(l.QTYDELIVERED,0)),(l.QtyOrdered)) as quantityOrder, l.M_Product_UOM_ID,
       l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION AS DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       FROM C_ORDERLINE l left join M_Product_UOM mu on l.M_Product_UOM_ID = mu.M_Product_UOM_ID
                          left join C_UOM uom1 on mu.C_UOM_ID = uom1.C_UOM_ID ,
       C_UOM uom,  M_PRODUCT p  
@@ -262,7 +262,7 @@
       AND l.M_Product_ID=p.M_Product_ID
       GROUP BY l.QtyOrdered,l.qtydelivered,l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME,l.Line,l.C_OrderLine_ID, 
       uom1.BREAKDOWN, l.QUANTITYORDER, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       HAVING l.QtyOrdered - COALESCE(l.QTYDELIVERED,0)<>0
       ORDER BY l.Line
       ]]>
@@ -278,7 +278,7 @@
         SELECT i.C_Invoice_ID, Ad_Column_Identifier(TO_CHAR('C_Invoice'), TO_CHAR(i.C_Invoice_ID), TO_CHAR(?)) AS NAME, 
         l.QtyInvoiced-SUM(COALESCE(mi.Qty,0)) AS QTY, l.C_UOM_ID,uom.UOMSymbol,
         l.M_Product_ID,Ad_Column_Identifier(TO_CHAR('M_Product'), TO_CHAR(l.m_product_id), TO_CHAR(?)) AS RELATION_NAME, 
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id,
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id,
 	l.C_InvoiceLine_ID,l.Line, l.C_OrderLine_ID, l.C_InvoiceLine_ID AS ID, l.DESCRIPTION AS DESCRIPTION,
         ((l.QtyInvoiced-SUM(COALESCE(mi.Qty,0)))/COALESCE(
         (SELECT MULTIPLYRATE FROM C_UOM_CONVERSION WHERE C_UOM_CONVERSION.C_UOM_ID =
@@ -300,7 +300,7 @@
         AND l.M_Product_ID=p.M_Product_ID 
         AND l.C_Invoice_ID = ? 
         GROUP BY i.C_Invoice_ID, i.DocumentNo, DateInvoiced, GrandTotal, l.QtyInvoiced, 
-        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID, l.DESCRIPTION,l.QUANTITYORDER, l.M_PRODUCT_UOM_ID,l.M_ATTRIBUTESETINSTANCE_ID, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID, l.DESCRIPTION,l.QUANTITYORDER, l.M_PRODUCT_UOM_ID,l.M_ATTRIBUTESETINSTANCE_ID, l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         HAVING (l.QtyInvoiced-SUM(COALESCE(mi.Qty,0))) <> 0 
         ORDER BY NAME, l.Line
       ]]>
@@ -321,7 +321,7 @@
         l.M_Product_ID,Ad_Column_Identifier(TO_CHAR('M_Product'), TO_CHAR(l.m_product_id), TO_CHAR(?)) AS RELATION_NAME, 
 	l.C_InvoiceLine_ID,l.Line, l.C_OrderLine_ID, l.C_InvoiceLine_ID AS ID, 
         l.DESCRIPTION AS DESCRIPTION,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         FROM C_INVOICELINE l left join M_INOUTLINE mi on l.M_INOUTLINE_ID = mi.M_INOUTLINE_ID,
         C_INVOICE i, C_UOM uom,  M_PRODUCT p
         WHERE i.C_INVOICE_ID = l.C_INVOICE_ID 
@@ -332,7 +332,7 @@
         AND l.C_Invoice_ID = ?
         GROUP BY i.C_Invoice_ID, i.DocumentNo, DateInvoiced, GrandTotal, l.QtyInvoiced, 
         l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID, l.DESCRIPTION,
-        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+        l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
         HAVING (l.QtyInvoiced-SUM(COALESCE(mi.MOVEMENTQTY,0))) <> 0 
         ORDER BY NAME, l.Line
       ]]>
@@ -446,7 +446,7 @@
       l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?)) AS NAME, l.C_InvoiceLine_ID,l.Line, l.C_OrderLine_ID, COALESCE(uom1.BREAKDOWN, 'N') AS BREAKDOWN, 
       MAX(mu.C_UOM_ID) AS C_UOM_ID_Conversion, MAX(uom1.STDPRECISION) AS STDPRECISION, l.QUANTITYORDER, l.M_Product_UOM_ID,
       l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION AS DESCRIPTION, l.C_INVOICE_ID,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       FROM C_INVOICELINE l left join  M_Product_UOM mu on l.M_Product_UOM_ID = mu.M_Product_UOM_ID 
                            left join C_UOM uom1 on mu.C_UOM_ID = uom1.C_UOM_ID 
                            left join M_MATCHINV mi on l.C_InvoiceLine_ID=mi.C_InvoiceLine_ID,
@@ -456,7 +456,7 @@
       GROUP BY l.QtyInvoiced,
       l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID, 
       uom1.BREAKDOWN, l.QUANTITYORDER, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION, l.C_INVOICE_ID,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       HAVING l.QtyInvoiced-SUM(COALESCE(mi.Qty,0))<>0
       ORDER BY l.Line
       ]]>
@@ -473,7 +473,7 @@
       l.M_Product_ID,Ad_Column_Identifier(to_char('M_Product'), to_char(l.m_product_id), to_char(?)) AS NAME, l.C_InvoiceLine_ID,l.Line, l.C_OrderLine_ID, COALESCE(uom1.BREAKDOWN, 'N') AS BREAKDOWN, 
       MAX(mu.C_UOM_ID) AS C_UOM_ID_Conversion, MAX(uom1.STDPRECISION) AS STDPRECISION, l.QUANTITYORDER, l.M_Product_UOM_ID,
       l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION AS DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       FROM C_INVOICELINE l left join  M_Product_UOM mu on l.M_Product_UOM_ID = mu.M_Product_UOM_ID 
                            left join C_UOM uom1 on mu.C_UOM_ID = uom1.C_UOM_ID 
                            left join M_INOUTLINE mi on l.M_INOUTLINE_ID=mi.M_INOUTLINE_ID,
@@ -485,7 +485,7 @@
       GROUP BY l.QtyInvoiced,
       l.C_UOM_ID,uom.UOMSymbol,l.M_Product_ID,p.NAME, l.C_InvoiceLine_ID,l.Line,l.C_OrderLine_ID, 
       uom1.BREAKDOWN, l.QUANTITYORDER, l.M_Product_UOM_ID, l.M_ATTRIBUTESETINSTANCE_ID, l.ad_org_id, l.DESCRIPTION,
-      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.c_user1_id, l.c_user2_id
+      l.a_asset_id, l.c_project_id, l.c_costcenter_id, l.user1_id, l.c_user2_id
       HAVING l.QtyInvoiced-SUM(COALESCE(mi.MOVEMENTQTY,0))<>0
       ORDER BY l.Line
       ]]>
@@ -530,7 +530,7 @@
          M_Locator_ID,IsInvoiced, QUANTITYORDER, 
       M_PRODUCT_UOM_ID, M_ATTRIBUTESETINSTANCE_ID,
       A_ASSET_ID, C_PROJECT_ID, C_COSTCENTER_ID,
-      C_USER1_ID, C_USER2_ID)
+      USER1_ID, C_USER2_ID)
       VALUES 
         (?, ?, ?, ?, 
          'Y', now(), ?, now(), ?, 
@@ -561,7 +561,7 @@
     <Parameter name="aAssetId"/>
     <Parameter name="cProjectId"/>
     <Parameter name="cCostcenterId"/>
-    <Parameter name="cUser1Id"/>
+    <Parameter name="user1Id"/>
     <Parameter name="cUser2Id"/>
   </SqlMethod>
   <SqlMethod name="insertAcctDimension" type="preparedStatement" connection="true" return="rowCount">
@@ -570,14 +570,14 @@
       INSERT INTO M_INOUTLINE_ACCTDIMENSION
         (M_InOutLine_AcctDimension_ID,M_InOutLine_ID, AD_Client_ID,AD_Org_ID,IsActive,
         Created,CreatedBy,Updated,UpdatedBy,
-        C_Project_ID, C_Campaign_ID, C_User1_ID,
+        C_Project_ID, C_Campaign_ID, User1_ID,
         C_User2_ID, C_Activity_ID, C_Costcenter_ID,
         C_BPartner_ID, M_Product_ID, A_Asset_ID,
         Quantity
         )
         (SELECT GET_UUID(), ?, ?, ?, 'Y',
          now(), ?, now(), ?, C_Project_ID, C_Campaign_ID,
-         C_User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
+         User1_ID, C_User2_ID, C_Activity_ID, C_Costcenter_Id,
          C_BPartner_ID, M_Product_ID, A_Asset_ID,
          (Amt/(SELECT PriceActual FROM C_OrderLine WHERE C_OrderLine_ID = ?))
          FROM C_OrderLine_AcctDimension
@@ -598,7 +598,7 @@
       INSERT INTO M_INOUTLINE_ACCTDIMENSION
         (M_InOutLine_AcctDimension_ID,M_InOutLine_ID, AD_Client_ID,AD_Org_ID,IsActive,
         Created,CreatedBy,Updated,UpdatedBy,
-        C_Project_ID, C_Campaign_ID, C_User1_ID,
+        C_Project_ID, C_Campaign_ID, User1_ID,
         C_User2_ID, C_Activity_ID, C_Costcenter_ID,
         C_BPartner_ID, M_Product_ID, A_Asset_ID, 
         Quantity
--- a/src/org/openbravo/erpCommon/ad_forms/DocLineInOut_data.xsql	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLineInOut_data.xsql	Wed Nov 14 19:03:27 2012 +0100
@@ -28,7 +28,7 @@
       <![CDATA[
           SELECT COALESCE(A.AD_ORG_ID,IO.AD_ORG_ID) AS AD_ORG_ID, IO.M_PRODUCT_ID, IO.LINE, IO.DESCRIPTION,
           IO.C_UOM_ID, IO.M_INOUTLINE_ID, COALESCE(A.Quantity, IO.MOVEMENTQTY) as MOVEMENTQTY, IO.M_LOCATOR_ID,
-          A.C_Campaign_ID, COALESCE(A.C_Project_Id, IO.C_Project_Id) AS C_Project_Id, COALESCE(A.C_User1_ID, IO.C_User1_ID) AS user1Id,
+          A.C_Campaign_ID, COALESCE(A.C_Project_Id, IO.C_Project_Id) AS C_Project_Id, COALESCE(A.User1_ID, IO.User1_ID) AS user1Id,
           COALESCE(A.C_User2_ID, IO.C_User2_ID) AS user2Id, COALESCE(A.C_Costcenter_ID, IO.C_Costcenter_ID) AS C_Costcenter_ID,
           COALESCE(A.A_Asset_ID,IO.A_Asset_ID) AS A_Asset_ID, COALESCE(A.C_BPartner_ID, IO.C_BPartner_ID) AS C_BPartner_ID, A.C_Activity_ID
           FROM M_InOutLine IO left join M_InOutLine_AcctDimension A ON IO.M_InOutLine_ID = A.M_InOutLine_ID
--- a/src/org/openbravo/erpCommon/ad_forms/DocLineInvoice_data.xsql	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/ad_forms/DocLineInvoice_data.xsql	Wed Nov 14 19:03:27 2012 +0100
@@ -35,7 +35,7 @@
         C_INVOICELINE.S_RESOURCEASSIGNMENT_ID, C_INVOICELINE.TAXAMT, C_INVOICELINE.M_ATTRIBUTESETINSTANCE_ID,
         C_INVOICELINE.ISDESCRIPTION, C_INVOICELINE.QUANTITYORDER, C_INVOICELINE.M_PRODUCT_UOM_ID,
         C_INVOICELINE_ACCTDIMENSION.C_CAMPAIGN_ID, COALESCE(C_INVOICELINE_ACCTDIMENSION.C_PROJECT_ID, C_INVOICELINE.C_PROJECT_ID) AS C_PROJECT_ID,
-        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.C_USER1_ID) AS user1Id,
+        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.USER1_ID) AS user1Id,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.USER2_ID,C_INVOICELINE.C_USER2_ID) AS user2Id,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.C_COSTCENTER_ID,C_INVOICELINE.C_COSTCENTER_ID) AS C_COSTCENTER_ID,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.A_ASSET_ID,C_INVOICELINE.A_ASSET_ID) AS A_ASSET_ID,
@@ -64,7 +64,7 @@
         C_INVOICELINE.M_ATTRIBUTESETINSTANCE_ID,
         C_INVOICELINE.ISDESCRIPTION, SUM(C_INVOICELINE.QUANTITYORDER) AS QUANTITYORDER, C_INVOICELINE.M_PRODUCT_UOM_ID,
         C_INVOICELINE_ACCTDIMENSION.C_CAMPAIGN_ID, COALESCE(C_INVOICELINE_ACCTDIMENSION.C_PROJECT_ID, C_INVOICELINE.C_PROJECT_ID) AS C_PROJECT_ID,
-        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.C_USER1_ID) AS user1Id,
+        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.USER1_ID) AS user1Id,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.USER2_ID,C_INVOICELINE.C_USER2_ID) AS user2Id,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.C_COSTCENTER_ID,C_INVOICELINE.C_COSTCENTER_ID) AS C_COSTCENTER_ID,
         COALESCE(C_INVOICELINE_ACCTDIMENSION.A_ASSET_ID,C_INVOICELINE.A_ASSET_ID) AS A_ASSET_ID,
@@ -77,7 +77,7 @@
         C_INVOICELINE.PRICELIMIT, C_INVOICELINE.C_UOM_ID, C_INVOICELINE.C_TAX_ID, C_INVOICELINE.S_RESOURCEASSIGNMENT_ID,
         C_INVOICELINE.M_ATTRIBUTESETINSTANCE_ID,C_INVOICELINE.ISDESCRIPTION, C_INVOICELINE.M_PRODUCT_UOM_ID,
         C_INVOICELINE_ACCTDIMENSION.C_CAMPAIGN_ID, COALESCE(C_INVOICELINE_ACCTDIMENSION.C_PROJECT_ID, C_INVOICELINE.C_PROJECT_ID),
-        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.C_USER1_ID),
+        COALESCE(C_INVOICELINE_ACCTDIMENSION.USER1_ID,C_INVOICELINE.USER1_ID),
         COALESCE(C_INVOICELINE_ACCTDIMENSION.USER2_ID,C_INVOICELINE.C_USER2_ID),
         COALESCE(C_INVOICELINE_ACCTDIMENSION.C_COSTCENTER_ID,C_INVOICELINE.C_COSTCENTER_ID),
         COALESCE(C_INVOICELINE_ACCTDIMENSION.A_ASSET_ID,C_INVOICELINE.A_ASSET_ID),
--- a/src/org/openbravo/erpCommon/utility/WindowTreeUtility.java	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTreeUtility.java	Wed Nov 14 19:03:27 2012 +0100
@@ -61,7 +61,7 @@
       TreeType = "PC";
     else if (keyColumnName.equals("C_Costcenter_ID"))
       TreeType = "CC";
-    else if (keyColumnName.equals("C_User1_ID"))
+    else if (keyColumnName.equals("User1_ID"))
       TreeType = "U1";
     else if (keyColumnName.equals("C_User2_ID"))
       TreeType = "U2";
--- a/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Wed Nov 14 18:56:25 2012 +0100
+++ b/src/org/openbravo/erpCommon/utility/WindowTree_data.xsql	Wed Nov 14 19:03:27 2012 +0100
@@ -119,10 +119,10 @@
    <SqlMethod name="selectUser1" type="preparedStatement" return="multiple">
       <SqlMethodComment></SqlMethodComment>
       <Sql>
-        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, u1.C_User1_ID AS ID, u1.Name, u1.Description, u1.IsSummary 
+        SELECT tn.Node_ID,tn.Parent_ID,tn.SeqNo, u1.User1_ID AS ID, u1.Name, u1.Description, u1.IsSummary 
         FROM AD_TreeNode tn, 
-          C_User1 u1
-        WHERE tn.Node_ID = u1.C_User1_ID 
+          User1 u1
+        WHERE tn.Node_ID = u1.User1_ID 
         AND tn.AD_Tree_ID = ? 
         ORDER BY COALESCE(tn.Parent_ID, '-1'), tn.SeqNo
       </Sql>