details:   https://code.openbravo.com/erp/devel/pi/rev/049bdfcedbd2
changeset: 18545:049bdfcedbd2
user:      Jon Alegría <jon.alegria <at> openbravo.com>
date:      Wed Nov 14 14:56:51 2012 +0100
summary:   Fixes issue 0022242: Incorrect message shown when changing the 
attribute set
of a product with stock

diffstat:

 src-db/database/model/triggers/M_PRODUCT_TRG.xml |   6 +++++-
 src-db/database/sourcedata/AD_MESSAGE.xml        |  11 +++++++++++
 2 files changed, 16 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r ead23f919c59 -r 049bdfcedbd2 
src-db/database/model/triggers/M_PRODUCT_TRG.xml
--- a/src-db/database/model/triggers/M_PRODUCT_TRG.xml  Wed Nov 14 14:36:31 
2012 +0100
+++ b/src-db/database/model/triggers/M_PRODUCT_TRG.xml  Wed Nov 14 14:56:51 
2012 +0100
@@ -67,7 +67,11 @@
    FROM M_Storage_Pending s
    WHERE s.M_Product_ID=:new.M_Product_ID) A;
    IF (v_ControlNo <> 0) THEN
-    RAISE_APPLICATION_ERROR(-20000, '@20400@');
+    IF (COALESCE(:new.m_attributeset_id,'null') <> 
COALESCE(:old.m_attributeset_id,'null')) THEN
+      RAISE_APPLICATION_ERROR(-20000, '@20633@');
+    ELSE
+      RAISE_APPLICATION_ERROR(-20000, '@20400@');
+    END IF;
    END IF;
   END IF;
        
diff -r ead23f919c59 -r 049bdfcedbd2 src-db/database/sourcedata/AD_MESSAGE.xml
--- a/src-db/database/sourcedata/AD_MESSAGE.xml Wed Nov 14 14:36:31 2012 +0100
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml Wed Nov 14 14:56:51 2012 +0100
@@ -16676,6 +16676,17 @@
 <!--4F9AD483DEA4498084BA29355FFAE421-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--4F9AD483DEA4498084BA29355FFAE421--></AD_MESSAGE>
 
+<!--500B6327350749859F5AFA87372EB711--><AD_MESSAGE>
+<!--500B6327350749859F5AFA87372EB711-->  
<AD_MESSAGE_ID><![CDATA[500B6327350749859F5AFA87372EB711]]></AD_MESSAGE_ID>
+<!--500B6327350749859F5AFA87372EB711-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--500B6327350749859F5AFA87372EB711-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--500B6327350749859F5AFA87372EB711-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--500B6327350749859F5AFA87372EB711-->  <VALUE><![CDATA[20633]]></VALUE>
+<!--500B6327350749859F5AFA87372EB711-->  <MSGTEXT><![CDATA[You cannot change 
the attribute set of the product because it has inventory]]></MSGTEXT>
+<!--500B6327350749859F5AFA87372EB711-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--500B6327350749859F5AFA87372EB711-->  
<AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--500B6327350749859F5AFA87372EB711--></AD_MESSAGE>
+
 <!--50F02C25EBA04667AC266B20C03AC623--><AD_MESSAGE>
 <!--50F02C25EBA04667AC266B20C03AC623-->  
<AD_MESSAGE_ID><![CDATA[50F02C25EBA04667AC266B20C03AC623]]></AD_MESSAGE_ID>
 <!--50F02C25EBA04667AC266B20C03AC623-->  
<AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits

Reply via email to