CI: promote changesets from pi to main
authorRM packaging bot <staff.rm@openbravo.com>
Mon, 18 Oct 2010 15:39:16 +0000
changeset 8574 e1c7df1ae349
parent 8550 d7ad2f964c30 (current diff)
parent 8573 1ee95cec6ce6 (diff)
child 8577 47154c0fec32
CI: promote changesets from pi to main
src-db/database/sourcedata/AD_MODULE.xml
--- a/src-db/database/model/functions/MRP_PURCHASEORDER.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/model/functions/MRP_PURCHASEORDER.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -51,6 +51,8 @@
   v_PriceStd NUMBER;
   v_TaxId varchar2(32);
   v_ProductName NVARCHAR2(90);
+  v_IsAPRMinstalled NUMBER;
+  v_DefaultPaymentRule VARCHAR2(60):=null;
 
   v_Count NUMBER;
 
@@ -133,6 +135,13 @@
           AND ISBILLTO='Y'
           AND C_BPARTNER_ID=Cur_workproposal.C_BPARTNER_ID;
 
+        SELECT COUNT(1) INTO v_IsAPRMinstalled
+        FROM ad_preference
+        WHERE property = 'FinancialManagement' AND ad_module_id <> '0';
+        IF (v_IsAPRMinstalled > 0) THEN
+          v_DefaultPaymentRule := 'P';
+        END IF;
+
         INSERT INTO C_Order
           (C_ORDER_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE,
            CREATED, CREATEDBY, UPDATED, UPDATEDBY,
@@ -150,7 +159,7 @@
          'N', v_DocumentNo,  'DR', 'CO','N',
           v_CDocTypeID, v_CDocTypeID, v_Description,
           v_DateDoc,v_DateDoc, Cur_workproposal.C_BPartner_ID,v_BillTo_ID,
-          v_BPartner_Location_ID, Cur_workproposal.C_Currency_ID, COALESCE(Cur_workproposal.paymentrule, 'P'), Cur_workproposal.C_PAYMENTTERM_ID,
+          v_BPartner_Location_ID, Cur_workproposal.C_Currency_ID, COALESCE(Cur_workproposal.paymentrule, v_DefaultPaymentRule), Cur_workproposal.C_PAYMENTTERM_ID,
           'D', 'A', 'I',COALESCE(Cur_workproposal.DeliveryViaRule,'D'),
           '5',0,0,
           v_M_Warehouse_ID, Cur_workproposal.PO_PRICELIST_ID, 'N', v_DateDoc,
--- a/src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT_ACCT.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/model/tables/FIN_FINANCIAL_ACCOUNT_ACCT.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -65,15 +65,15 @@
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="FIN_BANKFEE_ACCT" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="FIN_BANKFEE_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="FIN_BANKREVALUATIONGAIN_ACCT" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="FIN_BANKREVALUATIONGAIN_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
-      <column name="FIN_BANKREVALUATIONLOSS_ACCT" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
+      <column name="FIN_BANKREVALUATIONLOSS_ACCT" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
         <default/>
         <onCreateDefault/>
       </column>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/C_ACTIVITY_TRG.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER C_ACTIVITY_TRG">
+    <trigger name="C_ACTIVITY_TRG" table="C_ACTIVITY" fires="before" insert="true" update="true" delete="false" foreach="row">
+      <body><![CDATA[
+/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.0  (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) 2010 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+  v_xTree_ID VARCHAR2(32);
+  v_xParent_ID VARCHAR2(32);
+  v_NextNo     VARCHAR2(32);
+    
+BEGIN
+    
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+
+
+  -- Insert AD_Menu Trigger
+  --  for Translation
+  --  and TreeNode
+  IF INSERTING THEN
+    --  get AD_Tree_ID and ParentID
+    SELECT AD_TREE_ID,
+      0
+    INTO v_xTree_ID,
+      v_xParent_ID
+    FROM AD_TREE
+    WHERE treetype='AY'
+      AND 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_xTree_ID, :NEW.C_ACTIVITY_ID,
+        v_xParent_ID,(
+        CASE :NEW.IsSummary
+          WHEN 'Y'
+          THEN 100
+          ELSE 999
+        END
+        )
+      )
+      ;
+    -- Summary Nodes first
+  END IF;
+  IF UPDATING THEN
+    IF((COALESCE(:OLD.NAME, '.') <> COALESCE(:NEW.NAME, '.')
+   OR COALESCE(:OLD.Description, '.') <> COALESCE(:NEW.Description, '.')
+   OR COALESCE(:OLD.IsActive, '.') <> COALESCE(:NEW.IsActive, '.')))
+  THEN
+      IF(:OLD.IsActive!=:NEW.IsActive) THEN
+        UPDATE AD_TREENODE
+          SET IsActive=:NEW.IsActive
+        WHERE AD_Tree_ID=v_xTree_ID
+          AND Node_ID=:NEW.C_ACTIVITY_ID;
+      END IF;
+    END IF;
+  END IF;
+END C_ACTIVITY_TRG
+]]></body>
+    </trigger>
+  </database>
--- a/src-db/database/model/triggers/C_INVOICE_TRG2.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/model/triggers/C_INVOICE_TRG2.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -34,16 +34,18 @@
 
   FOR Cur_Discounts IN
     (
-    SELECT C_DISCOUNT_ID,
-      LINE,
-      CASCADE
-    FROM C_BPARTNER_DISCOUNT
-    WHERE C_BPARTNER_ID=:NEW.C_BPARTNER_ID
-      AND ISACTIVE='Y'
-      AND(ISCUSTOMER=:NEW.ISSOTRX
-      OR ISVENDOR <> :NEW.ISSOTRX)
-      AND APPLYINORDER='N'
-    ORDER BY LINE
+    SELECT BPD.C_DISCOUNT_ID,
+      BPD.LINE,
+      BPD.CASCADE
+    FROM C_BPARTNER_DISCOUNT BPD, C_DISCOUNT D
+    WHERE BPD.C_BPARTNER_ID=:NEW.C_BPARTNER_ID
+      AND D.C_DISCOUNT_ID = BPD.C_DISCOUNT_ID
+      AND BPD.ISACTIVE='Y'
+      AND D.ISACTIVE='Y'
+      AND(BPD.ISCUSTOMER=:NEW.ISSOTRX
+      OR BPD.ISVENDOR <> :NEW.ISSOTRX)
+      AND BPD.APPLYINORDER='N'
+    ORDER BY BPD.LINE
     )
   LOOP
     Ad_Sequence_Next('C_Invoice_Discount', :NEW.AD_Client_ID, v_Key) ;
--- a/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_AUXILIARINPUT.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -1156,6 +1156,18 @@
 <!--51568B79156646C8966F49F82EE51CB7-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--51568B79156646C8966F49F82EE51CB7--></AD_AUXILIARINPUT>
 
