[cross-org] DB infra to define allowed cross org link
authorAsier Lostalé <asier.lostale@openbravo.com>
Wed, 17 Feb 2016 16:55:49 +0100
changeset 29041 ae290995c081
parent 29040 073d6fca1781
child 29042 88a8738a51bf
[cross-org] DB infra to define allowed cross org link
src-db/database/model/tables/AD_COLUMN.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
--- a/src-db/database/model/tables/AD_COLUMN.xml	Wed Feb 17 16:52:45 2016 +0100
+++ b/src-db/database/model/tables/AD_COLUMN.xml	Wed Feb 17 16:55:49 2016 +0100
@@ -229,6 +229,10 @@
         <default><![CDATA[Y]]></default>
         <onCreateDefault><![CDATA['Y']]></onCreateDefault>
       </column>
+      <column name="ALLOWED_CROSS_ORG_LINK" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CALLOUT" name="AD_COLUMN_AD_CALLOUT">
         <reference local="AD_CALLOUT_ID" foreign="AD_CALLOUT_ID"/>
       </foreign-key>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Wed Feb 17 16:52:45 2016 +0100
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Wed Feb 17 16:55:49 2016 +0100
@@ -241720,6 +241720,45 @@
 <!--13E5DC0CC9A04F82A027A133DCA3B679-->  <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
 <!--13E5DC0CC9A04F82A027A133DCA3B679--></AD_COLUMN>
 
