Fixes issue 15467: Transaction duplicated when running process in parallel
authorMikel Irurita <mikel.irurita@openbravo.com>
Thu, 16 Dec 2010 18:27:23 +0100
changeset 9094 f907026ed134
parent 9093 37e8a6ede4c0
child 9095 6e16e86fe9c0
Fixes issue 15467: Transaction duplicated when running process in parallel
src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml
src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Thu Dec 16 18:14:08 2010 +0100
+++ b/src-db/database/model/tables/FIN_FINACC_TRANSACTION.xml	Thu Dec 16 18:27:23 2010 +0100
@@ -147,5 +147,8 @@
       <foreign-key foreignTable="FIN_PAYMENT" name="FIN_PAYMENT_TRANSACTION">
         <reference local="FIN_PAYMENT_ID" foreign="FIN_PAYMENT_ID"/>
       </foreign-key>
+      <unique name="FIN_FINACC_TRANSACTION_UN">
+        <unique-column name="FIN_PAYMENT_ID"/>
+      </unique>
     </table>
   </database>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Dec 16 18:14:08 2010 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Thu Dec 16 18:27:23 2010 +0100
@@ -29542,6 +29542,18 @@
 <!--01C801B95D4A44E2956F9057C7E38A6A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--01C801B95D4A44E2956F9057C7E38A6A--></AD_MESSAGE>
 
+<!--01E9E568C781498CB5FB53035B47CB14--><AD_MESSAGE>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <AD_MESSAGE_ID><![CDATA[01E9E568C781498CB5FB53035B47CB14]]></AD_MESSAGE_ID>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <VALUE><![CDATA[FIN_FINACC_TRANSACTION_UN]]></VALUE>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <MSGTEXT><![CDATA[<br/>You are trying to add a transaction for a payment that was already added by another user/process.
+<br/>No transaction has been created. Please click on close button, refresh the window and try it again.]]></MSGTEXT>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--01E9E568C781498CB5FB53035B47CB14-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--01E9E568C781498CB5FB53035B47CB14--></AD_MESSAGE>
+
 <!--02758CBBA66D42108380E648EF7C026E--><AD_MESSAGE>
 <!--02758CBBA66D42108380E648EF7C026E-->  <AD_MESSAGE_ID><![CDATA[02758CBBA66D42108380E648EF7C026E]]></AD_MESSAGE_ID>
 <!--02758CBBA66D42108380E648EF7C026E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>