+<!--52AAC076AFF84DB58F19D32FBCE8F678--><AD_AUXILIARINPUT>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <AD_AUXILIARINPUT_ID><![CDATA[52AAC076AFF84DB58F19D32FBCE8F678]]></AD_AUXILIARINPUT_ID>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <AD_TAB_ID><![CDATA[8391062D5C6A47EA94A83A304AD720BE]]></AD_TAB_ID>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <NAME><![CDATA[isBank]]></NAME>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <CODE><![CDATA[@SQL=SELECT CASE WHEN TYPE='B' THEN 'Y' ELSE 'N' END FROM FIN_FINANCIAL_ACCOUNT WHERE FIN_FINANCIAL_ACCOUNT_ID = @FIN_FINANCIAL_ACCOUNT_ID@
+]]></CODE>
+<!--52AAC076AFF84DB58F19D32FBCE8F678-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--52AAC076AFF84DB58F19D32FBCE8F678--></AD_AUXILIARINPUT>
+
 <!--52BCE83D589C498B9803D32847553A8D--><AD_AUXILIARINPUT>
 <!--52BCE83D589C498B9803D32847553A8D-->  <AD_AUXILIARINPUT_ID><![CDATA[52BCE83D589C498B9803D32847553A8D]]></AD_AUXILIARINPUT_ID>
 <!--52BCE83D589C498B9803D32847553A8D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -281283,7 +281283,7 @@
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <HELP><![CDATA[A Client is a company or a legal entity. You cannot share data between Clients.]]></HELP>
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <COLUMNNAME><![CDATA[AD_Client_ID]]></COLUMNNAME>
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <AD_TABLE_ID><![CDATA[CB391C8A13D74B688A34017B5B5D1F5D]]></AD_TABLE_ID>
-<!--60FCCD631EA3EDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--60FCCD631EA3EDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <AD_VAL_RULE_ID><![CDATA[103]]></AD_VAL_RULE_ID>
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--60FCCD631EA3EDF8E040007F01013AD4-->  <DEFAULTVALUE><![CDATA[@AD_CLIENT_ID@]]></DEFAULTVALUE>
@@ -281318,7 +281318,7 @@
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <HELP><![CDATA[An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.]]></HELP>
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME>
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <AD_TABLE_ID><![CDATA[CB391C8A13D74B688A34017B5B5D1F5D]]></AD_TABLE_ID>
-<!--60FCCD631EA4EDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--60FCCD631EA4EDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <AD_VAL_RULE_ID><![CDATA[104]]></AD_VAL_RULE_ID>
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--60FCCD631EA4EDF8E040007F01013AD4-->  <DEFAULTVALUE><![CDATA[@AD_ORG_ID@]]></DEFAULTVALUE>
@@ -281360,7 +281360,7 @@
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--60FCCD631EA5EDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281520,10 +281520,10 @@
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <HELP><![CDATA[The Period indicates an exclusive range of dates for a calendar.]]></HELP>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <COLUMNNAME><![CDATA[C_Period_ID]]></COLUMNNAME>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <AD_TABLE_ID><![CDATA[CB391C8A13D74B688A34017B5B5D1F5D]]></AD_TABLE_ID>
-<!--60FCCD631EAAEDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--60FCCD631EAAEDF8E040007F01013AD4-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
-<!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISPARENT><![CDATA[Y]]></ISPARENT>
+<!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EAAEDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
@@ -281559,7 +281559,7 @@
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--60FCCD631EABEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EABEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--60FCCD631EABEDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281593,7 +281593,7 @@
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
-<!--60FCCD631EACEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EACEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--60FCCD631EACEDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281627,7 +281627,7 @@
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--60FCCD631EADEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EADEDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <SEQNO><![CDATA[120]]></SEQNO>
 <!--60FCCD631EADEDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281760,7 +281760,7 @@
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
-<!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--60FCCD631EB1EDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281793,7 +281793,7 @@
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
-<!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE>
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER>
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--60FCCD631EB2EDF8E040007F01013AD4-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
@@ -281821,7 +281821,7 @@
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <HELP><![CDATA[The Calendar uniquely identifies an accounting calendar.  Multiple calendars can be used.  For example you may need a standard calendar that runs from Jan 1 to Dec 31 and a fiscal calendar that runs from July 1 to June 30.]]></HELP>
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <COLUMNNAME><![CDATA[C_Calendar_ID]]></COLUMNNAME>
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <AD_TABLE_ID><![CDATA[CB391C8A13D74B688A34017B5B5D1F5D]]></AD_TABLE_ID>
-<!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
+<!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID>
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--60FCDCE9EE1EA8BEE040007F01013AC1-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -300228,7 +300228,7 @@
 <!--828EE0AE80025FA1E040007F010067C7-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--828EE0AE80025FA1E040007F010067C7-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--828EE0AE80025FA1E040007F010067C7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--828EE0AE80025FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--828EE0AE80025FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--828EE0AE80025FA1E040007F010067C7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--828EE0AE80025FA1E040007F010067C7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--828EE0AE80025FA1E040007F010067C7-->  <SEQNO><![CDATA[170]]></SEQNO>
@@ -300260,7 +300260,7 @@
 <!--828EE0AE80035FA1E040007F010067C7-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--828EE0AE80035FA1E040007F010067C7-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--828EE0AE80035FA1E040007F010067C7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--828EE0AE80035FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--828EE0AE80035FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--828EE0AE80035FA1E040007F010067C7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--828EE0AE80035FA1E040007F010067C7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--828EE0AE80035FA1E040007F010067C7-->  <SEQNO><![CDATA[180]]></SEQNO>
@@ -300292,7 +300292,7 @@
 <!--828EE0AE80045FA1E040007F010067C7-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
 <!--828EE0AE80045FA1E040007F010067C7-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--828EE0AE80045FA1E040007F010067C7-->  <ISPARENT><![CDATA[N]]></ISPARENT>
-<!--828EE0AE80045FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--828EE0AE80045FA1E040007F010067C7-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
 <!--828EE0AE80045FA1E040007F010067C7-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
 <!--828EE0AE80045FA1E040007F010067C7-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
 <!--828EE0AE80045FA1E040007F010067C7-->  <SEQNO><![CDATA[190]]></SEQNO>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -36129,7 +36129,7 @@
 <!--3125-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--3125-->  <DISPLAYLENGTH><![CDATA[10]]></DISPLAYLENGTH>
 <!--3125-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--3125-->  <SEQNO><![CDATA[200]]></SEQNO>
+<!--3125-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--3125-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--3125-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--3125-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -119419,10 +119419,9 @@
 <!--800641-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--800641-->  <AD_TAB_ID><![CDATA[167]]></AD_TAB_ID>
 <!--800641-->  <AD_COLUMN_ID><![CDATA[800476]]></AD_COLUMN_ID>