+<!--13FF5B191CE948F6A476DBF61C87F6C2--><AD_COLUMN>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_COLUMN_ID><![CDATA[13FF5B191CE948F6A476DBF61C87F6C2]]></AD_COLUMN_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <NAME><![CDATA[Allowed Cross Organization Reference]]></NAME>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <HELP><![CDATA[By default references to other objects are only allowed in case the referenced object's Organization is in the referencing object's Organization's natural tree than the object.
+
+When this flag is enabled, this default behavior can be overridden allowing to reference objects outside current's natural tree. Note this does not change the objects that can be referred from GUI, this constraint can only be programatically bypassed.]]></HELP>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <COLUMNNAME><![CDATA[Allowed_Cross_Org_Link]]></COLUMNNAME>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_TABLE_ID><![CDATA[101]]></AD_TABLE_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <SEQNO><![CDATA[231]]></SEQNO>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_ELEMENT_ID><![CDATA[3049D7A79AE943259D19B6E21C957980]]></AD_ELEMENT_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <POSITION><![CDATA[59]]></POSITION>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING>
+<!--13FF5B191CE948F6A476DBF61C87F6C2-->  <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING>
+<!--13FF5B191CE948F6A476DBF61C87F6C2--></AD_COLUMN>
+
 <!--141F54DBCEDE4F18BC55A8B30220745E--><AD_COLUMN>
 <!--141F54DBCEDE4F18BC55A8B30220745E-->  <AD_COLUMN_ID><![CDATA[141F54DBCEDE4F18BC55A8B30220745E]]></AD_COLUMN_ID>
 <!--141F54DBCEDE4F18BC55A8B30220745E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -246731,7 +246770,7 @@
 <!--2376962D21F0484AA2BC53751FE9D206-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--2376962D21F0484AA2BC53751FE9D206-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--2376962D21F0484AA2BC53751FE9D206-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--2376962D21F0484AA2BC53751FE9D206-->  <POSITION><![CDATA[55]]></POSITION>
+<!--2376962D21F0484AA2BC53751FE9D206-->  <POSITION><![CDATA[57]]></POSITION>
 <!--2376962D21F0484AA2BC53751FE9D206-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--2376962D21F0484AA2BC53751FE9D206-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--2376962D21F0484AA2BC53751FE9D206-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -252988,7 +253027,7 @@
 <!--3A5ED35574174A33B29743E57FE95119-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--3A5ED35574174A33B29743E57FE95119-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--3A5ED35574174A33B29743E57FE95119-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--3A5ED35574174A33B29743E57FE95119-->  <POSITION><![CDATA[54]]></POSITION>
+<!--3A5ED35574174A33B29743E57FE95119-->  <POSITION><![CDATA[56]]></POSITION>
 <!--3A5ED35574174A33B29743E57FE95119-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--3A5ED35574174A33B29743E57FE95119-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--3A5ED35574174A33B29743E57FE95119-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -285891,7 +285930,7 @@
 <!--6F3C36CC74C34FD2B624651280F67858-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--6F3C36CC74C34FD2B624651280F67858-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--6F3C36CC74C34FD2B624651280F67858-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--6F3C36CC74C34FD2B624651280F67858-->  <POSITION><![CDATA[56]]></POSITION>
+<!--6F3C36CC74C34FD2B624651280F67858-->  <POSITION><![CDATA[55]]></POSITION>
 <!--6F3C36CC74C34FD2B624651280F67858-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--6F3C36CC74C34FD2B624651280F67858-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--6F3C36CC74C34FD2B624651280F67858-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -341151,7 +341190,7 @@
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <POSITION><![CDATA[55]]></POSITION>
+<!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <POSITION><![CDATA[54]]></POSITION>
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--C0EE5FB7B5794FBD9F2655C1DE55133D-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
@@ -356340,7 +356379,7 @@
 <!--DB905AED8FA34349B1BFD638A106D439-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
 <!--DB905AED8FA34349B1BFD638A106D439-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
 <!--DB905AED8FA34349B1BFD638A106D439-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
-<!--DB905AED8FA34349B1BFD638A106D439-->  <POSITION><![CDATA[54]]></POSITION>
+<!--DB905AED8FA34349B1BFD638A106D439-->  <POSITION><![CDATA[53]]></POSITION>
 <!--DB905AED8FA34349B1BFD638A106D439-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--DB905AED8FA34349B1BFD638A106D439-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
 <!--DB905AED8FA34349B1BFD638A106D439-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Feb 17 16:52:45 2016 +0100
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Wed Feb 17 16:55:49 2016 +0100
@@ -22316,6 +22316,21 @@
 <!--2FA505E33C9345DDA6CD104C19F0F8BF-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
 <!--2FA505E33C9345DDA6CD104C19F0F8BF--></AD_ELEMENT>
 
+<!--3049D7A79AE943259D19B6E21C957980--><AD_ELEMENT>
+<!--3049D7A79AE943259D19B6E21C957980-->  <AD_ELEMENT_ID><![CDATA[3049D7A79AE943259D19B6E21C957980]]></AD_ELEMENT_ID>
+<!--3049D7A79AE943259D19B6E21C957980-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3049D7A79AE943259D19B6E21C957980-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3049D7A79AE943259D19B6E21C957980-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3049D7A79AE943259D19B6E21C957980-->  <COLUMNNAME><![CDATA[Allowed_Cross_Org_Link]]></COLUMNNAME>
+<!--3049D7A79AE943259D19B6E21C957980-->  <NAME><![CDATA[Allowed Cross Organization Reference]]></NAME>
+<!--3049D7A79AE943259D19B6E21C957980-->  <PRINTNAME><![CDATA[Allowed Cross Organization Reference]]></PRINTNAME>
+<!--3049D7A79AE943259D19B6E21C957980-->  <HELP><![CDATA[By default references to other objects are only allowed in case the referenced object's Organization is in the referencing object's Organization's natural tree than the object.
+
+When this flag is enabled, this default behavior can be overridden allowing to reference objects outside current's natural tree. Note this does not change the objects that can be referred from GUI, this constraint can only be programatically bypassed.]]></HELP>
+<!--3049D7A79AE943259D19B6E21C957980-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3049D7A79AE943259D19B6E21C957980-->  <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY>
+<!--3049D7A79AE943259D19B6E21C957980--></AD_ELEMENT>
+
 <!--30D58ABF2103491FBCDDAB69E5E5D967--><AD_ELEMENT>
 <!--30D58ABF2103491FBCDDAB69E5E5D967-->  <AD_ELEMENT_ID><![CDATA[30D58ABF2103491FBCDDAB69E5E5D967]]></AD_ELEMENT_ID>
 <!--30D58ABF2103491FBCDDAB69E5E5D967-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Wed Feb 17 16:52:45 2016 +0100
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Wed Feb 17 16:55:49 2016 +0100
@@ -275140,6 +275140,35 @@
 <!--B1F1480E1346412CB7C74FEB8411A587-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
 <!--B1F1480E1346412CB7C74FEB8411A587--></AD_FIELD>
 
+<!--B1F76EDF65C3442DB6D323B2BC6F139B--><AD_FIELD>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_FIELD_ID><![CDATA[B1F76EDF65C3442DB6D323B2BC6F139B]]></AD_FIELD_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <NAME><![CDATA[Allowed Cross Organization Reference]]></NAME>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <HELP><![CDATA[By default references to other objects are only allowed in case the referenced object's Organization is in the referencing object's Organization's natural tree than the object.
+
+When this flag is enabled, this default behavior can be overridden allowing to reference objects outside current's natural tree. Note this does not change the objects that can be referred from GUI, this constraint can only be programatically bypassed.]]></HELP>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_TAB_ID><![CDATA[101]]></AD_TAB_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_COLUMN_ID><![CDATA[13FF5B191CE948F6A476DBF61C87F6C2]]></AD_COLUMN_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <IGNOREINWAD><![CDATA[N]]></IGNOREINWAD>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <SEQNO><![CDATA[430]]></SEQNO>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <SHOWINRELATION><![CDATA[N]]></SHOWINRELATION>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <STARTINODDCOLUMN><![CDATA[N]]></STARTINODDCOLUMN>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <STARTNEWLINE><![CDATA[N]]></STARTNEWLINE>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <ISSHOWNINSTATUSBAR><![CDATA[N]]></ISSHOWNINSTATUSBAR>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B-->  <EM_OBUIAPP_SHOWSUMMARY><![CDATA[N]]></EM_OBUIAPP_SHOWSUMMARY>
+<!--B1F76EDF65C3442DB6D323B2BC6F139B--></AD_FIELD>
+
 <!--B1FF689F424CCF79E040A8C028011312--><AD_FIELD>
 <!--B1FF689F424CCF79E040A8C028011312-->  <AD_FIELD_ID><![CDATA[B1FF689F424CCF79E040A8C028011312]]></AD_FIELD_ID>
 <!--B1FF689F424CCF79E040A8C028011312-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>