Fixed issue 30721. Fixed issue 30724
authorJonathan Bueno <jonathan.bueno@openbravo.com>
Thu, 12 Nov 2015 10:20:59 +0100
changeset 27858 eca7d0102a7e
parent 27857 b48e8a24dcb3
child 27859 cebfec5bc6a9
child 28520 4db903ca2876
Fixed issue 30721. Fixed issue 30724

Now is possible to insert or delete records in product characteristic configuration tab.


When a variant characteristic is added to a generic product all its values are copied in the configuration tab.
src-db/database/model/tables/M_CHARACTERISTIC.xml
src-db/database/model/tables/M_PRODUCT_CH.xml
src-db/database/model/tables/M_PRODUCT_CH_CONF.xml
src-db/database/model/triggers/M_CH_SUBSET_VALUE_TRG.xml
src-db/database/model/triggers/M_CH_VALUE_TRG.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src-db/database/sourcedata/AD_TAB.xml
src/org/openbravo/erpCommon/ad_callouts/SL_ProductCh_Characteristic.java
src/org/openbravo/event/ProductCharacteristicEventHandler.java
--- a/src-db/database/model/tables/M_CHARACTERISTIC.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/model/tables/M_CHARACTERISTIC.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -49,6 +49,10 @@
         <default><![CDATA[N]]></default>
         <onCreateDefault/>
       </column>