-<!--800641-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--800641-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--800641-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--800641-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--800641-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--800641-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--800641-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--800641-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -182559,6 +182558,7 @@
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <AD_COLUMN_ID><![CDATA[828EE0AE80025FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <AD_FIELDGROUP_ID><![CDATA[113]]></AD_FIELDGROUP_ID>
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1FDCBB4CB99E4F268395F71CA08DA589-->  <DISPLAYLOGIC><![CDATA[@IsBank@='Y']]></DISPLAYLOGIC>
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--1FDCBB4CB99E4F268395F71CA08DA589-->  <SEQNO><![CDATA[60]]></SEQNO>
@@ -190011,6 +190011,7 @@
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <AD_TAB_ID><![CDATA[8391062D5C6A47EA94A83A304AD720BE]]></AD_TAB_ID>
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <AD_COLUMN_ID><![CDATA[828EE0AE80035FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--58B6888DCF874A9EA3ABBDD43854503C-->  <DISPLAYLOGIC><![CDATA[@IsBank@='Y']]></DISPLAYLOGIC>
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--58B6888DCF874A9EA3ABBDD43854503C-->  <SEQNO><![CDATA[70]]></SEQNO>
@@ -199256,8 +199257,8 @@
 <!--82F2E8A160E7472CE040007F01005324-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--82F2E8A160E7472CE040007F01005324-->  <NAME><![CDATA[Location / Address]]></NAME>
 <!--82F2E8A160E7472CE040007F01005324-->  <DESCRIPTION><![CDATA[A specific place or residence.]]></DESCRIPTION>
-<!--82F2E8A160E7472CE040007F01005324-->  <HELP><![CDATA[The Location / Address field defines the location of an entity.]]></HELP>
-<!--82F2E8A160E7472CE040007F01005324-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--82F2E8A160E7472CE040007F01005324-->  <HELP><![CDATA[Address/Location of the the Financial Account within the Enterprise.]]></HELP>
+<!--82F2E8A160E7472CE040007F01005324-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
 <!--82F2E8A160E7472CE040007F01005324-->  <AD_TAB_ID><![CDATA[2845D761A8394468BD3BA4710AA888D4]]></AD_TAB_ID>
 <!--82F2E8A160E7472CE040007F01005324-->  <AD_COLUMN_ID><![CDATA[828EE0AE80485FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--82F2E8A160E7472CE040007F01005324-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
@@ -203044,7 +203045,7 @@
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--AFCAC02426F149D0B1F71C6923057A5E-->  <SEQNO><![CDATA[210]]></SEQNO>
+<!--AFCAC02426F149D0B1F71C6923057A5E-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--AFCAC02426F149D0B1F71C6923057A5E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -204949,6 +204950,7 @@
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <AD_TAB_ID><![CDATA[8391062D5C6A47EA94A83A304AD720BE]]></AD_TAB_ID>
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <AD_COLUMN_ID><![CDATA[828EE0AE80045FA1E040007F010067C7]]></AD_COLUMN_ID>
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--F9729DBFE7B446D3A96EC15752E0F063-->  <DISPLAYLOGIC><![CDATA[@IsBank@='Y']]></DISPLAYLOGIC>
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
 <!--F9729DBFE7B446D3A96EC15752E0F063-->  <SEQNO><![CDATA[80]]></SEQNO>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -32333,6 +32333,17 @@
 <!--A62EAD507C264420B0C20FB9239C9D45-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--A62EAD507C264420B0C20FB9239C9D45--></AD_MESSAGE>
 
+<!--A6688A1ACA9F47D0B86C54890D41C2E2--><AD_MESSAGE>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <AD_MESSAGE_ID><![CDATA[A6688A1ACA9F47D0B86C54890D41C2E2]]></AD_MESSAGE_ID>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <VALUE><![CDATA[APRM_FinancialAccountChk]]></VALUE>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <MSGTEXT><![CDATA[Bank Fee, Revaluation Gain and Revaluation loss accounts are mandatory and can not be left empty when financial account is of type Bank.]]></MSGTEXT>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--A6688A1ACA9F47D0B86C54890D41C2E2--></AD_MESSAGE>
+
 <!--A68C3053E180449ABF364A71CBAC9CF0--><AD_MESSAGE>
 <!--A68C3053E180449ABF364A71CBAC9CF0-->  <AD_MESSAGE_ID><![CDATA[A68C3053E180449ABF364A71CBAC9CF0]]></AD_MESSAGE_ID>
 <!--A68C3053E180449ABF364A71CBAC9CF0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_MODULE.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_MODULE.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -6,7 +6,7 @@
 <!--0-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--0-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--0-->  <NAME><![CDATA[Core]]></NAME>
-<!--0-->  <VERSION><![CDATA[2.50.18549]]></VERSION>
+<!--0-->  <VERSION><![CDATA[2.50.18573]]></VERSION>
 <!--0-->  <DESCRIPTION><![CDATA[Core module is the base one]]></DESCRIPTION>
 <!--0-->  <HELP><![CDATA[Core module is the base one, all developments in core are included as part of the standard Openbravo ERP.]]></HELP>
 <!--0-->  <URL><![CDATA[www.openbravo.com]]></URL>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -8887,6 +8887,18 @@
 <!--4B320699808A4088930E96843DCBAF6D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4B320699808A4088930E96843DCBAF6D--></AD_REF_LIST>
 
+<!--4BED47D608B841EC8016441CFA05F2FA--><AD_REF_LIST>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <AD_REF_LIST_ID><![CDATA[4BED47D608B841EC8016441CFA05F2FA]]></AD_REF_LIST_ID>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <VALUE><![CDATA[ForcedLoginURL]]></VALUE>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <NAME><![CDATA[Forced Login URL]]></NAME>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <DESCRIPTION><![CDATA[If this property is set and the Openbravo login page is accessed using a different URL, it will be redirected to this one. Value for this property should be assigned at system level.]]></DESCRIPTION>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <AD_REFERENCE_ID><![CDATA[A26BA480E2014707B47257024C3CBFF7]]></AD_REFERENCE_ID>
+<!--4BED47D608B841EC8016441CFA05F2FA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--4BED47D608B841EC8016441CFA05F2FA--></AD_REF_LIST>
+
 <!--4C6B4B638FC74B72AD5646519F92AB57--><AD_REF_LIST>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_REF_LIST_ID><![CDATA[4C6B4B638FC74B72AD5646519F92AB57]]></AD_REF_LIST_ID>
 <!--4C6B4B638FC74B72AD5646519F92AB57-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TAB.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_TAB.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -13112,10 +13112,10 @@
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ISTRANSLATIONTAB><![CDATA[N]]></ISTRANSLATIONTAB>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <HASTREE><![CDATA[N]]></HASTREE>
-<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ORDERBYCLAUSE><![CDATA[Year DESC, Startdate ASC]]></ORDERBYCLAUSE>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <PROCESSING><![CDATA[N]]></PROCESSING>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
+<!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <FILTERCLAUSE><![CDATA[PeriodStatus='O']]></FILTERCLAUSE>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA-->  <UIPATTERN><![CDATA[RO]]></UIPATTERN>
 <!--6BC4F7D2CBE94AEE939CCB5990B55FEA--></AD_TAB>
--- a/src-db/database/sourcedata/AD_TABLE.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_TABLE.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -11048,8 +11048,9 @@
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <CLASSNAME><![CDATA[PeriodControlV]]></CLASSNAME>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISVIEW><![CDATA[Y]]></ISVIEW>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ACCESSLEVEL><![CDATA[3]]></ACCESSLEVEL>
+<!--CB391C8A13D74B688A34017B5B5D1F5D-->  <AD_WINDOW_ID><![CDATA[110]]></AD_WINDOW_ID>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED>
-<!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE>
+<!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISDELETEABLE><![CDATA[N]]></ISDELETEABLE>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE>
 <!--CB391C8A13D74B688A34017B5B5D1F5D-->  <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -3635,17 +3635,6 @@
 <!--803734-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--803734--></AD_TEXTINTERFACES>
 
-<!--803740--><AD_TEXTINTERFACES>
-<!--803740-->  <AD_TEXTINTERFACES_ID><![CDATA[803740]]></AD_TEXTINTERFACES_ID>
-<!--803740-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--803740-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--803740-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--803740-->  <TEXT><![CDATA[Enterprise N-1:  ]]></TEXT>
-<!--803740-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--803740-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--803740-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--803740--></AD_TEXTINTERFACES>
-
 <!--803742--><AD_TEXTINTERFACES>
 <!--803742-->  <AD_TEXTINTERFACES_ID><![CDATA[803742]]></AD_TEXTINTERFACES_ID>
 <!--803742-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -16623,6 +16612,17 @@
 <!--48AF9E125D2143669AFAAA89D52473D3-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--48AF9E125D2143669AFAAA89D52473D3--></AD_TEXTINTERFACES>
 
+<!--49CC005EEE51425CBEC072A4BFFFC929--><AD_TEXTINTERFACES>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <AD_TEXTINTERFACES_ID><![CDATA[49CC005EEE51425CBEC072A4BFFFC929]]></AD_TEXTINTERFACES_ID>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <TEXT><![CDATA[ N-1:  ]]></TEXT>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--49CC005EEE51425CBEC072A4BFFFC929-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--49CC005EEE51425CBEC072A4BFFFC929--></AD_TEXTINTERFACES>
+
 <!--4B1D50A666314B7494E607B737A9D2D0--><AD_TEXTINTERFACES>
 <!--4B1D50A666314B7494E607B737A9D2D0-->  <AD_TEXTINTERFACES_ID><![CDATA[4B1D50A666314B7494E607B737A9D2D0]]></AD_TEXTINTERFACES_ID>
 <!--4B1D50A666314B7494E607B737A9D2D0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -16678,17 +16678,6 @@
 <!--4CF72E501DE011DEBEBB001EEC1F37D2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4CF72E501DE011DEBEBB001EEC1F37D2--></AD_TEXTINTERFACES>
 
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738--><AD_TEXTINTERFACES>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <AD_TEXTINTERFACES_ID><![CDATA[4D2F70BC4B25449CBD7E2D96F4BCC738]]></AD_TEXTINTERFACES_ID>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <TEXT><![CDATA[Period N-1:]]></TEXT>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--4D2F70BC4B25449CBD7E2D96F4BCC738--></AD_TEXTINTERFACES>
-
 <!--4D3B5BA6D00711DDA04A001D09C4A2FE--><AD_TEXTINTERFACES>
 <!--4D3B5BA6D00711DDA04A001D09C4A2FE-->  <AD_TEXTINTERFACES_ID><![CDATA[4D3B5BA6D00711DDA04A001D09C4A2FE]]></AD_TEXTINTERFACES_ID>
 <!--4D3B5BA6D00711DDA04A001D09C4A2FE-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21417,28 +21406,6 @@
 <!--A6D474BA1F7E40D1BB40DB73A393B864-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--A6D474BA1F7E40D1BB40DB73A393B864--></AD_TEXTINTERFACES>
 
-<!--A7AA90FC864240438547A5F651A2123E--><AD_TEXTINTERFACES>
-<!--A7AA90FC864240438547A5F651A2123E-->  <AD_TEXTINTERFACES_ID><![CDATA[A7AA90FC864240438547A5F651A2123E]]></AD_TEXTINTERFACES_ID>
-<!--A7AA90FC864240438547A5F651A2123E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--A7AA90FC864240438547A5F651A2123E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--A7AA90FC864240438547A5F651A2123E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--A7AA90FC864240438547A5F651A2123E-->  <TEXT><![CDATA[Enterprise:]]></TEXT>
-<!--A7AA90FC864240438547A5F651A2123E-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--A7AA90FC864240438547A5F651A2123E-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--A7AA90FC864240438547A5F651A2123E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--A7AA90FC864240438547A5F651A2123E--></AD_TEXTINTERFACES>
-
-<!--A8509B51C20A4BE5BCF112ED50FF949D--><AD_TEXTINTERFACES>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <AD_TEXTINTERFACES_ID><![CDATA[A8509B51C20A4BE5BCF112ED50FF949D]]></AD_TEXTINTERFACES_ID>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <TEXT><![CDATA[Period:]]></TEXT>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--A8509B51C20A4BE5BCF112ED50FF949D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--A8509B51C20A4BE5BCF112ED50FF949D--></AD_TEXTINTERFACES>
-
 <!--A9431A0BF54D40E380277F533EA41425--><AD_TEXTINTERFACES>
 <!--A9431A0BF54D40E380277F533EA41425-->  <AD_TEXTINTERFACES_ID><![CDATA[A9431A0BF54D40E380277F533EA41425]]></AD_TEXTINTERFACES_ID>
 <!--A9431A0BF54D40E380277F533EA41425-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21593,17 +21560,6 @@
 <!--BBF8472FF8784BFEBE792346154E0455-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--BBF8472FF8784BFEBE792346154E0455--></AD_TEXTINTERFACES>
 
-<!--BC8C1D3E6DBB42A1B363669B64A17815--><AD_TEXTINTERFACES>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <AD_TEXTINTERFACES_ID><![CDATA[BC8C1D3E6DBB42A1B363669B64A17815]]></AD_TEXTINTERFACES_ID>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <TEXT><![CDATA[Date:]]></TEXT>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--BC8C1D3E6DBB42A1B363669B64A17815-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--BC8C1D3E6DBB42A1B363669B64A17815--></AD_TEXTINTERFACES>
-
 <!--C25EA66C5D9841209AE6AB7F11AE2F27--><AD_TEXTINTERFACES>
 <!--C25EA66C5D9841209AE6AB7F11AE2F27-->  <AD_TEXTINTERFACES_ID><![CDATA[C25EA66C5D9841209AE6AB7F11AE2F27]]></AD_TEXTINTERFACES_ID>
 <!--C25EA66C5D9841209AE6AB7F11AE2F27-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -21791,17 +21747,6 @@
 <!--DD99CE7A10704467BA47244582B45F7D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--DD99CE7A10704467BA47244582B45F7D--></AD_TEXTINTERFACES>
 
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85--><AD_TEXTINTERFACES>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <AD_TEXTINTERFACES_ID><![CDATA[E03E4F8EB8374ED9AE0A029FDFF82D85]]></AD_TEXTINTERFACES_ID>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <TEXT><![CDATA[Organization:]]></TEXT>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo]]></FILENAME>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <ISUSED><![CDATA[Y]]></ISUSED>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--E03E4F8EB8374ED9AE0A029FDFF82D85--></AD_TEXTINTERFACES>
-
 <!--E061FC68EEE84521AAC366955C17ED7A--><AD_TEXTINTERFACES>
 <!--E061FC68EEE84521AAC366955C17ED7A-->  <AD_TEXTINTERFACES_ID><![CDATA[E061FC68EEE84521AAC366955C17ED7A]]></AD_TEXTINTERFACES_ID>
 <!--E061FC68EEE84521AAC366955C17ED7A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-test/org/openbravo/test/AllWebserviceTests.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-test/org/openbravo/test/AllWebserviceTests.java	Mon Oct 18 15:39:16 2010 +0000
@@ -22,7 +22,6 @@
 import junit.framework.Test;
 import junit.framework.TestSuite;
 
-import org.openbravo.test.webservice.BaseWSTest;
 import org.openbravo.test.webservice.PerformanceTest;
 import org.openbravo.test.webservice.WSReadTest;
 import org.openbravo.test.webservice.WSUpdateTest;
--- a/src-test/org/openbravo/test/dal/DalTest.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-test/org/openbravo/test/dal/DalTest.java	Mon Oct 18 15:39:16 2010 +0000
@@ -24,8 +24,10 @@
 import org.apache.log4j.Logger;
 import org.hibernate.criterion.Expression;
 import org.openbravo.base.exception.OBSecurityException;
+import org.openbravo.base.model.Property;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.structure.BaseOBObject;
+import org.openbravo.dal.core.DalUtil;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.core.SessionHandler;
 import org.openbravo.dal.service.OBCriteria;
@@ -356,4 +358,9 @@
     }
     OBDal.getInstance().remove(OBDal.getInstance().get(CashBook.class, cashBookId));
   }
+
+  public void testGetPropertyFromColumnName() {
+    final Property property = DalUtil.getProperty("AD_COLUMN", "AD_COLUMN_ID");
+    assertNotNull(property);
+  }
 }
\ No newline at end of file
--- a/src-test/org/openbravo/test/webservice/WSUpdateTest.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src-test/org/openbravo/test/webservice/WSUpdateTest.java	Mon Oct 18 15:39:16 2010 +0000
@@ -117,6 +117,20 @@
    * @throws Exception
    */
   public void testReadAddDeleteCity() throws Exception {
+    if (cityId == null) {
+      testACreateCity();
+    }
+    doTestReadAddDeleteCity(false);
+  }
+
+  public void testReadAddDeleteQueryCity() throws Exception {
+    if (cityId == null) {
+      testACreateCity();
+    }
+    doTestReadAddDeleteCity(true);
+  }
+
+  private void doTestReadAddDeleteCity(boolean doDeleteQuery) throws Exception {
     final String city = doTestGetRequest("/ws/dal/City/" + cityId, null, 200);
     String newCity = city.replaceAll("</name>", (System.currentTimeMillis() + "").substring(6)
         + "</name>");
@@ -165,7 +179,11 @@
     assertTrue(indexCity2 != -1);
 
     // delete it
-    doDirectDeleteRequest("/ws/dal/City/" + id, 200);
+    if (doDeleteQuery) {
+      doDirectDeleteRequest("/ws/dal/City?where=name='" + newName + "'", 200);
+    } else {
+      doDirectDeleteRequest("/ws/dal/City/" + id, 200);
+    }
 
     // sleep 1 seconds, so that the city is deleted
     Thread.sleep(1000);
--- a/src/build.xml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/build.xml	Mon Oct 18 15:39:16 2010 +0000
@@ -243,9 +243,10 @@
     <taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
     <!-- debug="true" will perform the in-memory model initialization before generating entities
 	if an error occurs then, then a stacktrace is printed. -->
-    <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
+    <workflow debug="false" friendlyWarnings="${friendlyWarnings}" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
       <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
       <param name="base.src.gen" value="${base.src.gen}" />
+      <param name="friendlyWarnings" value="${friendlyWarnings}"/>
       <classpath>
         <path refid="project.class.path" />
       </classpath>
@@ -279,9 +280,10 @@
     <taskdef name="workflow" classpathref="project.class.path" classname="org.openbravo.base.gen.GenerateEntitiesTask" />
     <!-- debug="true" will perform the in-memory model initialization before generating entities
 	if an error occurs then, then a stacktrace is printed. -->
-    <workflow debug="false" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
+    <workflow debug="false" friendlyWarnings="${friendlyWarnings}" srcGenPath="${base.src.gen}" propertiesFile="${base.config}/Openbravo.properties" file="${base.src}/org/openbravo/base/gen/gen_entity.oaw" fork="true" maxmemory="${build.maxmemory}">
       <param name="ob.properties.location" value="${base.config}/Openbravo.properties" />
       <param name="base.src.gen" value="${base.src.gen}" />
+      <param name="friendlyWarnings" value="${friendlyWarnings}"/>
       <syspropertyset>
          <propertyref name="java.security.egd" />
       </syspropertyset>
--- a/src/org/openbravo/base/gen/GenerateEntitiesTask.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/gen/GenerateEntitiesTask.java	Mon Oct 18 15:39:16 2010 +0000
@@ -54,6 +54,14 @@
   private String providerConfigDirectory;
   private boolean debug;
 
+  public boolean getFriendlyWarnings() {
+    return OBPropertiesProvider.isFriendlyWarnings();
+  }
+
+  public void setFriendlyWarnings(boolean doFriendlyWarnings) {
+    OBPropertiesProvider.setFriendlyWarnings(doFriendlyWarnings);
+  }
+
   public String getPropertiesFile() {
     return propertiesFile;
   }
--- a/src/org/openbravo/base/gen/ModelProviderComponent.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/gen/ModelProviderComponent.java	Mon Oct 18 15:39:16 2010 +0000
@@ -53,6 +53,14 @@
     wc.set("model", ModelProvider.getInstance());
   }
 
+  public boolean getFriendlyWarnings() {
+    return OBPropertiesProvider.isFriendlyWarnings();
+  }
+
+  public void setFriendlyWarnings(boolean doFriendlyWarnings) {
+    OBPropertiesProvider.setFriendlyWarnings(doFriendlyWarnings);
+  }
+
   public void setContainer(CompositeComponent arg0) {
   }
 
--- a/src/org/openbravo/base/gen/gen_entity.oaw	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/gen/gen_entity.oaw	Mon Oct 18 15:39:16 2010 +0000
@@ -23,6 +23,7 @@
 	<!-- sets the list of Tables in the model slot -->
 	<component class="org.openbravo.base.gen.ModelProviderComponent">
 		<propFile value="${ob.properties.location}" />
+    <friendlyWarnings value="${friendlyWarnings}" />
 	</component>	
 	<component class="oaw.xpand2.Generator">
 		 <metaModel class="oaw.type.impl.java.JavaMetaModel"/>
--- a/src/org/openbravo/base/model/Column.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/model/Column.java	Mon Oct 18 15:39:16 2010 +0000
@@ -30,6 +30,7 @@
 import org.openbravo.base.model.domaintype.PrimitiveDomainType;
 import org.openbravo.base.model.domaintype.StringDomainType;
 import org.openbravo.base.model.domaintype.StringEnumerateDomainType;
+import org.openbravo.base.session.OBPropertiesProvider;
 
 /**
  * Used by the {@link ModelProvider ModelProvider}, maps the AD_Column table in the application
@@ -280,9 +281,10 @@
       setReferenceType(((ForeignKeyDomainType) getDomainType())
           .getForeignKeyColumn(getColumnName()));
     } catch (final Exception e) {
-      log.error("No referenced column found: error >> tableName: " + table.getTableName()
-          + " - columnName: " + getColumnName(), e);
-      e.printStackTrace();
+      if (!OBPropertiesProvider.isFriendlyWarnings()) {
+        log.error("No referenced column found: error >> tableName: " + table.getTableName()
+            + " - columnName: " + getColumnName(), e);
+      }
     }
   }
 
--- a/src/org/openbravo/base/model/ModelProvider.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/model/ModelProvider.java	Mon Oct 18 15:39:16 2010 +0000
@@ -38,6 +38,7 @@
 import org.openbravo.base.model.domaintype.StringDomainType;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.provider.OBSingleton;
+import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.session.SessionFactoryController;
 import org.openbravo.base.session.UniqueConstraintColumn;
 import org.openbravo.base.util.Check;
@@ -383,10 +384,12 @@
           log.debug("Setting targetEntity and reference Property for " + thisProp);
           final Column thatColumn = c.getReferenceType();
           if (thatColumn == null) {
-            log
-                .error("Property "
-                    + thisProp
-                    + " is mapped incorrectly, there is no reference column for it, removing from the mapping");
+            if (!OBPropertiesProvider.isFriendlyWarnings()) {
+              log
+                  .error("Property "
+                      + thisProp
+                      + " is mapped incorrectly, there is no referenced column for it, removing from the mapping");
+            }
             thisProp.getEntity().getProperties().remove(thisProp);
             if (thisProp.getEntity().getIdProperties().remove(thisProp)) {
               Check.fail("Incorrect mapping for property " + thisProp
@@ -667,8 +670,15 @@
       getModel();
     // search case insensitive!
     final Table table = tablesByTableName.get(tableName.toLowerCase());
-    if (table == null)
-      Check.fail("Table: " + tableName + " not found in runtime model, is it maybe inactive?");
+    if (table == null) {
+      if (OBPropertiesProvider.isFriendlyWarnings()) {
+        // this error won't be logged...
+        throw new IllegalArgumentException("Table: " + tableName
+            + " not found in runtime model, is it maybe inactive?");
+      } else {
+        Check.fail("Table: " + tableName + " not found in runtime model, is it maybe inactive?");
+      }
+    }
     return table;
   }
 
--- a/src/org/openbravo/base/model/domaintype/BaseForeignKeyDomainType.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/model/domaintype/BaseForeignKeyDomainType.java	Mon Oct 18 15:39:16 2010 +0000
@@ -26,6 +26,7 @@
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.base.model.Reference;
+import org.openbravo.base.session.OBPropertiesProvider;
 import org.openbravo.base.validation.ValidationException;
 
 /**
@@ -48,9 +49,16 @@
       return getModelProvider().getTable(getReferedTableName(columnName)).getPrimaryKeyColumns()
           .get(0);
     } catch (final Exception e) {
-      throw new OBException("Reference column for " + columnName
-          + " not found in runtime model [ref: " + getReference().getId()
-          + ", encountered exception " + e.getMessage(), e);
+      if (OBPropertiesProvider.isFriendlyWarnings()) {
+        // won't be logged
+        throw new IllegalArgumentException("Reference column for " + columnName
+            + " not found in runtime model [ref: " + getReference().getId()
+            + ", encountered exception " + e.getMessage(), e);
+      } else {
+        throw new OBException("Reference column for " + columnName
+            + " not found in runtime model [ref: " + getReference().getId()
+            + ", encountered exception " + e.getMessage(), e);
+      }
     }
   }
 
--- a/src/org/openbravo/base/session/OBPropertiesProvider.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/base/session/OBPropertiesProvider.java	Mon Oct 18 15:39:16 2010 +0000
@@ -44,6 +44,16 @@
 
   private static OBPropertiesProvider instance = new OBPropertiesProvider();
 
+  private static boolean friendlyWarnings = false;
+
+  public static boolean isFriendlyWarnings() {
+    return friendlyWarnings;
+  }
+
+  public static void setFriendlyWarnings(boolean doFriendlyWarnings) {
+    friendlyWarnings = doFriendlyWarnings;
+  }
+
   private Properties obProperties = null;
   private Document formatXML;
 
--- a/src/org/openbravo/dal/core/DalUtil.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/dal/core/DalUtil.java	Mon Oct 18 15:39:16 2010 +0000
@@ -31,6 +31,7 @@
 import org.hibernate.proxy.HibernateProxy;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
+import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.structure.BaseOBObject;
@@ -106,6 +107,25 @@
   }
 
   /**
+   * Finds a property using the db column name and table name.
+   * 
+   * @param tableName
+   *          the table name, is used to find the {@link Entity}
+   * @param dbColumnName
+   *          is used to find the {@link Property}
+   * @return a Property or null if no property found
+   */
+  public static Property getProperty(String tableName, String dbColumnName) {
+    final Entity entity = ModelProvider.getInstance().getEntityByTableName(tableName);
+    for (Property property : entity.getProperties()) {
+      if (property.getColumnName().equalsIgnoreCase(dbColumnName)) {
+        return property;
+      }
+    }
+    return null;
+  }
+
+  /**
    * Translates a so-called property path to a property. The passed entity is the starting entity.
    * For example the property: organization.name and entity: Product will result in the
    * Organization.name property to be returned.
--- a/src/org/openbravo/dal/service/OBQuery.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/dal/service/OBQuery.java	Mon Oct 18 15:39:16 2010 +0000
@@ -158,6 +158,28 @@
     return qryStr;
   }
 
+  public Query deleteQuery() {
+    final String qryStr = createQueryString();
+    String whereClause;
+    final int whereIndex = qryStr.toLowerCase().indexOf(WHERE);
+
+    if (whereIndex != -1) {
+      whereClause = qryStr.substring(whereIndex);
+    } else {
+      throw new OBException("Exception when creating delete query " + qryStr);
+    }
+
+    try {
+      final Query qry = getSession().createQuery(
+          "DELETE FROM " + getEntity().getName() + " " + whereClause);
+      setParameters(qry);
+      return qry;
+    } catch (final Exception e) {
+      throw new OBException("Exception when creating delete query " + "DELETE FROM "
+          + getEntity().getName() + " " + whereClause, e);
+    }
+  }
+
   /**
    * Creates a Hibernate Query object using the whereclause and extra filters (for readable
    * organizations etc.).
--- a/src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/TranslationHandler.java	Mon Oct 18 15:39:16 2010 +0000
@@ -62,6 +62,8 @@
   private String m_curColumnName = null;
   /** Current Value */
   private StringBuffer m_curValue = null;
+  /** Original Value */
+  private String m_oriValue = null;
   /** SQL */
   private StringBuffer m_sql = null;
 
@@ -104,7 +106,7 @@
       m_sql = new StringBuffer();
     } else if (qName.equals(TranslationManager.XML_VALUE_TAG)) {
       m_curColumnName = attributes.getValue(TranslationManager.XML_VALUE_ATTRIBUTE_COLUMN);
-
+      m_oriValue = attributes.getValue(TranslationManager.XML_VALUE_ATTRIBUTE_ORIGINAL);
     } else if (qName.equals(TranslationManager.XML_CONTRIB)) {
       m_AD_Language = attributes.getValue(TranslationManager.XML_ATTRIBUTE_LANGUAGE);
     } else
