src-db/database/model/tables/C_BANKSTATEMENTLINE.xml
author Carlos Aristu <carlos.aristu@openbravo.com>
Wed, 13 Nov 2019 19:14:34 +0100
changeset 36742 0a493e062362
parent 27289 2f26f004b049
permissions -rw-r--r--
fixes bug 42270: window can be not initialized if default saved view is missing

Having a window with several saved view personalizations, if the default saved view is not provided by the WindowSettingsActionHandler then the header's grid was not properly initialized, leaving it in an inconsistent state which did not allow to save records.

Note that it already exists a mechanism that tries to avoid this scenario by deleting the configuration used to mark a personalization as default in case it does not exists (WindowPersonalizationEventHandler). But this inconsistent state can be also reached in case the window personalization is manually deleted through the database (i.e., by deleting the corresponding obuiapp_uipersonalization record).

To fix this problem now we are forcing the grid initialization in case the default view is not found.
<?xml version="1.0"?>
  <database name="TABLE C_BANKSTATEMENTLINE">
    <table name="C_BANKSTATEMENTLINE" primaryKey="C_BANKSTATEMENTLINE_KEY">
      <column name="C_BANKSTATEMENTLINE_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="C_BANKSTATEMENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="LINE" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DESCRIPTION" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="VALUTADATE" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="DATEACCT" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_CURRENCY_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="TRXAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="STMTAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_CHARGE_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="CHARGEAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="MEMO" primaryKey="false" required="false" type="NVARCHAR" size="255" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="REFERENCENO" primaryKey="false" required="false" type="NVARCHAR" size="40" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_DEBT_PAYMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="CONVERTCHARGEAMT" primaryKey="false" required="true" type="DECIMAL" autoIncrement="false">
        <default><![CDATA[0]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_DEBT_PAYMENT_CREATE" primaryKey="false" required="false" type="CHAR" size="1" autoIncrement="false">
        <default><![CDATA[N]]></default>
        <onCreateDefault/>
      </column>
      <column name="C_DP_MANAGEMENT_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <column name="C_GLITEM_ID" primaryKey="false" required="false" type="VARCHAR" size="32" autoIncrement="false">
        <default/>
        <onCreateDefault/>
      </column>
      <foreign-key foreignTable="AD_CLIENT" name="C_BANKSTATEMENTLINE_AD_CLIENT">
        <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="AD_ORG" name="C_BANKSTATEMENTLINE_AD_ORG">
        <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_BANKSTATEMENT" name="C_BANKSTATEMENTLINE_C_BANKSTAT">
        <reference local="C_BANKSTATEMENT_ID" foreign="C_BANKSTATEMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CHARGE" name="C_BANKSTATEMENTLINE_C_CHARGE">
        <reference local="C_CHARGE_ID" foreign="C_CHARGE_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_CURRENCY" name="C_BANKSTATEMENTLINE_C_CURRENCY">
        <reference local="C_CURRENCY_ID" foreign="C_CURRENCY_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_DEBT_PAYMENT" name="C_BANKSTATEMENTLINE_C_DEBT_PAY">
        <reference local="C_DEBT_PAYMENT_ID" foreign="C_DEBT_PAYMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_DP_MANAGEMENT" name="C_BANKSTATEMENTLINE_C_DP_MANAG">
        <reference local="C_DP_MANAGEMENT_ID" foreign="C_DP_MANAGEMENT_ID"/>
      </foreign-key>
      <foreign-key foreignTable="C_GLITEM" name="C_BANKSTATEMENTLINE_C_GLITEM">
        <reference local="C_GLITEM_ID" foreign="C_GLITEM_ID"/>
      </foreign-key>
      <index name="C_BANKSTMTLINE_BANKSTMT" unique="false">
        <index-column name="C_BANKSTATEMENT_ID"/>
      </index>
      <check name="C_BANKSTATLN_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
      <check name="C_BANKSTATLN_PA_GLITEM_ID_CHK"><![CDATA[C_DEBT_PAYMENT_ID IS NOT NULL AND C_GLITEM_ID IS NULL OR C_DEBT_PAYMENT_ID IS NULL]]></check>
    </table>
  </database>