+      <column name="ISEXPLODECONF" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault><![CDATA['Y']]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="M_CHARACTERISTIC_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -59,6 +63,7 @@
         <reference local="AD_TREE_ID" foreign="AD_TREE_ID"/>
       </foreign-key>
       <check name="M_CHARACTERISTIC_ISACTIVE"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="M_CHARACTERISTIC_ISEXPLODECONF"><![CDATA[ISEXPLODECONF IN ('Y', 'N')]]></check>
       <check name="M_CHARACTERISTIC_VARIANT"><![CDATA[ISVARIANT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/M_PRODUCT_CH.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/model/tables/M_PRODUCT_CH.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -65,6 +65,10 @@
         <default><![CDATA[SALES]]></default>
         <onCreateDefault><![CDATA['ALL']]></onCreateDefault>
       </column>
+      <column name="ISEXPLODECONF" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[Y]]></default>
+        <onCreateDefault><![CDATA['Y']]></onCreateDefault>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="M_PRODUCT_CH_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
@@ -87,6 +91,7 @@
       <check name="M_PRODUCT_CH_DEFINE_IMAGE_CHK"><![CDATA[DEFINE_IMAGE IN ('Y', 'N')]]></check>
       <check name="M_PRODUCT_CH_DEFINE_PRICE_CHK"><![CDATA[DEFINE_PRICE IN ('Y', 'N')]]></check>
       <check name="M_PRODUCT_CH_ISACTIVE"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
+      <check name="M_PRODUCT_CH_ISEXPLODECONF"><![CDATA[ISEXPLODECONF IN ('Y', 'N')]]></check>
       <check name="M_PRODUCT_CH_VARIANT"><![CDATA[ISVARIANT IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/tables/M_PRODUCT_CH_CONF.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/model/tables/M_PRODUCT_CH_CONF.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -71,6 +71,10 @@
       <index name="M_PRODUCT_CH_CONF_CHAR" unique="false">
         <index-column name="M_PRODUCT_CH_ID"/>
       </index>
+      <index name="M_PRODUCT_CH_CONF_UNIQ" unique="true">
+        <index-column name="M_PRODUCT_CH_ID"/>
+        <index-column name="M_CH_VALUE_ID"/>
+      </index>
       <check name="M_PRODUCT_CH_CONF_ISACTIVE"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check>
     </table>
   </database>
--- a/src-db/database/model/triggers/M_CH_SUBSET_VALUE_TRG.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/model/triggers/M_CH_SUBSET_VALUE_TRG.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -54,7 +54,10 @@
       pch.m_product_ch_id, :new.m_ch_value_id, :new.skcode
       FROM m_product_ch pch
       WHERE pch.m_characteristic_id = v_characteristic_id
-        AND pch.m_ch_subset_id = :new.m_ch_subset_id;
+        AND pch.m_ch_subset_id = :new.m_ch_subset_id
+        AND exists (select 1 from  m_product where m_product_id=pch.m_product_id AND isgeneric='Y')
+        AND pch.isvariant='Y'
+        AND pch.isexplodeconf = 'Y';
   END IF;
 END M_CH_SUBSET_VALUE_TRG
 ]]></body>
--- a/src-db/database/model/triggers/M_CH_VALUE_TRG.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/model/triggers/M_CH_VALUE_TRG.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -90,8 +90,9 @@
       FROM m_product_ch pch
       WHERE pch.m_characteristic_id = :new.m_characteristic_id
         AND pch.m_ch_subset_id IS NULL
-		AND exists (select 1 from  m_product where m_product_id=pch.m_product_id AND isgeneric='Y')
-		AND pch.isvariant='Y';
+        AND exists (select 1 from  m_product where m_product_id=pch.m_product_id AND isgeneric='Y')
+        AND pch.isvariant='Y'
+        AND pch.isexplodeconf = 'Y';
   END IF;
 
   IF DELETING THEN
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -231674,6 +231674,76 @@
 <!--1E97CCA9378942AD8FAA59637244881C-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
 <!--1E97CCA9378942AD8FAA59637244881C--></AD_COLUMN>
 
+<!--1E9B4165B4D9671EE050007F01005834--><AD_COLUMN>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_COLUMN_ID><![CDATA[1E9B4165B4D9671EE050007F01005834]]></AD_COLUMN_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E9B4165B4D9671EE050007F01005834-->  <NAME><![CDATA[Explode Configuration Tab]]></NAME>
+<!--1E9B4165B4D9671EE050007F01005834-->  <HELP><![CDATA[Determines if the values of the characteristic needs to be automatically inserted in the Configuration tab when the characteristic is added to a Generic product as a Variant.]]></HELP>
+<!--1E9B4165B4D9671EE050007F01005834-->  <COLUMNNAME><![CDATA[IsExplodeConf]]></COLUMNNAME>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_TABLE_ID><![CDATA[8E4A6598CA2747B6B0E7257C6F3DEB19]]></AD_TABLE_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--1E9B4165B4D9671EE050007F01005834-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1E9B4165B4D9671EE050007F01005834-->  <SEQNO><![CDATA[190]]></SEQNO>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_ELEMENT_ID><![CDATA[1E9B451D4487ECDDE050007F010057FB]]></AD_ELEMENT_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1E9B4165B4D9671EE050007F01005834-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1E9B4165B4D9671EE050007F01005834-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E9B4165B4D9671EE050007F01005834-->  <POSITION><![CDATA[17]]></POSITION>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--1E9B4165B4D9671EE050007F01005834-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--1E9B4165B4D9671EE050007F01005834-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--1E9B4165B4D9671EE050007F01005834-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--1E9B4165B4D9671EE050007F01005834--></AD_COLUMN>
+
+<!--1E9B451D4492ECDDE050007F010057FB--><AD_COLUMN>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_COLUMN_ID><![CDATA[1E9B451D4492ECDDE050007F010057FB]]></AD_COLUMN_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <NAME><![CDATA[Explode Configuration Tab]]></NAME>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <HELP><![CDATA[Determines if the values of the characteristic needs to be automatically inserted in the Configuration tab when the characteristic is added to a Generic product as a Variant.]]></HELP>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <COLUMNNAME><![CDATA[IsExplodeConf]]></COLUMNNAME>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_TABLE_ID><![CDATA[91C26DEA4B3D4C05B4F277D009220872]]></AD_TABLE_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <SEQNO><![CDATA[180]]></SEQNO>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_ELEMENT_ID><![CDATA[1E9B451D4487ECDDE050007F010057FB]]></AD_ELEMENT_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <POSITION><![CDATA[13]]></POSITION>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--1E9B451D4492ECDDE050007F010057FB-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--1E9B451D4492ECDDE050007F010057FB--></AD_COLUMN>
+
 <!--1EAEE8AF503C4348B565DB81325665D2--><AD_COLUMN>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <AD_COLUMN_ID><![CDATA[1EAEE8AF503C4348B565DB81325665D2]]></AD_COLUMN_ID>
 <!--1EAEE8AF503C4348B565DB81325665D2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -333856,7 +333926,7 @@
 <!--DFE34CED8F06273BE040007F0100319F-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--DFE34CED8F06273BE040007F0100319F-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--DFE34CED8F06273BE040007F0100319F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--DFE34CED8F06273BE040007F0100319F-->  <POSITION><![CDATA[16]]></POSITION>
+<!--DFE34CED8F06273BE040007F0100319F-->  <POSITION><![CDATA[12]]></POSITION>
 <!--DFE34CED8F06273BE040007F0100319F-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--DFE34CED8F06273BE040007F0100319F-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--DFE34CED8F06273BE040007F0100319F-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -21660,6 +21660,19 @@
 <!--1E5CB7185CF94CC595BDB2A1C2129C75-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--1E5CB7185CF94CC595BDB2A1C2129C75--></AD_ELEMENT>
 
+<!--1E9B451D4487ECDDE050007F010057FB--><AD_ELEMENT>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <AD_ELEMENT_ID><![CDATA[1E9B451D4487ECDDE050007F010057FB]]></AD_ELEMENT_ID>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <COLUMNNAME><![CDATA[IsExplodeConf]]></COLUMNNAME>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <NAME><![CDATA[Explode Configuration Tab]]></NAME>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <PRINTNAME><![CDATA[Explode Configuration Tab]]></PRINTNAME>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <HELP><![CDATA[Determines if the values of the characteristic needs to be automatically inserted in the Configuration tab when the characteristic is added to a Generic product as a Variant.]]></HELP>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E9B451D4487ECDDE050007F010057FB-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--1E9B451D4487ECDDE050007F010057FB--></AD_ELEMENT>
+
 <!--1E9CF24A3AC043188D0462EAF1CFDABF--><AD_ELEMENT>
 <!--1E9CF24A3AC043188D0462EAF1CFDABF-->  <AD_ELEMENT_ID><![CDATA[1E9CF24A3AC043188D0462EAF1CFDABF]]></AD_ELEMENT_ID>
 <!--1E9CF24A3AC043188D0462EAF1CFDABF-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -189776,6 +189776,62 @@
 <!--1E92B8595A2540319DD25495D459830C-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--1E92B8595A2540319DD25495D459830C--></AD_FIELD>
 
+<!--1E9B451D448DECDDE050007F010057FB--><AD_FIELD>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_FIELD_ID><![CDATA[1E9B451D448DECDDE050007F010057FB]]></AD_FIELD_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E9B451D448DECDDE050007F010057FB-->  <NAME><![CDATA[Explode Configuration Tab]]></NAME>
+<!--1E9B451D448DECDDE050007F010057FB-->  <HELP><![CDATA[Determines if the values of the characteristic needs to be automatically inserted in the Configuration tab when the characteristic is added to a Generic product as a Variant.]]></HELP>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_TAB_ID><![CDATA[769BB4BF6B0B4C39AD28E9A00D260F33]]></AD_TAB_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_COLUMN_ID><![CDATA[1E9B4165B4D9671EE050007F01005834]]></AD_COLUMN_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1E9B451D448DECDDE050007F010057FB-->  <DISPLAYLOGIC><![CDATA[@isVariant@='Y'&@IsGeneric@='Y']]></DISPLAYLOGIC>
+<!--1E9B451D448DECDDE050007F010057FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1E9B451D448DECDDE050007F010057FB-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1E9B451D448DECDDE050007F010057FB-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--1E9B451D448DECDDE050007F010057FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E9B451D448DECDDE050007F010057FB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--1E9B451D448DECDDE050007F010057FB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--1E9B451D448DECDDE050007F010057FB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--1E9B451D448DECDDE050007F010057FB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--1E9B451D448DECDDE050007F010057FB--></AD_FIELD>
+
+<!--1E9B451D4497ECDDE050007F010057FB--><AD_FIELD>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_FIELD_ID><![CDATA[1E9B451D4497ECDDE050007F010057FB]]></AD_FIELD_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <NAME><![CDATA[Explode Configuration Tab]]></NAME>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <HELP><![CDATA[Determines if the values of the characteristic needs to be automatically inserted in the Configuration tab when the characteristic is added to a Generic product as a Variant.]]></HELP>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_TAB_ID><![CDATA[A661A0A05DCD4650BCB14B010C87F0AA]]></AD_TAB_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_COLUMN_ID><![CDATA[1E9B451D4492ECDDE050007F010057FB]]></AD_COLUMN_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <DISPLAYLOGIC><![CDATA[@isVariant@='Y']]></DISPLAYLOGIC>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--1E9B451D4497ECDDE050007F010057FB-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--1E9B451D4497ECDDE050007F010057FB--></AD_FIELD>
+
 <!--1E9F1F317C2141688C1213BA43F1954A--><AD_FIELD>
 <!--1E9F1F317C2141688C1213BA43F1954A-->  <AD_FIELD_ID><![CDATA[1E9F1F317C2141688C1213BA43F1954A]]></AD_FIELD_ID>
 <!--1E9F1F317C2141688C1213BA43F1954A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -292008,7 +292064,6 @@
 <!--D6CBFD85215F563DE040007F0100228D-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
 <!--D6CBFD85215F563DE040007F0100228D-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--D6CBFD85215F563DE040007F0100228D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--D6CBFD85215F563DE040007F0100228D-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--D6CBFD85215F563DE040007F0100228D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D6CBFD85215F563DE040007F0100228D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D6CBFD85215F563DE040007F0100228D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -292117,7 +292172,7 @@
 <!--D6DAE72466B920D3E040007F01003941-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--D6DAE72466B920D3E040007F01003941-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--D6DAE72466B920D3E040007F01003941-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--D6DAE72466B920D3E040007F01003941-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--D6DAE72466B920D3E040007F01003941-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--D6DAE72466B920D3E040007F01003941-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D6DAE72466B920D3E040007F01003941-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D6DAE72466B920D3E040007F01003941-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -293738,7 +293793,7 @@
 <!--D9E9D213D42EB578E040007F010015CC-->  <DISPLAYLOGIC><![CDATA[@isGeneric@='Y']]></DISPLAYLOGIC>
 <!--D9E9D213D42EB578E040007F010015CC-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--D9E9D213D42EB578E040007F010015CC-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--D9E9D213D42EB578E040007F010015CC-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--D9E9D213D42EB578E040007F010015CC-->  <SEQNO><![CDATA[80]]></SEQNO>
 <!--D9E9D213D42EB578E040007F010015CC-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--D9E9D213D42EB578E040007F010015CC-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--D9E9D213D42EB578E040007F010015CC-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -294294,7 +294349,7 @@
 <!--DA64BC057C44893CE040007F010046BF-->  <DISPLAYLOGIC><![CDATA[@isGeneric@='Y']]></DISPLAYLOGIC>
 <!--DA64BC057C44893CE040007F010046BF-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--DA64BC057C44893CE040007F010046BF-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--DA64BC057C44893CE040007F010046BF-->  <SEQNO><![CDATA[60]]></SEQNO>
+<!--DA64BC057C44893CE040007F010046BF-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--DA64BC057C44893CE040007F010046BF-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--DA64BC057C44893CE040007F010046BF-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--DA64BC057C44893CE040007F010046BF-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -297236,7 +297291,7 @@
 <!--E084A90237DEECEDE040007F0100697D-->  <DISPLAYLOGIC><![CDATA[@isGeneric@='Y']]></DISPLAYLOGIC>
 <!--E084A90237DEECEDE040007F0100697D-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--E084A90237DEECEDE040007F0100697D-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--E084A90237DEECEDE040007F0100697D-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--E084A90237DEECEDE040007F0100697D-->  <SEQNO><![CDATA[70]]></SEQNO>
 <!--E084A90237DEECEDE040007F0100697D-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--E084A90237DEECEDE040007F0100697D-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--E084A90237DEECEDE040007F0100697D-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -298965,7 +299020,7 @@
 <!--E631BD24883BDB56E040007F01002672-->  <DISPLAYLOGIC><![CDATA[@isGeneric@='Y' & @Define_Price@='Y']]></DISPLAYLOGIC>
 <!--E631BD24883BDB56E040007F01002672-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--E631BD24883BDB56E040007F01002672-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--E631BD24883BDB56E040007F01002672-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--E631BD24883BDB56E040007F01002672-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--E631BD24883BDB56E040007F01002672-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--E631BD24883BDB56E040007F01002672-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--E631BD24883BDB56E040007F01002672-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
--- a/src-db/database/sourcedata/AD_TAB.xml	Thu Nov 12 09:56:28 2015 +0100
+++ b/src-db/database/sourcedata/AD_TAB.xml	Thu Nov 12 10:20:59 2015 +0100
@@ -16427,7 +16427,7 @@
 <!--77B382924865466E8333415AAA1263CC-->  <IMPORTFIELDS><![CDATA[N]]></IMPORTFIELDS>
 <!--77B382924865466E8333415AAA1263CC-->  <ISSORTTAB><![CDATA[N]]></ISSORTTAB>
 <!--77B382924865466E8333415AAA1263CC-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--77B382924865466E8333415AAA1263CC-->  <UIPATTERN><![CDATA[SR]]></UIPATTERN>
+<!--77B382924865466E8333415AAA1263CC-->  <UIPATTERN><![CDATA[STD]]></UIPATTERN>
 <!--77B382924865466E8333415AAA1263CC-->  <SHOWPARENTBUTTONS><![CDATA[Y]]></SHOWPARENTBUTTONS>
 <!--77B382924865466E8333415AAA1263CC-->  <DISPLAYLOGIC><![CDATA[@IsGeneric@='Y']]></DISPLAYLOGIC>
 <!--77B382924865466E8333415AAA1263CC-->  <DISABLE_PARENT_KEY_PROPERTY><![CDATA[N]]></DISABLE_PARENT_KEY_PROPERTY>
--- a/src/org/openbravo/erpCommon/ad_callouts/SL_ProductCh_Characteristic.java	Thu Nov 12 09:56:28 2015 +0100
+++ b/src/org/openbravo/erpCommon/ad_callouts/SL_ProductCh_Characteristic.java	Thu Nov 12 10:20:59 2015 +0100
@@ -35,6 +35,7 @@
     if (StringUtils.isNotBlank(strCharacteristicId)) {
       Characteristic ch = OBDal.getInstance().get(Characteristic.class, strCharacteristicId);
       info.addResult("inpisvariant", ch.isVariant() ? "Y" : "N");
+      info.addResult("inpisexplodeconf", ch.isExplodeConfigurationTab() ? "Y" : "N");
     }
   }
 