@@ -185,9 +187,17 @@
       else
         log4j.error("Update Rows=" + no + " (Should be 1) - " + m_sql.toString());
     } else if (qName.equals(TranslationManager.XML_VALUE_TAG)) {
-      if (m_sql.length() > 0)
-        m_sql.append(",");
-      m_sql.append(m_curColumnName).append("=").append(TO_STRING(m_curValue.toString()));
+      String value = "";
+      if (m_curValue != null && !m_curValue.toString().equals("")) {
+        value = TO_STRING(m_curValue.toString());
+      } else if (m_oriValue != null && !m_oriValue.toString().equals("")) {
+        value = TO_STRING(m_oriValue.toString());
+      }
+      if (!value.equals("")) {
+        if (m_sql.length() > 0)
+          m_sql.append(",");
+        m_sql.append(m_curColumnName).append("=").append(value);
+      }
     } else if (qName.equals(TranslationManager.XML_CONTRIB)) {
       if (log4j.isDebugEnabled())
         log4j.debug("Contibutors:" + TO_STRING(m_curValue.toString()));
--- a/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpCommon/ad_reports/GeneralAccountingReportsPDF.fo	Mon Oct 18 15:39:16 2010 +0000
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
+ * All portions are Copyright (C) 2001-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -38,15 +38,15 @@
 					<fo:table-row>
 						<fo:table-cell>
 							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Enterprise:</fo:inline>
+								<fo:inline font-weight="bold">Client</fo:inline>:&#160;&#160;
 								<fo:inline id="fieldCompanyName">xx</fo:inline>&#160;&#160;<fo:inline id="fieldAgnoInitial"/>
-								<fo:inline font-weight="bold">Organization:</fo:inline>
+								<fo:inline font-weight="bold">Organization</fo:inline>:&#160;&#160;
 								<fo:inline id="fieldOrg">xx</fo:inline>
 							</fo:block>
 						</fo:table-cell>
 						<fo:table-cell>
 							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Date:</fo:inline>
+								<fo:inline font-weight="bold">Date</fo:inline>:&#160;&#160;
 								<fo:inline id="fieldDate">xx</fo:inline>
 							</fo:block>
 						</fo:table-cell>
@@ -54,16 +54,19 @@
 					<fo:table-row>
 						<fo:table-cell number-columns-spanned="2">
 							<fo:block font-size="10pt" text-align="left" padding-top="2pt">
-								<fo:inline font-weight="bold">Conditions:</fo:inline>
-								<fo:inline>Period:</fo:inline>
-								<fo:inline id="fieldPeriod">xx</fo:inline>&#160;&#160;&#160;&#160;<fo:inline>Period N-1:</fo:inline>
+								<fo:inline font-weight="bold">Conditions:</fo:inline>&#160;&#160;
+								<fo:inline>Period</fo:inline>:&#160;&#160;
+								<fo:inline id="fieldPeriod">xx</fo:inline>&#160;&#160;&#160;&#160;<fo:inline>Period</fo:inline>&#160;N-1:&#160;&#160;
 								<fo:inline id="fieldPeriodRef">xx</fo:inline>
 							</fo:block>
 						</fo:table-cell>
 					</fo:table-row>
 					<fo:table-row>
 						<fo:table-cell number-columns-spanned="2" border-bottom-style="solid" border-bottom-width="0.5pt">
-							<fo:block font-size="10pt" padding-bottom="4pt" text-align="left" padding-top="2pt" start-indent="2.4cm">Enterprise N-1:&#160;&#160;<fo:inline id="fieldCompanyName">Period</fo:inline>&#160;&#160;<fo:inline id="fieldAgnoRef">xx</fo:inline>
+							<fo:block font-size="10pt" padding-bottom="4pt" text-align="left" padding-top="2pt" start-indent="2.4cm">
+                                <fo:inline>Client</fo:inline>&#160;N-1:&#160;&#160;
+                                <fo:inline id="fieldCompanyName">Period</fo:inline>&#160;&#160;
+                                <fo:inline id="fieldAgnoRef">xx</fo:inline>
 							</fo:block>
 						</fo:table-cell>
 					</fo:table-row>
--- a/src/org/openbravo/erpCommon/security/Login.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpCommon/security/Login.java	Mon Oct 18 15:39:16 2010 +0000
@@ -29,6 +29,8 @@
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.businessUtility.Preferences;
+import org.openbravo.erpCommon.utility.PropertyException;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.system.Client;
 import org.openbravo.xmlEngine.XmlDocument;
@@ -76,6 +78,26 @@
     } else if (vars.commandIn("LOGO")) {
       printPageLogo(response, vars);
     } else {
+      // Look for forced login URL property and redirect in case it is set and the login is accessed
+      // through a different URL
+      try {
+        String forcedLoginUrl = Preferences.getPreferenceValue("ForcedLoginURL", true, null, null,
+            null, null, null);
+        log4j.debug("Forced URL: " + forcedLoginUrl);
+        if (forcedLoginUrl != null && !forcedLoginUrl.isEmpty()
+            && !request.getRequestURL().toString().startsWith(forcedLoginUrl)) {
+          log4j.info("Redireting login from " + request.getRequestURL().toString()
+              + " to forced login URL " + forcedLoginUrl);
+          response.sendRedirect(forcedLoginUrl);
+          return;
+        }
+      } catch (PropertyException e) {
+        // Ignore and continue with the standard login. PropertyException is raised in case property
+        // is not defined (standard case) or in case of conflict.
+        log4j.debug("Exception getting ForcedLoginURL", e);
+      }
+
+      // Standard login
       String textDirection = vars.getSessionValue("#TextDirection", "LTR");
       printPageFrameIdentificacion(response, "Login_Welcome.html?Command=WELCOME",
           "Login_F1.html?Command=LOGIN", textDirection);
--- a/src/org/openbravo/erpReports/C_OrderJR.jrxml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpReports/C_OrderJR.jrxml	Mon Oct 18 15:39:16 2010 +0000
@@ -156,9 +156,9 @@
 C_ORDER.DESCRIPTION, C_ORDER.DATEORDERED, C_ORDER.DOCUMENTNO AS ALBARAN, 
 C_BPARTNER.NAME2 || ' (' || C_BPARTNER.NAME || ')' AS COMPLETE_NAME, AD_CLIENT.DESCRIPTION AS ENTITY, 
 C_LOCATION_DESCRIPTION(AD_ORGINFO.C_LOCATION_ID) AS LOCATION,  AD_ORG.ad_org_id AS ORGANIZATIONID, C_ORDER.docstatus AS STATUS,
-(TO_CHAR(AD_USER.NAME) || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER.TAXID) || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(ADDRESS1) || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || TO_CHAR(POSTAL) || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(C_BPARTNER_LOCATION.PHONE) ||  CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER_LOCATION.FAX) ||
+(COALESCE(TO_CHAR(AD_USER.NAME), '') || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER.TAXID), '') || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(ADDRESS1), '') || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(POSTAL), '') || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(C_BPARTNER_LOCATION.PHONE), '') || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER_LOCATION.FAX), '') ||
 CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA, AD_ORGINFO.TAXID AS ORG_TAXID, SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN,
 AD_ORG.NAME AS ORG_NAME, DELIVERYRULE.NAME AS DELIVERYTERM, PAYMENTTERM.TERM AS PAYMENTTERM
 FROM C_BPARTNER_LOCATION left join C_LOCATION L on C_BPARTNER_LOCATION.C_LOCATION_ID = L.C_LOCATION_ID
