Fixes issue 15139: Lack a constraint in the tables MA_Sequenceproduct and MA_Wrphaseproduct
authorSivaraman Rajagopal <sivaraman.rajagopal@openbravo.com>
Wed, 01 Dec 2010 18:25:23 +0530
changeset 9063 bcc76c8a4527
parent 9061 47efb3cb3ff3
child 9064 36e9c0a1809f
child 9065 0a0215b9cd0b
Fixes issue 15139: Lack a constraint in the tables MA_Sequenceproduct and MA_Wrphaseproduct

the following constrains have been added for both MA_SEQUENCEPRODUCT and MA_WRPHASEPRODUCT tables.

((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))

Impacts:
None
src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml
src-db/database/model/tables/MA_WRPHASEPRODUCT.xml
src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml	Wed Dec 01 12:34:26 2010 +0100
+++ b/src-db/database/model/tables/MA_SEQUENCEPRODUCT.xml	Wed Dec 01 18:25:23 2010 +0530
@@ -103,5 +103,6 @@
         <index-column name="MA_SEQUENCE_ID"/>
       </index>
       <check name="MA_SEQUENCEPROD_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="MA_SEQUENCEPRODUCT_CHECK1"><![CDATA[((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/MA_WRPHASEPRODUCT.xml	Wed Dec 01 12:34:26 2010 +0100
+++ b/src-db/database/model/tables/MA_WRPHASEPRODUCT.xml	Wed Dec 01 18:25:23 2010 +0530
@@ -91,6 +91,7 @@
         <index-column name="M_PRODUCT_ID"/>
         <index-column name="MA_WRPHASE_ID"/>
       </index>
+      <check name="MA_WRPHASEPRODUCT_CHECK1"><![CDATA[((QUANTITYORDER IS NULL) AND (M_PRODUCT_UOM_ID IS NULL)) OR ((QUANTITYORDER IS NOT NULL) AND (M_PRODUCT_UOM_ID IS NOT NULL))]]></check>
       <check name="MA_WRPHASEPRODUCT_ISACTIVE_CHK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
       <check name="MA_WRPHASEPRODUCT_PRODUCTI_CHK"><![CDATA[PRODUCTIONTYPE IN ('+', '-')]]></check>
     </table>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Dec 01 12:34:26 2010 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Wed Dec 01 18:25:23 2010 +0530
@@ -29553,6 +29553,17 @@
 <!--02758CBBA66D42108380E648EF7C026E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--02758CBBA66D42108380E648EF7C026E--></AD_MESSAGE>
 
+<!--0285053A21CD44D78A85AB89B3D7AE81--><AD_MESSAGE>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <AD_MESSAGE_ID><![CDATA[0285053A21CD44D78A85AB89B3D7AE81]]></AD_MESSAGE_ID>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <VALUE><![CDATA[MA_SEQUENCEPRODUCT_CHECK1]]></VALUE>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <MSGTEXT><![CDATA[Order Quantity and Order UOM are co-dependent fields. We can not assign value for one field and leave other empty.]]></MSGTEXT>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--0285053A21CD44D78A85AB89B3D7AE81-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--0285053A21CD44D78A85AB89B3D7AE81--></AD_MESSAGE>
+
 <!--03C7B58E00F246E7BA06D153B3DB2D5B--><AD_MESSAGE>
 <!--03C7B58E00F246E7BA06D153B3DB2D5B-->  <AD_MESSAGE_ID><![CDATA[03C7B58E00F246E7BA06D153B3DB2D5B]]></AD_MESSAGE_ID>
 <!--03C7B58E00F246E7BA06D153B3DB2D5B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -31872,6 +31883,17 @@
 <!--7BF4B33E022E407BB6615E106AC7A8A6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--7BF4B33E022E407BB6615E106AC7A8A6--></AD_MESSAGE>
 
+<!--7D189EE376C54A0A877A6FB41C6E2E68--><AD_MESSAGE>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <AD_MESSAGE_ID><![CDATA[7D189EE376C54A0A877A6FB41C6E2E68]]></AD_MESSAGE_ID>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <VALUE><![CDATA[MA_WRPHASEPRODUCT_CHECK1]]></VALUE>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <MSGTEXT><![CDATA[Order Quantity and Order UOM are co-dependent fields. We can not assign value for one field and leave other empty.]]></MSGTEXT>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--7D189EE376C54A0A877A6FB41C6E2E68-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--7D189EE376C54A0A877A6FB41C6E2E68--></AD_MESSAGE>
+
 <!--7DB1074FDA3549A1A211A0A0E16B79A7--><AD_MESSAGE>
 <!--7DB1074FDA3549A1A211A0A0E16B79A7-->  <AD_MESSAGE_ID><![CDATA[7DB1074FDA3549A1A211A0A0E16B79A7]]></AD_MESSAGE_ID>
 <!--7DB1074FDA3549A1A211A0A0E16B79A7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>