--- a/src/org/openbravo/event/ProductCharacteristicEventHandler.java	Thu Nov 12 09:56:28 2015 +0100
+++ b/src/org/openbravo/event/ProductCharacteristicEventHandler.java	Thu Nov 12 10:20:59 2015 +0100
@@ -56,8 +56,7 @@
     return entities;
   }
 
-  public void onDelete(@Observes
-  EntityDeleteEvent event) {
+  public void onDelete(@Observes EntityDeleteEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -69,8 +68,7 @@
     deleteProductCharacteristicValue(prCh);
   }
 
-  public void onSave(@Observes
-  EntityNewEvent event) {
+  public void onSave(@Observes EntityNewEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -108,29 +106,30 @@
       final Entity prodCharEntity = ModelProvider.getInstance().getEntity(
           ProductCharacteristic.ENTITY_NAME);
 
-      final Property charConfListProperty = prodCharEntity
-          .getProperty(ProductCharacteristic.PROPERTY_PRODUCTCHARACTERISTICCONFLIST);
-      @SuppressWarnings("unchecked")
-      List<ProductCharacteristicConf> prChConfs = (List<ProductCharacteristicConf>) event
-          .getCurrentState(charConfListProperty);
+      if (prCh.isExplodeConfigurationTab()) {
+        final Property charConfListProperty = prodCharEntity
+            .getProperty(ProductCharacteristic.PROPERTY_PRODUCTCHARACTERISTICCONFLIST);
+        @SuppressWarnings("unchecked")
+        List<ProductCharacteristicConf> prChConfs = (List<ProductCharacteristicConf>) event
+            .getCurrentState(charConfListProperty);
 
-      ScrollableResults scroll = getValuesToAdd(prCh);
-      try {
-        while (scroll.next()) {
-          Object[] strChValue = scroll.get();
-          String chValueId = (String) strChValue[0];
-          String chValueCode = (String) strChValue[1];
-          Boolean chValueActive = (Boolean) strChValue[2];
-          prChConfs.add(getCharacteristicConf(prCh, chValueId, chValueCode, chValueActive));
+        ScrollableResults scroll = getValuesToAdd(prCh);
+        try {
+          while (scroll.next()) {
+            Object[] strChValue = scroll.get();
+            String chValueId = (String) strChValue[0];
+            String chValueCode = (String) strChValue[1];
+            Boolean chValueActive = (Boolean) strChValue[2];
+            prChConfs.add(getCharacteristicConf(prCh, chValueId, chValueCode, chValueActive));
+          }
+        } finally {
+          scroll.close();
         }
-      } finally {
-        scroll.close();
       }
     }
   }
 
-  public void onUpdate(@Observes
-  EntityUpdateEvent event) {
+  public void onUpdate(@Observes EntityUpdateEvent event) {
     if (!isValidEvent(event)) {
       return;
     }
@@ -196,67 +195,70 @@
         }
       }
 
-      final Property charConfListProperty = prodCharEntity
-          .getProperty(ProductCharacteristic.PROPERTY_PRODUCTCHARACTERISTICCONFLIST);
-      @SuppressWarnings("unchecked")
-      List<ProductCharacteristicConf> prChConfs = (List<ProductCharacteristicConf>) event
-          .getCurrentState(charConfListProperty);
+      if (prCh.isExplodeConfigurationTab()) {
+        final Property charConfListProperty = prodCharEntity
+            .getProperty(ProductCharacteristic.PROPERTY_PRODUCTCHARACTERISTICCONFLIST);
+        @SuppressWarnings("unchecked")
+        List<ProductCharacteristicConf> prChConfs = (List<ProductCharacteristicConf>) event
+            .getCurrentState(charConfListProperty);
 
-      StringBuffer hql = new StringBuffer();
-      hql.append(" select cv." + CharacteristicValue.PROPERTY_ID);
-      hql.append(" from " + ProductCharacteristicConf.ENTITY_NAME + " as pcc");
-      hql.append(" join pcc." + ProductCharacteristicConf.PROPERTY_CHARACTERISTICVALUE + " as cv");
-      hql.append(" where pcc." + ProductCharacteristicConf.PROPERTY_CHARACTERISTICOFPRODUCT
-          + " = :pc");
-      Query query = OBDal.getInstance().getSession().createQuery(hql.toString());
-      query.setParameter("pc", prCh);
-      @SuppressWarnings("unchecked")
-      final List<String> existingValues = query.list();
+        StringBuffer hql = new StringBuffer();
+        hql.append(" select cv." + CharacteristicValue.PROPERTY_ID);
+        hql.append(" from " + ProductCharacteristicConf.ENTITY_NAME + " as pcc");
+        hql.append(" join pcc." + ProductCharacteristicConf.PROPERTY_CHARACTERISTICVALUE + " as cv");
+        hql.append(" where pcc." + ProductCharacteristicConf.PROPERTY_CHARACTERISTICOFPRODUCT
+            + " = :pc");
+        Query query = OBDal.getInstance().getSession().createQuery(hql.toString());
+        query.setParameter("pc", prCh);
+        @SuppressWarnings("unchecked")
+        final List<String> existingValues = query.list();
 
-      ScrollableResults scroll = getValuesToAdd(prCh);
-      try {
-        while (scroll.next()) {
-          Object[] strChValue = scroll.get();
-          String chValueId = (String) strChValue[0];
-          String chValueCode = (String) strChValue[1];
-          Boolean chValueActive = (Boolean) strChValue[2];
+        ScrollableResults scroll = getValuesToAdd(prCh);
+        try {
+          while (scroll.next()) {
+            Object[] strChValue = scroll.get();
+            String chValueId = (String) strChValue[0];
+            String chValueCode = (String) strChValue[1];
+            Boolean chValueActive = (Boolean) strChValue[2];
 
-          if (existingValues.remove(chValueId)) {
+            if (existingValues.remove(chValueId)) {
+              OBCriteria<ProductCharacteristicConf> prChConfCrit = OBDal.getInstance()
+                  .createCriteria(ProductCharacteristicConf.class);
+              prChConfCrit.add(Restrictions.eq(
+                  ProductCharacteristicConf.PROPERTY_CHARACTERISTICOFPRODUCT, prCh));
+              prChConfCrit.add(Restrictions.eq(
+                  ProductCharacteristicConf.PROPERTY_CHARACTERISTICVALUE,
+                  OBDal.getInstance().get(CharacteristicValue.class, chValueId)));
+              prChConfCrit.setFilterOnActive(false);
+              ProductCharacteristicConf prChConf = (ProductCharacteristicConf) prChConfCrit
+                  .uniqueResult();
+              prChConf.setCode(chValueCode);
+              prChConf.setActive(chValueActive);
+              continue;
+            }
+            prChConfs.add(getCharacteristicConf(prCh, chValueId, chValueCode, chValueActive));
+          }
+        } finally {
+          scroll.close();
+        }
+
+        // remove not needed
+        if (!existingValues.isEmpty()) {
+          for (String strChValueId : existingValues) {
             OBCriteria<ProductCharacteristicConf> prChConfCrit = OBDal.getInstance()
                 .createCriteria(ProductCharacteristicConf.class);
             prChConfCrit.add(Restrictions.eq(
                 ProductCharacteristicConf.PROPERTY_CHARACTERISTICOFPRODUCT, prCh));
             prChConfCrit.add(Restrictions.eq(
                 ProductCharacteristicConf.PROPERTY_CHARACTERISTICVALUE,
-                OBDal.getInstance().get(CharacteristicValue.class, chValueId)));
+                OBDal.getInstance().get(CharacteristicValue.class, strChValueId)));
             prChConfCrit.setFilterOnActive(false);
             ProductCharacteristicConf prChConf = (ProductCharacteristicConf) prChConfCrit
                 .uniqueResult();
-            prChConf.setCode(chValueCode);
-            prChConf.setActive(chValueActive);
-            continue;
+
+            prChConfs.remove(prChConf);
+            OBDal.getInstance().remove(prChConf);
           }
-          prChConfs.add(getCharacteristicConf(prCh, chValueId, chValueCode, chValueActive));
-        }
-      } finally {
-        scroll.close();
-      }
-
-      // remove not needed
-      if (!existingValues.isEmpty()) {
-        for (String strChValueId : existingValues) {
-          OBCriteria<ProductCharacteristicConf> prChConfCrit = OBDal.getInstance().createCriteria(
-              ProductCharacteristicConf.class);
-          prChConfCrit.add(Restrictions.eq(
-              ProductCharacteristicConf.PROPERTY_CHARACTERISTICOFPRODUCT, prCh));
-          prChConfCrit.add(Restrictions.eq(ProductCharacteristicConf.PROPERTY_CHARACTERISTICVALUE,
-              OBDal.getInstance().get(CharacteristicValue.class, strChValueId)));
-          prChConfCrit.setFilterOnActive(false);
-          ProductCharacteristicConf prChConf = (ProductCharacteristicConf) prChConfCrit
-              .uniqueResult();
-
-          prChConfs.remove(prChConf);
-          OBDal.getInstance().remove(prChConf);
         }
       }
     }