--- a/src/org/openbravo/erpReports/RptC_Invoice.jrxml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpReports/RptC_Invoice.jrxml	Mon Oct 18 15:39:16 2010 +0000
@@ -211,10 +211,10 @@
 C_INVOICE.DATEINVOICED, C_INVOICE.DOCUMENTNO, C_BPARTNER.VALUE AS CODE_BPARTNER, 
 AD_CLIENT.DESCRIPTION AS ENTITY, C_Location_Description(AD_ORGINFO.C_LOCATION_ID) AS LOCATION, C_CURRENCY.ISO_CODE AS CURRENCY_CODE,C_CURRENCY.CURSYMBOL AS SYMBOL,
 C_PAYMENTTERM.NAME AS PAYTERM, AD_ORGINFO.ad_org_id AS ORGANIZATIONID, C_INVOICE.docstatus AS STATUS, AD_ORG.NAME AS ORG_NAME, AD_ORGINFO.TAXID AS ORG_TAXID,
-C_BPARTNER.TAXID AS BP_TAXID, (TO_CHAR(AD_USER.NAME) || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER.TAXID) ||
-CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END || TO_CHAR(ADDRESS1) || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || TO_CHAR(POSTAL) ||
-CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER_LOCATION.PHONE) ||  CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(C_BPARTNER_LOCATION.FAX) || CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA, SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN
+C_BPARTNER.TAXID AS BP_TAXID, (COALESCE(TO_CHAR(AD_USER.NAME), '') || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER.TAXID), '') || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(ADDRESS1), '') || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(POSTAL), '') || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(C_BPARTNER_LOCATION.PHONE), '') || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER_LOCATION.FAX), '') ||
+CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA, SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN
 FROM C_INVOICE LEFT JOIN C_BPARTNER ON C_INVOICE.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
 	 LEFT JOIN AD_USER ON C_INVOICE.AD_USER_ID = AD_USER.AD_USER_ID
 	 LEFT JOIN C_BPARTNER_LOCATION ON C_INVOICE.C_BPARTNER_LOCATION_ID = C_BPARTNER_LOCATION.C_BPARTNER_LOCATION_ID
