Fixes issue 23078: Child tabs use parent ad_module_id as default
authorAugusto Mauch <augusto.mauch@openbravo.com>
Thu, 30 May 2013 13:35:27 +0200
changeset 20500 7331622675df
parent 20499 22cf29c433bb
child 20501 e6e46782e850
Fixes issue 23078: Child tabs use parent ad_module_id as default

The module column of child tabs should not be defaulted to the module flagged as default, but to the module of the record parent. This has been fixed for the module columns for the Menu - Menu Parameters and the Reference - User Interface Definition tabs.
modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml
modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml
--- a/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:55 2013 +0200
+++ b/modules/org.openbravo.client.application/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:27 2013 +0200
@@ -5134,7 +5134,7 @@
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <AD_VAL_RULE_ID><![CDATA[C45CFD74FF5145B0A356E9233D49996F]]></AD_VAL_RULE_ID>
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
-<!--A890369E8CB240B3825A25E6F9C4A385-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT MAX(AD_MODULE_ID) FROM AD_MODULE WHERE ISDEFAULT='Y']]></DEFAULTVALUE>
+<!--A890369E8CB240B3825A25E6F9C4A385-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT AD_MODULE_ID FROM AD_MENU WHERE AD_MENU_ID = @AD_MENU_ID@]]></DEFAULTVALUE>
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--A890369E8CB240B3825A25E6F9C4A385-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
--- a/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:55 2013 +0200
+++ b/modules/org.openbravo.client.kernel/src-db/database/sourcedata/AD_COLUMN.xml	Thu May 30 13:35:27 2013 +0200
@@ -410,7 +410,7 @@
 <!--3522895CB833445F968B548E8333EF47-->  <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID>
 <!--3522895CB833445F968B548E8333EF47-->  <AD_VAL_RULE_ID><![CDATA[C45CFD74FF5145B0A356E9233D49996F]]></AD_VAL_RULE_ID>
 <!--3522895CB833445F968B548E8333EF47-->  <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH>
-<!--3522895CB833445F968B548E8333EF47-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT MAX(AD_MODULE_ID) FROM AD_MODULE WHERE ISDEFAULT='Y']]></DEFAULTVALUE>
+<!--3522895CB833445F968B548E8333EF47-->  <DEFAULTVALUE><![CDATA[@SQL=SELECT AD_MODULE_ID FROM AD_REFERENCE WHERE AD_REFERENCE_ID = @AD_Reference_ID@]]></DEFAULTVALUE>
 <!--3522895CB833445F968B548E8333EF47-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--3522895CB833445F968B548E8333EF47-->  <ISPARENT><![CDATA[N]]></ISPARENT>
 <!--3522895CB833445F968B548E8333EF47-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>