--- a/src/org/openbravo/erpReports/RptC_OrderPO.jrxml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpReports/RptC_OrderPO.jrxml	Mon Oct 18 15:39:16 2010 +0000
@@ -210,9 +210,10 @@
 DELIVERYRULE.NAME AS DELIVERYTERM, C_CURRENCY.ISO_CODE, PAYMENTTERM.TERM AS PAYMENTTERM, (SELECT o.AD_ORG_ID FROM AD_ORG o JOIN AD_OrgType t USING (AD_ORGTYPE_ID)
 WHERE AD_ISORGINCLUDED(C_ORDER.ad_org_id, o.ad_org_id, C_ORDER.ad_client_id)<>-1
 AND (t.IsLegalEntity='Y' OR t.IsAcctLegalEntity='Y')) AS ORGANIZATIONID, C_ORDER.docstatus AS STATUS,
-(TO_CHAR(AD_USER.NAME) || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER.TAXID) || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(ADDRESS1) || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || TO_CHAR(POSTAL) || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER_LOCATION.PHONE) ||
-CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER_LOCATION.FAX) || CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA,
+(COALESCE(TO_CHAR(AD_USER.NAME), '') || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER.TAXID), '') || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(ADDRESS1), '') || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(POSTAL), '') || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(C_BPARTNER_LOCATION.PHONE), '') || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER_LOCATION.FAX), '') ||
+CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA,
 AD_ORGINFO.TAXID AS ORG_TAXID, SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN, AD_ORG.NAME AS ORG_NAME
 FROM   C_ORDER left join C_BPARTNER_LOCATION on C_ORDER.BILLTO_ID = C_BPARTNER_LOCATION.C_BPARTNER_ID
 	       left join AD_USER on C_ORDER.AD_USER_ID = AD_USER.AD_USER_ID
--- a/src/org/openbravo/erpReports/RptM_InOut.jrxml	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/erpReports/RptM_InOut.jrxml	Mon Oct 18 15:39:16 2010 +0000
@@ -186,10 +186,10 @@
 C_REGION.NAME AS REGION, M_INOUT.DOCUMENTNO, M_INOUT.MOVEMENTDATE, C_BPARTNER.VALUE AS PARTNER_VALUE, C_BPARTNER.TAXID, 
 MAX(C_ORDER.POREFERENCE) AS POREFERENCE, AD_CLIENT.DESCRIPTION AS ENTITY, C_LOCATION_DESCRIPTION(AD_ORGINFO.C_LOCATION_ID) AS ENTITY_LOCATION,
 C_ORDER.DATEPROMISED, AD_ORGINFO.AD_ORG_ID AS ORGANIZATIONID, M_INOUT.docstatus AS STATUS, C_BPARTNER.NAME AS BP_NAME, AD_ORG.NAME AS ORG_NAME,
-AD_ORGINFO.TAXID AS ORG_TAXID, C_Location_Description(AD_ORGINFO.C_LOCATION_ID) AS LOCATION, (TO_CHAR(AD_USER.NAME) || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(C_BPARTNER.TAXID) || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END || TO_CHAR(ADDRESS1) || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || TO_CHAR(POSTAL) ||
-CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END || TO_CHAR(C_BPARTNER_LOCATION.PHONE) || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END ||
-TO_CHAR(C_BPARTNER_LOCATION.FAX) || CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA,
+AD_ORGINFO.TAXID AS ORG_TAXID, C_Location_Description(AD_ORGINFO.C_LOCATION_ID) AS LOCATION, (COALESCE(TO_CHAR(AD_USER.NAME), '') || CASE WHEN AD_USER.NAME IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER.TAXID), '') || CASE WHEN C_BPARTNER.TAXID IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(ADDRESS1), '') || CASE WHEN ADDRESS1 IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(POSTAL), '') || CASE WHEN POSTAL IS null THEN '' ELSE CHR(13) END ||
+COALESCE(TO_CHAR(C_BPARTNER_LOCATION.PHONE), '') || CASE WHEN C_BPARTNER_LOCATION.PHONE IS null THEN '' ELSE CHR(13) END || COALESCE(TO_CHAR(C_BPARTNER_LOCATION.FAX), '') ||
+CASE WHEN C_BPARTNER_LOCATION.FAX IS null THEN '' ELSE CHR(13) END) AS BP_DATA,
 SHOWLOGO, SHOWCOMPANYDATA, HEADERMARGIN
 FROM C_BPARTNER_LOCATION right join M_INOUT on M_INOUT.C_BPARTNER_LOCATION_ID = C_BPARTNER_LOCATION.C_BPARTNER_LOCATION_ID
 			 left join C_LOCATION on C_BPARTNER_LOCATION.C_LOCATION_ID = C_LOCATION.C_LOCATION_ID
--- a/src/org/openbravo/service/rest/DalWebService.java	Thu Oct 14 20:28:52 2010 +0000
+++ b/src/org/openbravo/service/rest/DalWebService.java	Mon Oct 18 15:39:16 2010 +0000
@@ -290,6 +290,40 @@
       return;
     }
 
+    if (segments.length == 1) {
+      final String entityName = segments[0];
+
+      try {
+        ModelProvider.getInstance().getEntity(entityName);
+      } catch (final CheckException ce) {
+        throw new ResourceNotFoundException("Resource " + entityName + " not found", ce);
+      }
+
+      final String where = request.getParameter(PARAMETER_WHERE);
+      String whereOrderByClause = "";
+      if (where != null) {
+        whereOrderByClause += where;
+      }
+
+      try {
+        final OBQuery<BaseOBObject> obq = OBDal.getInstance().createQuery(entityName,
+            whereOrderByClause);
+
+        Object o = obq.deleteQuery().executeUpdate();
+
+        final String resultXml = WebServiceUtil.getInstance().createResultXMLWithLogWarning(
+            "Action performed successfully", "Removed business objects " + o, null);
+        response.setContentType("text/xml;charset=UTF-8");
+        final Writer w = response.getWriter();
+        w.write(resultXml);
+        w.close();
+      } catch (final Exception e) {
+        throw new OBException(e);
+      }
+
+      return;
+    }
+
     // use the content of the request
     doChangeAction(path, request, response, ChangeAction.DELETE);
   }