Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0035590 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
feature request | [Openbravo ERP] 09. Financial management | major | N/A | 2017-03-22 10:30 | 2017-05-29 17:43 | |||
Reporter | vmromanos | View Status | public | |||||
Assigned To | vmromanos | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | b4fdc836924e | ||||
Projection | none | ETA | none | Target Version | 3.0PR17Q3 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | aferraz | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0035590: AD_IsOrgIncluded performance improvements | |||||||
Description | AD_IsOrgIncluded is a database function that receives three parameters: ad_org_id, parent_org_id and ad_client_id and returns the level in the organization tree for the given ad_client_id where ad_org_id is with respect to parent_org_id. If not in the natural tree, it returns -1 This function is used in many places as part of the where clause specially in functional flow related SQL queries. It would be very interesting to improve this function performance, so it will automatically improve the performance of every place that calls it. http://wiki.openbravo.com/wiki/Projects:AD_IsOrgIncluded_Performance_Improvements [^] | |||||||
Steps To Reproduce | NA | |||||||
Tags | No tags attached. | |||||||
Attached Files | 35590.diff [^] (163,798 bytes) 2017-04-04 16:39 [Show Content] [Hide Content]# HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1490188606 -3600 # Wed Mar 22 14:16:46 2017 +0100 # Node ID 4a8d74e36f68a900588e245107e1760897ae5052 # Parent 2933c75ab71382bc872e4178614fda319bbb4f70 Fixed issue 35590: AD_IsOrgIncluded performance improvements Created AD_Org_Tree table to store the plain parent organization tree. The unique constraint defined in this table is the key to get the performance improvement. This table is populated when the organization is set as ready. In that moment we ensure its parent organization tree won’t change anymore in the future. The AD_IsOrgIncluded function has been totally rewritten to read the AD_Org_Tree table, so there is no need to recursively iterate over the AD_TreeNode table anymore. Important: after this changeset the AD_IsOrgIncluded function will only work for organizations set as ready! A new AD_IsOrgIncluded_TreeNode is created as a copy of the previous AD_IsOrgIncluded code to be used only by the processes working with non ready organizations. The Set as Ready process (AD_ORG_READY) has been updated to use this legacy function when required. A new module script PopulateADOrgTree.java has been developed to populate the new table for existing instances. Sampledata has been updated too. A set of automatic tests have been created to ensure the function returns the same values after the refactor, and that we get a real performance improvement. The improvement heavily depends on the organization tree structure (the more levels the better it will perform), parameters (the farther the passed orgs are the better it will perform) and query/table over the function is called from (the bigger table the better it will perform). In local testings we get improvements from 2,70x to 200x diff --git a/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml b/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml new file mode 100644 --- /dev/null +++ b/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml @@ -0,0 +1,219 @@ +<?xml version='1.0' encoding='UTF-8'?> +<data> +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0D47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0E47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0F47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1047C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1147C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1247C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1747C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1847C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1947C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1A47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1B47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1D47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1E47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1F47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2047C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2147C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2247C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2347C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2447C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2547C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2647C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2747C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +</data> diff --git a/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml b/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml new file mode 100644 --- /dev/null +++ b/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml @@ -0,0 +1,75 @@ +<?xml version='1.0' encoding='UTF-8'?> +<data> +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1347C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1447C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1547C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2847C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2947C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2A47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2B47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +</data> diff --git a/src-db/database/model/functions/AD_ISORGINCLUDED.xml b/src-db/database/model/functions/AD_ISORGINCLUDED.xml --- a/src-db/database/model/functions/AD_ISORGINCLUDED.xml +++ b/src-db/database/model/functions/AD_ISORGINCLUDED.xml @@ -22,39 +22,42 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU -* All portions are Copyright (C) 2001-2006 Openbravo SLU +* All portions are Copyright (C) 2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ /************************************************************************* * Title: Return 'Org Level' if orgID is a leaf of the org tree * where parentOrgID is the root. Else return -1 +* +* This function is based on AD_Org_Tree table, which is populated only +* for the organizations set as ready. For the flows where the organization +* is not set as ready yet, please use AD_ISORGINCLUDED_TREENODE instead. ************************************************************************/ - v_Level NUMBER:=0; - v_treeID varchar2(32) ; - v_Parent VARCHAR(32) ; - v_Node VARCHAR(32) ; + V_RETURN AD_ORG_TREE.LEVELNO%TYPE:=-1 ; BEGIN - SELECT MAX(AD_TREE_ORG_ID) - INTO v_treeID - FROM AD_CLIENTINFO - WHERE AD_CLIENT_ID=p_clientID; - v_Parent:=p_OrgID; - WHILE v_Parent IS NOT NULL - LOOP - v_Level:=v_Level + 1; - SELECT MAX(NODE_ID), - MAX(PARENT_ID) - INTO v_Node, - v_Parent - FROM AD_TREENODE - WHERE AD_TREE_ID=v_treeID - AND NODE_ID=v_Parent; - IF v_Node=p_parentOrgID THEN - RETURN v_Level; - END IF; - END LOOP; - RETURN(-1) ; + + -- Special case for * org + IF (p_orgid='0' and p_parentorgid='0' and p_clientid is not null) THEN + SELECT 1 + INTO V_RETURN + FROM AD_CLIENT + WHERE AD_CLIENT_ID = p_clientid; + RETURN COALESCE(V_RETURN, -1); + END IF; + + -- Take advantage of AD_ORG_TREE.AD_ORG_TREE_ORGPARENTCLIENTLEV unique constraint + SELECT LEVELNO + INTO V_RETURN + FROM AD_ORG_TREE + WHERE AD_ORG_ID = p_orgid + AND AD_PARENT_ORG_ID = p_parentorgid + AND AD_CLIENT_ID = p_clientid; + + RETURN COALESCE(V_RETURN, -1); +EXCEPTION +WHEN OTHERS THEN + RETURN -1; END AD_ISORGINCLUDED ]]></body> </function> diff --git a/src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml b/src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml new file mode 100644 --- /dev/null +++ b/src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml @@ -0,0 +1,65 @@ +<?xml version="1.0"?> + <database name="FUNCTION AD_ISORGINCLUDED_TREENODE"> + <function name="AD_ISORGINCLUDED_TREENODE" type="NUMERIC"> + <parameter name="p_orgid" type="VARCHAR" mode="in"> + <default/> + </parameter> + <parameter name="p_parentorgid" type="VARCHAR" mode="in"> + <default/> + </parameter> + <parameter name="p_clientid" type="VARCHAR" mode="in"> + <default/> + </parameter> + <body><![CDATA[/************************************************************************* +* The contents of this file are subject to the Openbravo Public License +* Version 1.1 (the "License"), being the Mozilla Public License +* Version 1.1 with a permitted attribution clause; you may not use this +* file except in compliance with the License. You may obtain a copy of +* the License at http://www.openbravo.com/legal/license.html +* Software distributed under the License is distributed on an "AS IS" +* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the +* License for the specific language governing rights and limitations +* under the License. +* The Original Code is Openbravo ERP. +* The Initial Developer of the Original Code is Openbravo SLU +* All portions are Copyright (C) 2001-2006 Openbravo SLU +* All Rights Reserved. +* Contributor(s): ______________________________________. +************************************************************************/ +/************************************************************************* +* Title: Return 'Org Level' if orgID is a leaf of the org tree +* where parentOrgID is the root. Else return -1 +* +* This function has very important performance issues and it should only +* be used in flows involving organizations not set as ready yet. +* For other flows it is highly recommended to use AD_ISORGINCLUDED instead. +************************************************************************/ + v_Level NUMBER:=0; + v_treeID varchar2(32) ; + v_Parent VARCHAR(32) ; + v_Node VARCHAR(32) ; +BEGIN + SELECT MAX(AD_TREE_ORG_ID) + INTO v_treeID + FROM AD_CLIENTINFO + WHERE AD_CLIENT_ID=p_clientID; + v_Parent:=p_OrgID; + WHILE v_Parent IS NOT NULL + LOOP + v_Level:=v_Level + 1; + SELECT MAX(NODE_ID), + MAX(PARENT_ID) + INTO v_Node, + v_Parent + FROM AD_TREENODE + WHERE AD_TREE_ID=v_treeID + AND NODE_ID=v_Parent; + IF v_Node=p_parentOrgID THEN + RETURN v_Level; + END IF; + END LOOP; + RETURN(-1) ; +END AD_ISORGINCLUDED_TREENODE +]]></body> + </function> + </database> diff --git a/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml b/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml --- a/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml +++ b/src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml @@ -13,7 +13,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU -* All portions are Copyright (C) 2008-2014 Openbravo SLU +* All portions are Copyright (C) 2008-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -48,7 +48,7 @@ SELECT COUNT(DISTINCT c_calendar_id), COALESCE(MAX(c_calendar_id), 'NO CALENDAR') INTO v_num_calendars, v_calendar_id FROM ad_org - WHERE AD_ISORGINCLUDED(ad_org.ad_org_id, cur_org_le.ad_org_id, ad_org.ad_client_id)<>-1 + WHERE AD_ISORGINCLUDED_TREENODE(ad_org.ad_org_id, cur_org_le.ad_org_id, ad_org.ad_client_id)<>-1 AND IsReady='Y'; IF (v_num_calendars>1) THEN diff --git a/src-db/database/model/functions/AD_ORG_READY.xml b/src-db/database/model/functions/AD_ORG_READY.xml --- a/src-db/database/model/functions/AD_ORG_READY.xml +++ b/src-db/database/model/functions/AD_ORG_READY.xml @@ -16,7 +16,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU -* All portions are Copyright (C) 2008-2012 Openbravo SLU +* All portions are Copyright (C) 2008-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************/ @@ -64,7 +64,7 @@ IF (v_IsRecursive='Y') THEN UPDATE AD_ORG SET ISREADY='Y' - WHERE AD_ISORGINCLUDED(ad_org.ad_org_id, v_Record_ID, ad_org.ad_client_id)<>-1 + WHERE AD_ISORGINCLUDED_TREENODE(ad_org.ad_org_id, v_Record_ID, ad_org.ad_client_id)<>-1 AND IsReady='N'; ELSE UPDATE AD_ORG @@ -123,6 +123,51 @@ v_Result:=0; RAISE_APPLICATION_ERROR(-20000, '@20539@'); END IF; + + + -- Populate AD_Org_Tree + IF (v_IsRecursive='Y') THEN + FOR Cur_Org IN + (SELECT AD_Org_ID + FROM AD_Org + WHERE AD_ISORGINCLUDED_TREENODE(AD_Org_ID, v_Record_ID, AD_Client_ID)<>-1 + ) + LOOP + INSERT INTO ad_org_tree + ( + ad_org_tree_id, ad_client_id, + ad_org_id, ad_parent_org_id, + levelno, isactive, + created, createdby, updated, updatedby + ) + select get_uuid(), oc.ad_client_id, + oc.ad_org_id, op.ad_org_id, + ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id), 'Y', + now(), '100', now(), '100' + from ad_org op + cross join ad_org oc + where (oc.ad_client_id = op.ad_client_id or op.ad_org_id = '0') + and oc.ad_org_id = Cur_Org.AD_Org_ID + and ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id) > 0; + END LOOP; + ELSE + INSERT INTO ad_org_tree + ( + ad_org_tree_id, ad_client_id, + ad_org_id, ad_parent_org_id, + levelno, isactive, + created, createdby, updated, updatedby + ) + select get_uuid(), oc.ad_client_id, + oc.ad_org_id, op.ad_org_id, + ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id), 'Y', + now(), '100', now(), '100' + from ad_org op + cross join ad_org oc + where (oc.ad_client_id = op.ad_client_id or op.ad_org_id = '0') + and oc.ad_org_id = v_Record_ID + and ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id) > 0; + END IF; -- Create PeriodControl for the organization IF (v_IsRecursive='N') THEN diff --git a/src-db/database/model/tables/AD_ORG_TREE.xml b/src-db/database/model/tables/AD_ORG_TREE.xml new file mode 100644 --- /dev/null +++ b/src-db/database/model/tables/AD_ORG_TREE.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> + <database name="TABLE AD_ORG_TREE"> + <table name="AD_ORG_TREE" primaryKey="AD_ORG_TREE_KEY"> + <column name="AD_ORG_TREE_ID" primaryKey="true" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="AD_CLIENT_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="ISACTIVE" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false"> + <default><![CDATA[Y]]></default> + <onCreateDefault/> + </column> + <column name="CREATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"> + <default><![CDATA[SYSDATE]]></default> + <onCreateDefault/> + </column> + <column name="CREATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="UPDATED" primaryKey="false" required="true" type="TIMESTAMP" size="7" autoIncrement="false"> + <default><![CDATA[SYSDATE]]></default> + <onCreateDefault/> + </column> + <column name="UPDATEDBY" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="AD_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="AD_PARENT_ORG_ID" primaryKey="false" required="true" type="VARCHAR" size="32" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <column name="LEVELNO" primaryKey="false" required="true" type="DECIMAL" size="10,0" autoIncrement="false"> + <default/> + <onCreateDefault/> + </column> + <foreign-key foreignTable="AD_CLIENT" name="AD_ORG_TREE_AD_CLIENT"> + <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/> + </foreign-key> + <foreign-key foreignTable="AD_ORG" name="AD_ORG_TREE_AD_ORG"> + <reference local="AD_ORG_ID" foreign="AD_ORG_ID"/> + </foreign-key> + <foreign-key foreignTable="AD_ORG" name="AD_ORG_TREE_AD_PARENT_ORG"> + <reference local="AD_PARENT_ORG_ID" foreign="AD_ORG_ID"/> + </foreign-key> + <unique name="AD_ORG_TREE_ORGPARENTCLIENTLEV"> + <unique-column name="AD_ORG_ID"/> + <unique-column name="AD_PARENT_ORG_ID"/> + <unique-column name="AD_CLIENT_ID"/> + <unique-column name="LEVELNO"/> + </unique> + <check name="AD_ORG_TREE_ISACTIVE_CHECK"><![CDATA[ISACTIVE IN ('Y', 'N')]]></check> + <check name="AD_ORG_TREE_LEVELNO_CHK"><![CDATA[LEVELNO > 0]]></check> + </table> + </database> diff --git a/src-db/database/sourcedata/AD_COLUMN.xml b/src-db/database/sourcedata/AD_COLUMN.xml --- a/src-db/database/sourcedata/AD_COLUMN.xml +++ b/src-db/database/sourcedata/AD_COLUMN.xml @@ -248784,6 +248784,44 @@ <!--15C9F8F0DCBB4867A8D20A717A82EB18--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--15C9F8F0DCBB4867A8D20A717A82EB18--></AD_COLUMN> +<!--1609DDAB26674864B36542C5D654CB7C--><AD_COLUMN> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_COLUMN_ID><![CDATA[1609DDAB26674864B36542C5D654CB7C]]></AD_COLUMN_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--1609DDAB26674864B36542C5D654CB7C--> <NAME><![CDATA[Created By]]></NAME> +<!--1609DDAB26674864B36542C5D654CB7C--> <DESCRIPTION><![CDATA[User who created this records]]></DESCRIPTION> +<!--1609DDAB26674864B36542C5D654CB7C--> <HELP><![CDATA[The Created By field indicates the user who created this record.]]></HELP> +<!--1609DDAB26674864B36542C5D654CB7C--> <COLUMNNAME><![CDATA[Createdby]]></COLUMNNAME> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISKEY><![CDATA[N]]></ISKEY> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--1609DDAB26674864B36542C5D654CB7C--> <SEQNO><![CDATA[50]]></SEQNO> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_ELEMENT_ID><![CDATA[246]]></AD_ELEMENT_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--1609DDAB26674864B36542C5D654CB7C--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--1609DDAB26674864B36542C5D654CB7C--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--1609DDAB26674864B36542C5D654CB7C--> <POSITION><![CDATA[5]]></POSITION> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--1609DDAB26674864B36542C5D654CB7C--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--1609DDAB26674864B36542C5D654CB7C--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--1609DDAB26674864B36542C5D654CB7C--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--1609DDAB26674864B36542C5D654CB7C--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--1609DDAB26674864B36542C5D654CB7C--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--1609DDAB26674864B36542C5D654CB7C--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--1609DDAB26674864B36542C5D654CB7C--></AD_COLUMN> + <!--1626D36E50004283B914198AA4E5F13D--><AD_COLUMN> <!--1626D36E50004283B914198AA4E5F13D--> <AD_COLUMN_ID><![CDATA[1626D36E50004283B914198AA4E5F13D]]></AD_COLUMN_ID> <!--1626D36E50004283B914198AA4E5F13D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -254472,6 +254510,47 @@ <!--26444BCC8D2B46C3A46496D1FED081F4--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--26444BCC8D2B46C3A46496D1FED081F4--></AD_COLUMN> +<!--26590AC5F69847B8957049F5ED115267--><AD_COLUMN> +<!--26590AC5F69847B8957049F5ED115267--> <AD_COLUMN_ID><![CDATA[26590AC5F69847B8957049F5ED115267]]></AD_COLUMN_ID> +<!--26590AC5F69847B8957049F5ED115267--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--26590AC5F69847B8957049F5ED115267--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--26590AC5F69847B8957049F5ED115267--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--26590AC5F69847B8957049F5ED115267--> <NAME><![CDATA[Active]]></NAME> +<!--26590AC5F69847B8957049F5ED115267--> <DESCRIPTION><![CDATA[A flag indicating whether this record is available for use or de-activated.]]></DESCRIPTION> +<!--26590AC5F69847B8957049F5ED115267--> <HELP><![CDATA[There are two methods of making records unavailable in the system: One is to delete the record, the other is to de-activate the record. A de-activated record is not available for selection, but available for reporting. There are two reasons for de-activating and not deleting records: +(1) The system requires the record for auditing purposes. +(2) The record is referenced by other records. E.g., you cannot delete a Business Partner, if there are existing invoices for it. By de-activating the Business Partner you prevent it from being used in future transactions.]]></HELP> +<!--26590AC5F69847B8957049F5ED115267--> <COLUMNNAME><![CDATA[Isactive]]></COLUMNNAME> +<!--26590AC5F69847B8957049F5ED115267--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--26590AC5F69847B8957049F5ED115267--> <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID> +<!--26590AC5F69847B8957049F5ED115267--> <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH> +<!--26590AC5F69847B8957049F5ED115267--> <DEFAULTVALUE><![CDATA[Y]]></DEFAULTVALUE> +<!--26590AC5F69847B8957049F5ED115267--> <ISKEY><![CDATA[N]]></ISKEY> +<!--26590AC5F69847B8957049F5ED115267--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--26590AC5F69847B8957049F5ED115267--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--26590AC5F69847B8957049F5ED115267--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--26590AC5F69847B8957049F5ED115267--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--26590AC5F69847B8957049F5ED115267--> <SEQNO><![CDATA[30]]></SEQNO> +<!--26590AC5F69847B8957049F5ED115267--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--26590AC5F69847B8957049F5ED115267--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--26590AC5F69847B8957049F5ED115267--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--26590AC5F69847B8957049F5ED115267--> <AD_ELEMENT_ID><![CDATA[348]]></AD_ELEMENT_ID> +<!--26590AC5F69847B8957049F5ED115267--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--26590AC5F69847B8957049F5ED115267--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--26590AC5F69847B8957049F5ED115267--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--26590AC5F69847B8957049F5ED115267--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--26590AC5F69847B8957049F5ED115267--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--26590AC5F69847B8957049F5ED115267--> <POSITION><![CDATA[3]]></POSITION> +<!--26590AC5F69847B8957049F5ED115267--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--26590AC5F69847B8957049F5ED115267--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--26590AC5F69847B8957049F5ED115267--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--26590AC5F69847B8957049F5ED115267--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--26590AC5F69847B8957049F5ED115267--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--26590AC5F69847B8957049F5ED115267--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--26590AC5F69847B8957049F5ED115267--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--26590AC5F69847B8957049F5ED115267--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--26590AC5F69847B8957049F5ED115267--></AD_COLUMN> + <!--26684F9855B64C9189052F01BA13592D--><AD_COLUMN> <!--26684F9855B64C9189052F01BA13592D--> <AD_COLUMN_ID><![CDATA[26684F9855B64C9189052F01BA13592D]]></AD_COLUMN_ID> <!--26684F9855B64C9189052F01BA13592D--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -261588,6 +261667,45 @@ <!--3EE5C3FA006A425AAA45B703B30A516B--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--3EE5C3FA006A425AAA45B703B30A516B--></AD_COLUMN> +<!--3FABF813C52A47D9835CA4401104EA15--><AD_COLUMN> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_COLUMN_ID><![CDATA[3FABF813C52A47D9835CA4401104EA15]]></AD_COLUMN_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--3FABF813C52A47D9835CA4401104EA15--> <NAME><![CDATA[Organization]]></NAME> +<!--3FABF813C52A47D9835CA4401104EA15--> <DESCRIPTION><![CDATA[Organizational entity within client]]></DESCRIPTION> +<!--3FABF813C52A47D9835CA4401104EA15--> <HELP><![CDATA[An organization is a unit of your client or legal entity - examples are store, department. You can share data between organizations.]]></HELP> +<!--3FABF813C52A47D9835CA4401104EA15--> <COLUMNNAME><![CDATA[AD_Org_ID]]></COLUMNNAME> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--3FABF813C52A47D9835CA4401104EA15--> <DEFAULTVALUE><![CDATA[@AD_ORG_ID@]]></DEFAULTVALUE> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISKEY><![CDATA[N]]></ISKEY> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISPARENT><![CDATA[Y]]></ISPARENT> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> +<!--3FABF813C52A47D9835CA4401104EA15--> <SEQNO><![CDATA[10]]></SEQNO> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_ELEMENT_ID><![CDATA[4E3326D8537849D2BBB20D1779080C93]]></AD_ELEMENT_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--3FABF813C52A47D9835CA4401104EA15--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--3FABF813C52A47D9835CA4401104EA15--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--3FABF813C52A47D9835CA4401104EA15--> <POSITION><![CDATA[8]]></POSITION> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--3FABF813C52A47D9835CA4401104EA15--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--3FABF813C52A47D9835CA4401104EA15--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--3FABF813C52A47D9835CA4401104EA15--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--3FABF813C52A47D9835CA4401104EA15--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--3FABF813C52A47D9835CA4401104EA15--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--3FABF813C52A47D9835CA4401104EA15--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--3FABF813C52A47D9835CA4401104EA15--></AD_COLUMN> + <!--3FE2EA6C9F474DE79421734AD8174FBA--><AD_COLUMN> <!--3FE2EA6C9F474DE79421734AD8174FBA--> <AD_COLUMN_ID><![CDATA[3FE2EA6C9F474DE79421734AD8174FBA]]></AD_COLUMN_ID> <!--3FE2EA6C9F474DE79421734AD8174FBA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -319468,6 +319586,44 @@ <!--86A49F4CBE2C42B7A1508536F031D2D5--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--86A49F4CBE2C42B7A1508536F031D2D5--></AD_COLUMN> +<!--86DEC1F7085840D7A4E15DB49894C6FA--><AD_COLUMN> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_COLUMN_ID><![CDATA[86DEC1F7085840D7A4E15DB49894C6FA]]></AD_COLUMN_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <NAME><![CDATA[Levelno]]></NAME> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <DESCRIPTION><![CDATA[Level of the Organization under its Parent Organization in the Organization Tree.]]></DESCRIPTION> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <HELP><![CDATA[Level of the Organization under its Parent Organization in the Organization Tree.]]></HELP> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <COLUMNNAME><![CDATA[Levelno]]></COLUMNNAME> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_REFERENCE_ID><![CDATA[11]]></AD_REFERENCE_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <FIELDLENGTH><![CDATA[10]]></FIELDLENGTH> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISKEY><![CDATA[N]]></ISKEY> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <SEQNO><![CDATA[100]]></SEQNO> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_ELEMENT_ID><![CDATA[79E9E5C902894B5AA45B80D5EA297D64]]></AD_ELEMENT_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <POSITION><![CDATA[10]]></POSITION> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--86DEC1F7085840D7A4E15DB49894C6FA--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--86DEC1F7085840D7A4E15DB49894C6FA--></AD_COLUMN> + <!--86DF0DF2E002BFFEE040007F010175A6--><AD_COLUMN> <!--86DF0DF2E002BFFEE040007F010175A6--> <AD_COLUMN_ID><![CDATA[86DF0DF2E002BFFEE040007F010175A6]]></AD_COLUMN_ID> <!--86DF0DF2E002BFFEE040007F010175A6--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -325344,6 +325500,45 @@ <!--8CB5DC6518FB4BCB932DB421F7279EE3--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--8CB5DC6518FB4BCB932DB421F7279EE3--></AD_COLUMN> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--><AD_COLUMN> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_COLUMN_ID><![CDATA[8CC5E74832EB4227A5F4CC21E38A48D0]]></AD_COLUMN_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <NAME><![CDATA[Client]]></NAME> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <DESCRIPTION><![CDATA[Client for this installation.]]></DESCRIPTION> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <HELP><![CDATA[A Client is a company or a legal entity. You cannot share data between Clients.]]></HELP> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <COLUMNNAME><![CDATA[AD_Client_ID]]></COLUMNNAME> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_REFERENCE_ID><![CDATA[19]]></AD_REFERENCE_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <DEFAULTVALUE><![CDATA[@AD_CLIENT_ID@]]></DEFAULTVALUE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISKEY><![CDATA[N]]></ISKEY> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <SEQNO><![CDATA[20]]></SEQNO> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_ELEMENT_ID><![CDATA[102]]></AD_ELEMENT_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISSESSIONATTR><![CDATA[Y]]></ISSESSIONATTR> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <POSITION><![CDATA[2]]></POSITION> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--8CC5E74832EB4227A5F4CC21E38A48D0--></AD_COLUMN> + <!--8CE66FCEB3404B3AB0559EE2BD6A6C31--><AD_COLUMN> <!--8CE66FCEB3404B3AB0559EE2BD6A6C31--> <AD_COLUMN_ID><![CDATA[8CE66FCEB3404B3AB0559EE2BD6A6C31]]></AD_COLUMN_ID> <!--8CE66FCEB3404B3AB0559EE2BD6A6C31--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -326998,6 +327193,45 @@ <!--905AB9A1B3614382854CB0C686746F71--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--905AB9A1B3614382854CB0C686746F71--></AD_COLUMN> +<!--908CA63C575548EAA1660037A249BE42--><AD_COLUMN> +<!--908CA63C575548EAA1660037A249BE42--> <AD_COLUMN_ID><![CDATA[908CA63C575548EAA1660037A249BE42]]></AD_COLUMN_ID> +<!--908CA63C575548EAA1660037A249BE42--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--908CA63C575548EAA1660037A249BE42--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--908CA63C575548EAA1660037A249BE42--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--908CA63C575548EAA1660037A249BE42--> <NAME><![CDATA[Parent Organization]]></NAME> +<!--908CA63C575548EAA1660037A249BE42--> <DESCRIPTION><![CDATA[Parent Organization of the Organization in the Organization Tree.]]></DESCRIPTION> +<!--908CA63C575548EAA1660037A249BE42--> <HELP><![CDATA[Parent Organization of the Organization in the Organization Tree.]]></HELP> +<!--908CA63C575548EAA1660037A249BE42--> <COLUMNNAME><![CDATA[AD_Parent_Org_ID]]></COLUMNNAME> +<!--908CA63C575548EAA1660037A249BE42--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--908CA63C575548EAA1660037A249BE42--> <AD_REFERENCE_ID><![CDATA[18]]></AD_REFERENCE_ID> +<!--908CA63C575548EAA1660037A249BE42--> <AD_REFERENCE_VALUE_ID><![CDATA[276]]></AD_REFERENCE_VALUE_ID> +<!--908CA63C575548EAA1660037A249BE42--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--908CA63C575548EAA1660037A249BE42--> <ISKEY><![CDATA[N]]></ISKEY> +<!--908CA63C575548EAA1660037A249BE42--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--908CA63C575548EAA1660037A249BE42--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--908CA63C575548EAA1660037A249BE42--> <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE> +<!--908CA63C575548EAA1660037A249BE42--> <ISIDENTIFIER><![CDATA[Y]]></ISIDENTIFIER> +<!--908CA63C575548EAA1660037A249BE42--> <SEQNO><![CDATA[20]]></SEQNO> +<!--908CA63C575548EAA1660037A249BE42--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--908CA63C575548EAA1660037A249BE42--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--908CA63C575548EAA1660037A249BE42--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--908CA63C575548EAA1660037A249BE42--> <AD_ELEMENT_ID><![CDATA[5EC499A180BB4BE3A29513CB710F96FC]]></AD_ELEMENT_ID> +<!--908CA63C575548EAA1660037A249BE42--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--908CA63C575548EAA1660037A249BE42--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--908CA63C575548EAA1660037A249BE42--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--908CA63C575548EAA1660037A249BE42--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--908CA63C575548EAA1660037A249BE42--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--908CA63C575548EAA1660037A249BE42--> <POSITION><![CDATA[9]]></POSITION> +<!--908CA63C575548EAA1660037A249BE42--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--908CA63C575548EAA1660037A249BE42--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--908CA63C575548EAA1660037A249BE42--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--908CA63C575548EAA1660037A249BE42--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--908CA63C575548EAA1660037A249BE42--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--908CA63C575548EAA1660037A249BE42--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--908CA63C575548EAA1660037A249BE42--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--908CA63C575548EAA1660037A249BE42--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--908CA63C575548EAA1660037A249BE42--></AD_COLUMN> + <!--90AF0FEC96674CAF824844EA7690357E--><AD_COLUMN> <!--90AF0FEC96674CAF824844EA7690357E--> <AD_COLUMN_ID><![CDATA[90AF0FEC96674CAF824844EA7690357E]]></AD_COLUMN_ID> <!--90AF0FEC96674CAF824844EA7690357E--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -328645,6 +328879,45 @@ <!--919249865C132A93E040007F01004B67--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--919249865C132A93E040007F01004B67--></AD_COLUMN> +<!--91951F56599F470B8858B0A84C3814F2--><AD_COLUMN> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_COLUMN_ID><![CDATA[91951F56599F470B8858B0A84C3814F2]]></AD_COLUMN_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--91951F56599F470B8858B0A84C3814F2--> <NAME><![CDATA[Updated]]></NAME> +<!--91951F56599F470B8858B0A84C3814F2--> <DESCRIPTION><![CDATA[The date that this record was last updated]]></DESCRIPTION> +<!--91951F56599F470B8858B0A84C3814F2--> <HELP><![CDATA[The Updated field indicates the date that this record was updated.]]></HELP> +<!--91951F56599F470B8858B0A84C3814F2--> <COLUMNNAME><![CDATA[Updated]]></COLUMNNAME> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--91951F56599F470B8858B0A84C3814F2--> <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE> +<!--91951F56599F470B8858B0A84C3814F2--> <ISKEY><![CDATA[N]]></ISKEY> +<!--91951F56599F470B8858B0A84C3814F2--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--91951F56599F470B8858B0A84C3814F2--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--91951F56599F470B8858B0A84C3814F2--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--91951F56599F470B8858B0A84C3814F2--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--91951F56599F470B8858B0A84C3814F2--> <SEQNO><![CDATA[60]]></SEQNO> +<!--91951F56599F470B8858B0A84C3814F2--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--91951F56599F470B8858B0A84C3814F2--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--91951F56599F470B8858B0A84C3814F2--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_ELEMENT_ID><![CDATA[607]]></AD_ELEMENT_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--91951F56599F470B8858B0A84C3814F2--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--91951F56599F470B8858B0A84C3814F2--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--91951F56599F470B8858B0A84C3814F2--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--91951F56599F470B8858B0A84C3814F2--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--91951F56599F470B8858B0A84C3814F2--> <POSITION><![CDATA[6]]></POSITION> +<!--91951F56599F470B8858B0A84C3814F2--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--91951F56599F470B8858B0A84C3814F2--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--91951F56599F470B8858B0A84C3814F2--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--91951F56599F470B8858B0A84C3814F2--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--91951F56599F470B8858B0A84C3814F2--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--91951F56599F470B8858B0A84C3814F2--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--91951F56599F470B8858B0A84C3814F2--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--91951F56599F470B8858B0A84C3814F2--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--91951F56599F470B8858B0A84C3814F2--></AD_COLUMN> + <!--91A58CF045A8429881ECFFB7CE2FF099--><AD_COLUMN> <!--91A58CF045A8429881ECFFB7CE2FF099--> <AD_COLUMN_ID><![CDATA[91A58CF045A8429881ECFFB7CE2FF099]]></AD_COLUMN_ID> <!--91A58CF045A8429881ECFFB7CE2FF099--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -354375,6 +354648,45 @@ <!--C5B48143197D42D2A50EB784A9DCF7EB--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--C5B48143197D42D2A50EB784A9DCF7EB--></AD_COLUMN> +<!--C5C1C35152D84CDAA081CFD84A123B05--><AD_COLUMN> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_COLUMN_ID><![CDATA[C5C1C35152D84CDAA081CFD84A123B05]]></AD_COLUMN_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <NAME><![CDATA[Creation Date]]></NAME> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <DESCRIPTION><![CDATA[The date that this record is completed.]]></DESCRIPTION> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <HELP><![CDATA[The Created field indicates the date that this record was created.]]></HELP> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <COLUMNNAME><![CDATA[Created]]></COLUMNNAME> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_REFERENCE_ID><![CDATA[16]]></AD_REFERENCE_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <FIELDLENGTH><![CDATA[19]]></FIELDLENGTH> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <DEFAULTVALUE><![CDATA[@#Date@]]></DEFAULTVALUE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISKEY><![CDATA[N]]></ISKEY> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <SEQNO><![CDATA[40]]></SEQNO> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_ELEMENT_ID><![CDATA[245]]></AD_ELEMENT_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <POSITION><![CDATA[4]]></POSITION> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--C5C1C35152D84CDAA081CFD84A123B05--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--C5C1C35152D84CDAA081CFD84A123B05--></AD_COLUMN> + <!--C5CABD48EA774B8289401E670504371C--><AD_COLUMN> <!--C5CABD48EA774B8289401E670504371C--> <AD_COLUMN_ID><![CDATA[C5CABD48EA774B8289401E670504371C]]></AD_COLUMN_ID> <!--C5CABD48EA774B8289401E670504371C--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -374089,6 +374401,44 @@ <!--EAA0128F7AF34632AB9215AF7EACE95E--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--EAA0128F7AF34632AB9215AF7EACE95E--></AD_COLUMN> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--><AD_COLUMN> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_COLUMN_ID><![CDATA[EAB7DE2580E546B79DDBAE1E812E95CA]]></AD_COLUMN_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <NAME><![CDATA[Updated By]]></NAME> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <DESCRIPTION><![CDATA[User who updated this records]]></DESCRIPTION> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <HELP><![CDATA[The Updated By field indicates the user who updated this record.]]></HELP> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <COLUMNNAME><![CDATA[Updatedby]]></COLUMNNAME> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_REFERENCE_ID><![CDATA[30]]></AD_REFERENCE_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISKEY><![CDATA[N]]></ISKEY> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <SEQNO><![CDATA[70]]></SEQNO> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_ELEMENT_ID><![CDATA[608]]></AD_ELEMENT_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <POSITION><![CDATA[7]]></POSITION> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--EAB7DE2580E546B79DDBAE1E812E95CA--></AD_COLUMN> + <!--EACD73D12ACB4B32B8DA8E015C59205A--><AD_COLUMN> <!--EACD73D12ACB4B32B8DA8E015C59205A--> <AD_COLUMN_ID><![CDATA[EACD73D12ACB4B32B8DA8E015C59205A]]></AD_COLUMN_ID> <!--EACD73D12ACB4B32B8DA8E015C59205A--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -381321,6 +381671,44 @@ <!--FDB6AC6235CE49D69A8F056D24BE6C61--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> <!--FDB6AC6235CE49D69A8F056D24BE6C61--></AD_COLUMN> +<!--FDEFF96C3F5D4780B35B2C2324C08101--><AD_COLUMN> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_COLUMN_ID><![CDATA[FDEFF96C3F5D4780B35B2C2324C08101]]></AD_COLUMN_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <NAME><![CDATA[Organization Tree]]></NAME> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <DESCRIPTION><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></DESCRIPTION> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <HELP><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></HELP> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <COLUMNNAME><![CDATA[AD_Org_Tree_ID]]></COLUMNNAME> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_REFERENCE_ID><![CDATA[13]]></AD_REFERENCE_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <FIELDLENGTH><![CDATA[32]]></FIELDLENGTH> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISKEY><![CDATA[Y]]></ISKEY> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISPARENT><![CDATA[N]]></ISPARENT> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISMANDATORY><![CDATA[Y]]></ISMANDATORY> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISUPDATEABLE><![CDATA[N]]></ISUPDATEABLE> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <SEQNO><![CDATA[10]]></SEQNO> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_ELEMENT_ID><![CDATA[B48D79396B5E42EEA605AFC18B59F166]]></AD_ELEMENT_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <POSITION><![CDATA[1]]></POSITION> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <IMAGESIZEVALUESACTION><![CDATA[N]]></IMAGESIZEVALUESACTION> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ISUSEDSEQUENCE><![CDATA[N]]></ISUSEDSEQUENCE> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ALLOWSORTING><![CDATA[Y]]></ALLOWSORTING> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ALLOWFILTERING><![CDATA[Y]]></ALLOWFILTERING> +<!--FDEFF96C3F5D4780B35B2C2324C08101--> <ALLOWED_CROSS_ORG_LINK><![CDATA[N]]></ALLOWED_CROSS_ORG_LINK> +<!--FDEFF96C3F5D4780B35B2C2324C08101--></AD_COLUMN> + <!--FE0FAD381FE04CDDAFD6531FE555C547--><AD_COLUMN> <!--FE0FAD381FE04CDDAFD6531FE555C547--> <AD_COLUMN_ID><![CDATA[FE0FAD381FE04CDDAFD6531FE555C547]]></AD_COLUMN_ID> <!--FE0FAD381FE04CDDAFD6531FE555C547--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src-db/database/sourcedata/AD_DATASET_TABLE.xml b/src-db/database/sourcedata/AD_DATASET_TABLE.xml --- a/src-db/database/sourcedata/AD_DATASET_TABLE.xml +++ b/src-db/database/sourcedata/AD_DATASET_TABLE.xml @@ -1215,6 +1215,20 @@ <!--6EE4A47E96E111DDAD4D001B388C61A4--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> <!--6EE4A47E96E111DDAD4D001B388C61A4--></AD_DATASET_TABLE> +<!--70530668A11B474A86B38BB9D67D7CAE--><AD_DATASET_TABLE> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_DATASET_TABLE_ID><![CDATA[70530668A11B474A86B38BB9D67D7CAE]]></AD_DATASET_TABLE_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_DATASET_ID><![CDATA[D81C5C810AEF47C690E4F688ABC8AAC8]]></AD_DATASET_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--> <INCLUDEALLCOLUMNS><![CDATA[Y]]></INCLUDEALLCOLUMNS> +<!--70530668A11B474A86B38BB9D67D7CAE--> <WHERECLAUSE><![CDATA[client.id=:ClientID]]></WHERECLAUSE> +<!--70530668A11B474A86B38BB9D67D7CAE--> <EXCLUDEAUDITINFO><![CDATA[Y]]></EXCLUDEAUDITINFO> +<!--70530668A11B474A86B38BB9D67D7CAE--> <ISBUSINESSOBJECT><![CDATA[N]]></ISBUSINESSOBJECT> +<!--70530668A11B474A86B38BB9D67D7CAE--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--70530668A11B474A86B38BB9D67D7CAE--></AD_DATASET_TABLE> + <!--71FC341E96DD11DDB961001B388C61A4--><AD_DATASET_TABLE> <!--71FC341E96DD11DDB961001B388C61A4--> <AD_DATASET_TABLE_ID><![CDATA[71FC341E96DD11DDB961001B388C61A4]]></AD_DATASET_TABLE_ID> <!--71FC341E96DD11DDB961001B388C61A4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src-db/database/sourcedata/AD_ELEMENT.xml b/src-db/database/sourcedata/AD_ELEMENT.xml --- a/src-db/database/sourcedata/AD_ELEMENT.xml +++ b/src-db/database/sourcedata/AD_ELEMENT.xml @@ -26070,6 +26070,20 @@ <!--5EBF1E1D853C4F04A8D32CB2B0CE02E6--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> <!--5EBF1E1D853C4F04A8D32CB2B0CE02E6--></AD_ELEMENT> +<!--5EC499A180BB4BE3A29513CB710F96FC--><AD_ELEMENT> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <AD_ELEMENT_ID><![CDATA[5EC499A180BB4BE3A29513CB710F96FC]]></AD_ELEMENT_ID> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <COLUMNNAME><![CDATA[AD_Parent_Org_ID]]></COLUMNNAME> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <NAME><![CDATA[Parent Organization]]></NAME> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <PRINTNAME><![CDATA[Parent Organization]]></PRINTNAME> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <DESCRIPTION><![CDATA[Parent Organization of the Organization in the Organization Tree.]]></DESCRIPTION> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <HELP><![CDATA[Parent Organization of the Organization in the Organization Tree.]]></HELP> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--5EC499A180BB4BE3A29513CB710F96FC--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> +<!--5EC499A180BB4BE3A29513CB710F96FC--></AD_ELEMENT> + <!--606E48A511A24E82B29AE24FAA2DD50B--><AD_ELEMENT> <!--606E48A511A24E82B29AE24FAA2DD50B--> <AD_ELEMENT_ID><![CDATA[606E48A511A24E82B29AE24FAA2DD50B]]></AD_ELEMENT_ID> <!--606E48A511A24E82B29AE24FAA2DD50B--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -27694,6 +27708,20 @@ <!--79957912A877C7D8E040007F010156EE--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> <!--79957912A877C7D8E040007F010156EE--></AD_ELEMENT> +<!--79E9E5C902894B5AA45B80D5EA297D64--><AD_ELEMENT> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <AD_ELEMENT_ID><![CDATA[79E9E5C902894B5AA45B80D5EA297D64]]></AD_ELEMENT_ID> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <COLUMNNAME><![CDATA[Levelno]]></COLUMNNAME> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <NAME><![CDATA[Levelno]]></NAME> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <PRINTNAME><![CDATA[Levelno]]></PRINTNAME> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <DESCRIPTION><![CDATA[Level of the Organization under its Parent Organization in the Organization Tree.]]></DESCRIPTION> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <HELP><![CDATA[Level of the Organization under its Parent Organization in the Organization Tree.]]></HELP> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--79E9E5C902894B5AA45B80D5EA297D64--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> +<!--79E9E5C902894B5AA45B80D5EA297D64--></AD_ELEMENT> + <!--7A210218ACCA4672ABEDDA4F3E0FC88F--><AD_ELEMENT> <!--7A210218ACCA4672ABEDDA4F3E0FC88F--> <AD_ELEMENT_ID><![CDATA[7A210218ACCA4672ABEDDA4F3E0FC88F]]></AD_ELEMENT_ID> <!--7A210218ACCA4672ABEDDA4F3E0FC88F--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> @@ -31706,6 +31734,20 @@ <!--B47E11F50E964B759F8B3D276025A567--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> <!--B47E11F50E964B759F8B3D276025A567--></AD_ELEMENT> +<!--B48D79396B5E42EEA605AFC18B59F166--><AD_ELEMENT> +<!--B48D79396B5E42EEA605AFC18B59F166--> <AD_ELEMENT_ID><![CDATA[B48D79396B5E42EEA605AFC18B59F166]]></AD_ELEMENT_ID> +<!--B48D79396B5E42EEA605AFC18B59F166--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--B48D79396B5E42EEA605AFC18B59F166--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--B48D79396B5E42EEA605AFC18B59F166--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--B48D79396B5E42EEA605AFC18B59F166--> <COLUMNNAME><![CDATA[AD_Org_Tree_ID]]></COLUMNNAME> +<!--B48D79396B5E42EEA605AFC18B59F166--> <NAME><![CDATA[Organization Tree]]></NAME> +<!--B48D79396B5E42EEA605AFC18B59F166--> <PRINTNAME><![CDATA[Organization Tree]]></PRINTNAME> +<!--B48D79396B5E42EEA605AFC18B59F166--> <DESCRIPTION><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></DESCRIPTION> +<!--B48D79396B5E42EEA605AFC18B59F166--> <HELP><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></HELP> +<!--B48D79396B5E42EEA605AFC18B59F166--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--B48D79396B5E42EEA605AFC18B59F166--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> +<!--B48D79396B5E42EEA605AFC18B59F166--></AD_ELEMENT> + <!--B4D4121446D847EA91B262AEDA567798--><AD_ELEMENT> <!--B4D4121446D847EA91B262AEDA567798--> <AD_ELEMENT_ID><![CDATA[B4D4121446D847EA91B262AEDA567798]]></AD_ELEMENT_ID> <!--B4D4121446D847EA91B262AEDA567798--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src-db/database/sourcedata/AD_TABLE.xml b/src-db/database/sourcedata/AD_TABLE.xml --- a/src-db/database/sourcedata/AD_TABLE.xml +++ b/src-db/database/sourcedata/AD_TABLE.xml @@ -9607,6 +9607,30 @@ <!--3099A57126F24DC6BAFF15EDBF2B969D--> <ISTREE><![CDATA[N]]></ISTREE> <!--3099A57126F24DC6BAFF15EDBF2B969D--></AD_TABLE> +<!--3277BAAF6B7249BA972D99D351BD08CC--><AD_TABLE> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <AD_TABLE_ID><![CDATA[3277BAAF6B7249BA972D99D351BD08CC]]></AD_TABLE_ID> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <NAME><![CDATA[OrganizationTree]]></NAME> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <DESCRIPTION><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></DESCRIPTION> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <HELP><![CDATA[Maintain the Level Information of the Organization in the Organization Tree Structure.]]></HELP> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <TABLENAME><![CDATA[AD_Org_Tree]]></TABLENAME> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <CLASSNAME><![CDATA[OrganizationTree]]></CLASSNAME> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISVIEW><![CDATA[N]]></ISVIEW> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ACCESSLEVEL><![CDATA[7]]></ACCESSLEVEL> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISSECURITYENABLED><![CDATA[N]]></ISSECURITYENABLED> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISDELETEABLE><![CDATA[Y]]></ISDELETEABLE> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISHIGHVOLUME><![CDATA[N]]></ISHIGHVOLUME> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <IMPORTTABLE><![CDATA[N]]></IMPORTTABLE> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISCHANGELOG><![CDATA[N]]></ISCHANGELOG> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISDEFAULTACCT><![CDATA[N]]></ISDEFAULTACCT> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <AD_PACKAGE_ID><![CDATA[5A3ED54AB1D54B84E040007F01006125]]></AD_PACKAGE_ID> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <DATAORIGINTYPE><![CDATA[Table]]></DATAORIGINTYPE> +<!--3277BAAF6B7249BA972D99D351BD08CC--> <ISTREE><![CDATA[N]]></ISTREE> +<!--3277BAAF6B7249BA972D99D351BD08CC--></AD_TABLE> + <!--339677E1B4854680A6BCCFBE5D6BE6B2--><AD_TABLE> <!--339677E1B4854680A6BCCFBE5D6BE6B2--> <AD_TABLE_ID><![CDATA[339677E1B4854680A6BCCFBE5D6BE6B2]]></AD_TABLE_ID> <!--339677E1B4854680A6BCCFBE5D6BE6B2--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff --git a/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java new file mode 100644 --- /dev/null +++ b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java @@ -0,0 +1,408 @@ +/* + ************************************************************************* + * The contents of this file are subject to the Openbravo Public License + * Version 1.0 (the "License"), being the Mozilla Public License + * Version 1.1 with a permitted attribution clause; you may not use this + * file except in compliance with the License. You may obtain a copy of + * the License at http://www.openbravo.com/legal/license.html + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * The Original Code is Openbravo ERP. + * The Initial Developer of the Original Code is Openbravo SLU + * All portions are Copyright (C) 2017 Openbravo SLU + * All Rights Reserved. + * Contributor(s): ______________________________________. + ************************************************************************* + */ + +package org.openbravo.test.IsOrgIncluded; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import org.apache.commons.lang.StringUtils; +import org.apache.log4j.Logger; +import org.hibernate.Query; +import org.hibernate.Session; +import org.junit.Test; +import org.openbravo.base.exception.OBException; +import org.openbravo.base.session.OBPropertiesProvider; +import org.openbravo.dal.core.OBContext; +import org.openbravo.dal.service.OBDal; +import org.openbravo.dal.service.OBQuery; +import org.openbravo.erpCommon.businessUtility.InitialOrgSetup; +import org.openbravo.model.ad.process.ProcessInstance; +import org.openbravo.model.common.enterprise.Organization; +import org.openbravo.model.common.enterprise.OrganizationTree; +import org.openbravo.service.db.CallProcess; +import org.openbravo.test.db.model.functions.Ad_isorgincludedTest; + +/** + * Tests related to AD_Org_Tree table + * + */ +public class ADOrgTreeTest extends Ad_isorgincludedTest { + private static final Logger log = Logger.getLogger(ADOrgTreeTest.class); + + private static final String ORGTYPE_ORGANIZATION = "0"; + private static final String CLIENT_0 = "0"; + + private final static String[] allOrganizations = { ORG_FB_NORTE, ORG_FB_SUR, ORG_FB_FBGROUP, + ORG_0, ORG_FB_SPAIN, ORG_FB_US, ORG_FB_WEST, ORG_FB_EAST, ORG_QA_MAIN, ORG_QA_SPAIN, null, + "XX", "YY" }; + private final static String[] allClients = { CLIENT_FB, CLIENT_QA, CLIENT_0, null, "XX", "XY" }; + private final static int ALL_COMBINATIONS = allOrganizations.length * allOrganizations.length + * allClients.length; + + @Override + public void testIsOrgIncluded() { + // Don't launch this test again, it will be launched by Ad_isorgincludedTest class itself + } + + /** + * Creates a new organization just below * and do not cascade + */ + @Test + public void testSingleNewOrganization() { + singleOrgTestCreator("N"); + } + + /** + * Creates a new organization just below * and do cascade + */ + @Test + public void testSingleNewOrganizationCascade() { + singleOrgTestCreator("Y"); + } + + private void singleOrgTestCreator(final String isCascade) { + try { + OBContext.setAdminMode(true); + final long number = System.currentTimeMillis(); + final String newOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, ORG_0); + + List<OrganizationTree> orgTreeRecords = getOrganizationTreeRecords(newOrgId, null); + assertEquals("Records found at OrgTree at this point", 0, orgTreeRecords.size()); + + setAsReady(newOrgId, isCascade); + orgTreeRecords = getOrganizationTreeRecords(newOrgId, null); + assertEquals("Records found at OrgTree at this point", 2, orgTreeRecords.size()); + + orgTreeRecords = getOrganizationTreeRecords(newOrgId, newOrgId); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 1, orgTreeRecords.get(0).getLevelno().longValue()); + + orgTreeRecords = getOrganizationTreeRecords(newOrgId, ORG_0); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 2, orgTreeRecords.get(0).getLevelno().longValue()); + } finally { + OBContext.restorePreviousMode(); + } + } + + /** + * Test creation of two new organizations (one below the other) and set as ready individually: + * <ul> + * <li>*</li> + * <li>|__firstOrg</li> + * <li>___|__secondOrg</li> + * </ul> + */ + @Test + public void testTwoNewOrgsIndividually() { + twoOrgTestBuilder(false); + } + + /** + * Test creation of two new organizations (one below the other) and set as ready in Cascade: + * <ul> + * <li>*</li> + * <li>|__firstOrg</li> + * <li>___|__secondOrg</li> + * </ul> + */ + @Test + public void testTwoNewOrgsCascade() { + twoOrgTestBuilder(true); + } + + private void twoOrgTestBuilder(boolean isCascade) { + try { + OBContext.setAdminMode(true); + long number = System.currentTimeMillis(); + // First Org + final String firstOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, ORG_0); + + List<OrganizationTree> orgTreeRecords = getOrganizationTreeRecords(firstOrgId, null); + assertEquals("Records found at OrgTree at this point", 0, orgTreeRecords.size()); + + String secondOrgId = null; + if (!isCascade) { + setAsReady(firstOrgId, "N"); + } else { // Second Org + number = System.currentTimeMillis(); + secondOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, firstOrgId); + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, null); + assertEquals("Records found at OrgTree at this point", 0, orgTreeRecords.size()); + + setAsReady(firstOrgId, "Y"); + } + + // First org checks + orgTreeRecords = getOrganizationTreeRecords(firstOrgId, null); + assertEquals("Records found at OrgTree at this point", 2, orgTreeRecords.size()); + + orgTreeRecords = getOrganizationTreeRecords(firstOrgId, firstOrgId); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 1, orgTreeRecords.get(0).getLevelno().longValue()); + + orgTreeRecords = getOrganizationTreeRecords(firstOrgId, ORG_0); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 2, orgTreeRecords.get(0).getLevelno().longValue()); + + // Second org checks + if (!isCascade) { + number = System.currentTimeMillis(); + secondOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, firstOrgId); + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, null); + assertEquals("Records found at OrgTree at this point", 0, orgTreeRecords.size()); + + setAsReady(secondOrgId, "N"); + } + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, null); + assertEquals("Records found at OrgTree at this point", 3, orgTreeRecords.size()); + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, secondOrgId); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 1, orgTreeRecords.get(0).getLevelno().longValue()); + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, firstOrgId); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 2, orgTreeRecords.get(0).getLevelno().longValue()); + + orgTreeRecords = getOrganizationTreeRecords(secondOrgId, ORG_0); + assertEquals("Records found at OrgTree at this point", 1, orgTreeRecords.size()); + assertEquals("Level found", 3, orgTreeRecords.get(0).getLevelno().longValue()); + } finally { + OBContext.restorePreviousMode(); + } + } + + /** + * Test we get expected records in AD_ORG_Tree table when the org tree has few levels + */ + @Test + public void testCreateExtendedOrgTreeFewLevels() { + checkExtendedOrgTreeBuilder(7, 2); + } + + /** + * Test we get expected records in AD_ORG_Tree table when the org tree has many levels + */ + @Test + public void testCreateExtendedOrgTreeManyLevels() { + checkExtendedOrgTreeBuilder(23, 6); + } + + private void checkExtendedOrgTreeBuilder(int totalOrgs, int maxLevel) { + try { + OBContext.setAdminMode(true); + String superParentOrgId = createOrganizationTree(totalOrgs, maxLevel); + setAsReady(superParentOrgId, "Y"); + List<OrganizationTree> orgTreeRecords = getOrganizationTreeRecords(null, superParentOrgId); + assertEquals("Records found at OrgTree at this point", totalOrgs, orgTreeRecords.size()); + } finally { + OBContext.restorePreviousMode(); + } + } + + /** + * Test all the possible combinations for calling AD_IsOrgIncluded function and compares the + * result to the original AD_IsOrgIncluded_TreeNode + */ + @Test + public void testCallAllCombinations() { + int i = 0; + for (final String client : allClients) { + for (final String organizationChild : allOrganizations) { + for (final String organizationParent : allOrganizations) { + assertEquals("Failed combination with parameters: " + organizationChild + ", " + + organizationParent + ", " + client, + isOrgIncludedLegacy(organizationChild, organizationParent, client), + isOrgIncluded(organizationChild, organizationParent, client)); + i++; + } + } + } + assertEquals("Combinations tested", ALL_COMBINATIONS, i); + } + + /** + * Test performance of new function is better than legacy one when used as a filter criteria in + * the where clause. Verify we get the same results. + */ + @Test + public void testPerformanceI() { + try { + OBContext.setAdminMode(true); + final String hql = "select count(*) from FinancialMgmtAccountingFact fa where ad_isorgincluded(fa.organization.id, :parentOrgId, :clientId) <> -1"; + final Session session = OBDal.getInstance().getSession(); + final Query hqlQuery = session.createQuery(hql.toString()); + hqlQuery.setParameter("parentOrgId", ORG_FB_SPAIN); + hqlQuery.setParameter("clientId", CLIENT_FB); + long start = System.currentTimeMillis(); + final long hqlCount = (long) hqlQuery.uniqueResult(); + long hqlTime = System.currentTimeMillis() - start; + log.info("AD_IsOrgIncluded time: " + hqlTime); + + final String hqlLegacy = "select count(*) from FinancialMgmtAccountingFact fa where ad_isorgincluded_treenode(fa.organization.id, :parentOrgId, :clientId) <> -1"; + final Query hqlLegacyQuery = session.createQuery(hqlLegacy.toString()); + hqlLegacyQuery.setParameter("parentOrgId", ORG_FB_SPAIN); + hqlLegacyQuery.setParameter("clientId", CLIENT_FB); + start = System.currentTimeMillis(); + final long hqlLegacyCount = (long) hqlLegacyQuery.uniqueResult(); + long hqlLegacyTime = System.currentTimeMillis() - start; + log.info("AD_IsOrgIncluded_TreeNode time: " + hqlLegacyTime); + + assertEquals(hqlCount, hqlLegacyCount); + assertTrue("ad_isorgincluded_treenode ( " + hqlLegacyTime + + ") should be slower than ad_isorgincluded (" + hqlTime + ")", hqlLegacyTime > hqlTime); + // Set to 2 to be conservative (in local testing about 2,70x) + assertTrue("ad_isorgincluded_treenode ( " + hqlLegacyTime + + ") should be much slower than ad_isorgincluded (" + hqlTime + ")", + hqlLegacyTime > hqlTime * 2); + log.info(String.format("Performance gain: %.2fx", (double) hqlLegacyTime / hqlTime)); + } finally { + OBContext.restorePreviousMode(); + } + } + + /** + * Test performance of new function is equivalent to legacy one when using individually. 300 + * consecutive calls done in a batch to have better range. + * + * Verify we get the same results + */ + @Test + public void testPerformanceII() { + final int numberOfCalls = 300; + int[] result = new int[numberOfCalls]; + + int i = 0; + long init = System.currentTimeMillis(); + do { + for (final String client : allClients) { + for (final String organizationChild : allOrganizations) { + for (final String organizationParent : allOrganizations) { + if (i >= numberOfCalls) { + break; + } + result[i++] = isOrgIncluded(organizationChild, organizationParent, client); + } + } + } + } while (i < numberOfCalls); + long time = System.currentTimeMillis() - init; + + int[] resultLegacy = new int[numberOfCalls]; + i = 0; + init = System.currentTimeMillis(); + do { + for (final String client : allClients) { + for (final String organizationChild : allOrganizations) { + for (final String organizationParent : allOrganizations) { + if (i >= numberOfCalls) { + break; + } + resultLegacy[i++] = isOrgIncludedLegacy(organizationChild, organizationParent, client); + } + } + } + } while (i < numberOfCalls); + long legacyTime = System.currentTimeMillis() - init; + + assertTrue(Arrays.equals(result, resultLegacy)); + // Set to < 50 ms to be conservative (in local testing about -5ms) + assertTrue("ad_isorgincluded_treenode ( " + legacyTime + + ") should be more or less equal than ad_isorgincluded (" + time + ")", + time - legacyTime < 50); + log.info("Difference actual (" + time + ") - legacy (" + legacyTime + ") = " + + (time - legacyTime)); + } + + private List<OrganizationTree> getOrganizationTreeRecords(final String newOrgId, + final String parentOrgId) { + final Map<String, Object> parameters = new HashMap<String, Object>(3); + String whereClause = "client.id = :clientId "; + parameters.put("clientId", OBContext.getOBContext().getCurrentClient().getId()); + if (!StringUtils.isBlank(newOrgId)) { + whereClause += " and organization.id = :orgId "; + parameters.put("orgId", newOrgId); + } + if (!StringUtils.isBlank(parentOrgId)) { + whereClause += " and parentOrganization.id = :parentOrgId "; + parameters.put("parentOrgId", parentOrgId); + } + OBQuery<OrganizationTree> query = OBDal.getInstance().createQuery(OrganizationTree.class, + whereClause); + query.setNamedParameters(parameters); + return query.list(); + } + + private String createOrganizationTree(int totalOrgs, int maxLevel) { + long number = System.currentTimeMillis(); + // Org just below * (the first created) + final String superParent = createOrganization("SuperParent_" + number, ORGTYPE_ORGANIZATION, + ORG_0); + String strParentOrg = superParent; + int i = 1; + while (i < totalOrgs) { + for (int j = 0; i < totalOrgs && j < maxLevel; j++) { + strParentOrg = createOrganization("Test" + number + "_" + i + "_" + j, + ORGTYPE_ORGANIZATION, strParentOrg); + i++; + } + strParentOrg = superParent; + } + + return superParent; + } + + private String createOrganization(String newOrgName, String newOrgType, String strParentOrg) { + Properties properties = OBPropertiesProvider.getInstance().getOpenbravoProperties(); + String strSourcePath = properties.getProperty("source.path"); + InitialOrgSetup initialOrg = new InitialOrgSetup(OBContext.getOBContext().getCurrentClient()); + initialOrg.createOrganization(newOrgName, "", newOrgType, strParentOrg, "", "", "", false, + null, "", false, false, false, false, false, strSourcePath); + OBDal.getInstance().get(Organization.class, initialOrg.getOrgId()).setSummaryLevel(true); + return initialOrg.getOrgId(); + } + + private void setAsReady(final String orgId, final String isCascade) { + final Map<String, String> parameters = new HashMap<String, String>(1); + parameters.put("Cascade", isCascade); + final ProcessInstance pinstance = CallProcess.getInstance().call("AD_Org_Ready", orgId, + parameters); + if (pinstance.getResult() == 0L) { + throw new OBException(pinstance.getErrorMsg()); + } + + OBDal.getInstance().flush(); + } + + private int isOrgIncludedLegacy(String orgId, String parentOrgId, String clientId) { + return callOrgIncludedFunction(orgId, parentOrgId, clientId, "AD_ISORGINCLUDED_TREENODE"); + } + +} diff --git a/src-test/src/org/openbravo/test/db/model/functions/Ad_isorgincludedTest.java b/src-test/src/org/openbravo/test/db/model/functions/Ad_isorgincludedTest.java --- a/src-test/src/org/openbravo/test/db/model/functions/Ad_isorgincludedTest.java +++ b/src-test/src/org/openbravo/test/db/model/functions/Ad_isorgincludedTest.java @@ -11,7 +11,7 @@ * under the License. * The Original Code is Openbravo ERP. * The Initial Developer of the Original Code is Openbravo SLU - * All portions are Copyright (C) 2015-2016 Openbravo SLU + * All portions are Copyright (C) 2015-2017 Openbravo SLU * All Rights Reserved. * Contributor(s): ______________________________________. ************************************************************************ @@ -35,62 +35,62 @@ /** * All Organization * */ - private static final String ORG_O = "0"; + protected static final String ORG_0 = "0"; /** * QA Testing Client */ - private static final String CLIENT_A = "4028E6C72959682B01295A070852010D"; + protected static final String CLIENT_QA = "4028E6C72959682B01295A070852010D"; /** * Main Organization */ - private static final String ORG_A = "43D590B4814049C6B85C6545E8264E37"; + protected static final String ORG_QA_MAIN = "43D590B4814049C6B85C6545E8264E37"; /** * Spain Organization */ - private static final String ORG_A1 = "357947E87C284935AD1D783CF6F099A1"; + protected static final String ORG_QA_SPAIN = "357947E87C284935AD1D783CF6F099A1"; /** * F&B International Group Client */ - private static final String CLIENT_B = "23C59575B9CF467C9620760EB255B389"; + protected static final String CLIENT_FB = "23C59575B9CF467C9620760EB255B389"; /** * F&B International Group Organization */ - private static final String ORG_B = "19404EAD144C49A0AF37D54377CF452D"; + protected static final String ORG_FB_FBGROUP = "19404EAD144C49A0AF37D54377CF452D"; /** * F&B US, Inc. */ - private static final String ORG_B1 = "2E60544D37534C0B89E765FE29BC0B43"; + protected static final String ORG_FB_US = "2E60544D37534C0B89E765FE29BC0B43"; /** * F&B US East Coast */ - private static final String ORG_B11 = "7BABA5FF80494CAFA54DEBD22EC46F01"; + protected static final String ORG_FB_EAST = "7BABA5FF80494CAFA54DEBD22EC46F01"; /** * F&B US West Coast */ - private static final String ORG_B12 = "BAE22373FEBE4CCCA24517E23F0C8A48"; + protected static final String ORG_FB_WEST = "BAE22373FEBE4CCCA24517E23F0C8A48"; /** * F&B España, S.A. */ - private static final String ORG_B2 = "B843C30461EA4501935CB1D125C9C25A"; + protected static final String ORG_FB_SPAIN = "B843C30461EA4501935CB1D125C9C25A"; /** * F&B España - Región Norte */ - private static final String ORG_B21 = "E443A31992CB4635AFCAEABE7183CE85"; + protected static final String ORG_FB_NORTE = "E443A31992CB4635AFCAEABE7183CE85"; /** * F&B España - Región Sur */ - private static final String ORG_B22 = "DC206C91AA6A4897B44DA897936E0EC3"; + protected static final String ORG_FB_SUR = "DC206C91AA6A4897B44DA897936E0EC3"; /** * Case I: Distinct Organization in the same branch with different levels. @@ -120,42 +120,47 @@ public void testIsOrgIncluded() { // Case I - assertEquals("Level 1 Organization", 1, isOrgIncluded(ORG_O, ORG_O, CLIENT_B)); - assertEquals("Level 2 Organization", 2, isOrgIncluded(ORG_B, ORG_O, CLIENT_B)); - assertEquals("Level 3 Organization", 3, isOrgIncluded(ORG_B1, ORG_O, CLIENT_B)); - assertEquals("Level 4 Organization", 4, isOrgIncluded(ORG_B12, ORG_O, CLIENT_B)); + assertEquals("Level 1 Organization", 1, isOrgIncluded(ORG_0, ORG_0, CLIENT_FB)); + assertEquals("Level 2 Organization", 2, isOrgIncluded(ORG_FB_FBGROUP, ORG_0, CLIENT_FB)); + assertEquals("Level 3 Organization", 3, isOrgIncluded(ORG_FB_US, ORG_0, CLIENT_FB)); + assertEquals("Level 4 Organization", 4, isOrgIncluded(ORG_FB_WEST, ORG_0, CLIENT_FB)); // Case II - assertTrue(isOrgIncluded(ORG_B12, ORG_B2, CLIENT_A) == -1); - assertTrue(isOrgIncluded(ORG_B11, ORG_B2, CLIENT_A) == -1); - assertTrue(isOrgIncluded(ORG_B21, ORG_B1, CLIENT_A) == -1); - assertTrue(isOrgIncluded(ORG_B22, ORG_B1, CLIENT_A) == isOrgIncluded(ORG_B11, ORG_B2, CLIENT_A)); + assertTrue(isOrgIncluded(ORG_FB_WEST, ORG_FB_SPAIN, CLIENT_QA) == -1); + assertTrue(isOrgIncluded(ORG_FB_EAST, ORG_FB_SPAIN, CLIENT_QA) == -1); + assertTrue(isOrgIncluded(ORG_FB_NORTE, ORG_FB_US, CLIENT_QA) == -1); + assertTrue(isOrgIncluded(ORG_FB_SUR, ORG_FB_US, CLIENT_QA) == isOrgIncluded(ORG_FB_EAST, + ORG_FB_SPAIN, CLIENT_QA)); // Case III - assertTrue(isOrgIncluded(ORG_A, ORG_A1, CLIENT_A) == -1); - assertTrue(isOrgIncluded(ORG_B1, ORG_B12, CLIENT_A) == -1); + assertTrue(isOrgIncluded(ORG_QA_MAIN, ORG_QA_SPAIN, CLIENT_QA) == -1); + assertTrue(isOrgIncluded(ORG_FB_US, ORG_FB_WEST, CLIENT_QA) == -1); // Case IV - assertTrue(isOrgIncluded(ORG_A1, ORG_A, CLIENT_B) == -1); - assertTrue(isOrgIncluded(ORG_B1, ORG_B, CLIENT_A) == -1); + assertTrue(isOrgIncluded(ORG_QA_SPAIN, ORG_QA_MAIN, CLIENT_FB) == -1); + assertTrue(isOrgIncluded(ORG_FB_US, ORG_FB_FBGROUP, CLIENT_QA) == -1); // Case V - assertTrue(isOrgIncluded(ORG_A, ORG_A, CLIENT_A) == 1); + assertTrue(isOrgIncluded(ORG_QA_MAIN, ORG_QA_MAIN, CLIENT_QA) == 1); // Case VI - assertTrue(isOrgIncluded("ABC", ORG_B, CLIENT_A) == -1); - + assertTrue(isOrgIncluded("ABC", ORG_FB_FBGROUP, CLIENT_QA) == -1); } - private int isOrgIncluded(String orgId, String parentOrgId, String clientId) { + protected int isOrgIncluded(String orgId, String parentOrgId, String clientId) { + return callOrgIncludedFunction(orgId, parentOrgId, clientId, "AD_ISORGINCLUDED"); + } + + protected int callOrgIncludedFunction(String orgId, String parentOrgId, String clientId, + String functionName) { int value = 0; try { final List<Object> parameters = new ArrayList<Object>(); parameters.add(orgId); parameters.add(parentOrgId); parameters.add(clientId); - value = ((BigDecimal) CallStoredProcedure.getInstance().call("AD_ISORGINCLUDED", parameters, - null)).intValue(); + value = ((BigDecimal) CallStoredProcedure.getInstance().call(functionName, parameters, null)) + .intValue(); } catch (Exception e) { throw new IllegalStateException(e); } diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d567c007a7730c91367f193690f441b7e126e232 GIT binary patch literal 1900 zc$}S7-BR0D5dMz;WQ0h-1PDnQl#n#WfJI80wlPUc3~Ah$*fTI>(z|2%V2cPHjU>}t z^hx>xy~#ysXCTwe^a1)%ZTAS1dQ9V~I~uLl>)mg^-LrfC`17~l0j#2~BZnm&<5<>F zgf&9iN)~r@e1=tJxu?YE8tyBfFEo6a#a9|0=omvu$0*h`JXFq)G(2WVyRvm}pJBEt zgO<g8ZnuRM+pMZ=wM0;2$gDY@6Fp)`<`;GuQf1i`3>T}8Cth?88Y0-?4VNsrs<gSg z%L7OK?iy23+X)$pF~0PL*9iEbv<_sm<BHG@96z$^((kxD66+haptTbSK}j|7M%bN* z5E8b}u-F&h<PmT1P*`Q@dBTny>D2>y=rm)-(@yvSYlA$?fgt!M1N)9%!knt^^FwaA z+-q5zZ*1W!016!2j=24Li~BKqY9hmUmq^X4cwxj{H|_)BTyKeJD=uR@E@LzHBb=&p z;6zmOgZ#pvst3dplkA%9cH6FR%T8d6r;h69^tomgRVfChFm2##tZR5;U=C#ileon2 zc!&CL9`xigZSI*7e=ST`dMz`O<{l*q+eNeP3Tmm@5T?%~M|e@OSk$m#U=vRbe1m5O zDtN{)`7g~g@GYJ*-2Z<C)2Xb`ArA<yotbw<5XSkYP*q}!VQHAzGVlU5hCBa}D9s9; z^Z6-bSUz{WgNJfu7?x^kX>0OBWKc6X^N}s4J#@T1NyX%QCcoC$CybI>>IuJ}!LZpY zbcxvUp49`fCj#Nwy<nql?loPp83dBpT<)c@(+=eKYTsfenS7;EQHt#K*^UCoYn2A= zQ~!hv=d3c0&`F>5YpFMT+2vtaTKMQ4i5qm+=IDNAxT4mMv^43ok|by7mqlNutc4S> zBT^E$OfnN2XXycqQwIXL8UtPX5d4<Blk_bVj*+M?zC-fiwI4C{3sSlCF*0P(UXsYZ z{0Sq~!s0RXqZrG?JVq!|Why`?IY;;=X*X~IHwk~9a@`_Jp0rO%yMqOKW@G;p`Ci2* zxK3C)`OcAFf_%~xeKW={bh*ycn?=%mqTyDW;%*bxDf6Xn*@@)azM7YNYEE=<Qj|a6 zja(<@>c5%y7=4v9*n5n<$|NU#`0E50PH^$(KDgB$xS1|omP$Em;VEH2pTzh(O#F(} QQQYKz5U!9c#HfpZ0|VRZR{#J2 diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class new file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..eca9e5a91ff197dea12189607a4a195ae16585d6 GIT binary patch literal 7876 zc%0=|d3;>eb^fkqc~7IUY|EC+czu9_MvIY*iB04M+p-))v=~V?c4!cznJ0Pd(LDLh zj4Xjex`dRFwrQzLFp#h$t&^0tn8gbQJCrqa-#40WDNUQEdrL{0DBpSS&7#qWVt)BA z^ZU(xcRBZ*@1FaebMJlqd(U0~utBX3VF35(_)Ik#aKDcIA)LSi(s)pchctXP1YIOP zC*OyqcqD{J@mPq%pV#pP9lxmImqJ*KlQsAvzEp!R<CkmjIDSRLuZqxpA^aMi2;mf- z6sf0V>}e5wM#Je4R^g0>vpUY{cviHZ7wyk!cwWba5Z2(Lj<3k~g%H-_*LA$8<0YB( zf+%}gidS^Js^c{sU)Axtj^EJnn>v0=$8YQS9UZ@`<M(v@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aytb z(#xbf3YoNXZYDK<P?=O`=;j|wS2%9~zKfQi;Vf=?3fd{>DN}qaEM|G!c|ZKZ_W_+o BqNV@< diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java new file mode 100644 --- /dev/null +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java @@ -0,0 +1,54 @@ +/* + ************************************************************************* + * The contents of this file are subject to the Openbravo Public License + * Version 1.1 (the "License"), being the Mozilla Public License + * Version 1.1 with a permitted attribution clause; you may not use this + * file except in compliance with the License. You may obtain a copy of + * the License at http://www.openbravo.com/legal/license.html + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * The Original Code is Openbravo ERP. + * The Initial Developer of the Original Code is Openbravo SLU + * All portions are Copyright (C) 2017 Openbravo SLU + * All Rights Reserved. + * Contributor(s): ______________________________________. + ************************************************************************ + */ +package org.openbravo.modulescript; + +import org.apache.log4j.Logger; + +import org.openbravo.database.ConnectionProvider; + +public class PopulateADOrgTree extends ModuleScript { + private static final Logger log4j = Logger.getLogger(PopulateADOrgTree.class); + + @Override + public void execute() { + try { + ConnectionProvider cp = getConnectionProvider(); + boolean isADOrgTreeDataCreated = PopulateADOrgTreeData.isADOrgTreeDataCreated(cp); + if(!isADOrgTreeDataCreated) { + log4j.info("This moduleScript can take long to finish. Please be patient..."); + PopulateADOrgTreeData.populateADOrgTree(cp); + PopulateADOrgTreeData.createPreferenceADOrgTree(cp); + } + } catch (Exception e) { + handleError(e); + } + } + + @Override + protected boolean executeOnInstall() { + return false; + } + + // FIXME set version to + @Override + protected ModuleScriptExecutionLimits getModuleScriptExecutionLimits() { + return new ModuleScriptExecutionLimits("0", null, + new OpenbravoVersion(3,0,31999)); + } +} diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql new file mode 100644 --- /dev/null +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql @@ -0,0 +1,78 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ************************************************************************* + * The contents of this file are subject to the Openbravo Public License + * Version 1.1 (the "License"), being the Mozilla Public License + * Version 1.1 with a permitted attribution clause; you may not use this + * file except in compliance with the License. You may obtain a copy of + * the License at http://www.openbravo.com/legal/license.html + * Software distributed under the License is distributed on an "AS IS" + * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the + * License for the specific language governing rights and limitations + * under the License. + * The Original Code is Openbravo ERP. + * The Initial Developer of the Original Code is Openbravo SLU + * All portions are Copyright (C) 2017 Openbravo SLU + * All Rights Reserved. + * Contributor(s): ______________________________________. + ************************************************************************ +--> +<SqlClass name="PopulateADOrgTreeData" package="org.openbravo.modulescript"> + <SqlClassComment></SqlClassComment> + <SqlMethod name="select" type="preparedStatement" return="multiple"> + <SqlMethodComment></SqlMethodComment> + <Sql><![CDATA[ + SELECT 1 as DUMMY FROM DUAL + ]]> + </Sql> + </SqlMethod> + <SqlMethod name="populateADOrgTree" type="preparedStatement" return="rowcount"> + <SqlMethodComment></SqlMethodComment> + <Sql><![CDATA[ + INSERT INTO ad_org_tree + ( + ad_org_tree_id, ad_client_id, + ad_org_id, ad_parent_org_id, + levelno, isactive, + created, createdby, updated, updatedby + ) + select get_uuid(), oc.ad_client_id, + oc.ad_org_id, op.ad_org_id, + ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id), 'Y', + now(), '100', now(), '100' + from ad_org op + cross join ad_org oc + where (oc.ad_client_id = op.ad_client_id or op.ad_org_id = '0') + and oc.isready = 'Y' + and ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id) > 0 + ]]></Sql> + <Field name="dummy" value="void"/> + </SqlMethod> + <SqlMethod name="isADOrgTreeDataCreated" type="preparedStatement" return="boolean"> + <SqlMethodComment></SqlMethodComment> + <Sql> + <![CDATA[ + SELECT count(*) as exist + FROM DUAL + WHERE EXISTS (SELECT 1 FROM ad_preference + WHERE attribute = 'AD_Org_Tree_Data_Created') + ]]> + </Sql> + </SqlMethod> + <SqlMethod name="createPreferenceADOrgTree" type="preparedStatement" return="rowcount"> + <SqlMethodComment></SqlMethodComment> + <Sql> + <![CDATA[ + INSERT INTO ad_preference ( + ad_preference_id, ad_client_id, ad_org_id, isactive, + createdby, created, updatedby, updated, + attribute, value + ) VALUES ( + get_uuid(), '0', '0', 'Y', + '0', NOW(), '0', NOW(), + 'AD_Org_Tree_Data_Created', 'Y' + ) + ]]> + </Sql> + </SqlMethod> + </SqlClass> # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1490197574 -3600 # Wed Mar 22 16:46:14 2017 +0100 # Node ID 940cebad5bdab3336cc4d6f4826999ebad631980 # Parent 4a8d74e36f68a900588e245107e1760897ae5052 Related to issue 35590: Added tests to AllAntTaskTests diff --git a/src-test/src/org/openbravo/test/AllAntTaskTests.java b/src-test/src/org/openbravo/test/AllAntTaskTests.java --- a/src-test/src/org/openbravo/test/AllAntTaskTests.java +++ b/src-test/src/org/openbravo/test/AllAntTaskTests.java @@ -38,6 +38,7 @@ import org.openbravo.client.kernel.freemarker.test.GenerateComponentTest; import org.openbravo.client.kernel.freemarker.test.LabelTest; import org.openbravo.erpCommon.info.ClassicSelectorTest; +import org.openbravo.test.IsOrgIncluded.ADOrgTreeTest; import org.openbravo.test.accounting.PostDocumentTest; import org.openbravo.test.accounting.RecordID2Test; import org.openbravo.test.cancelandreplace.CancelAndReplaceTest; @@ -63,6 +64,7 @@ import org.openbravo.test.dal.ReadByNameTest; import org.openbravo.test.dal.ValidationTest; import org.openbravo.test.dal.ViewTest; +import org.openbravo.test.db.model.functions.Ad_isorgincludedTest; import org.openbravo.test.db.model.functions.SqlCallableStatement; import org.openbravo.test.expression.EvaluationTest; import org.openbravo.test.model.ClassLoaderTest; @@ -249,7 +251,10 @@ DocumentNumberGeneration.class, // Cancel and Replace Tests - CancelAndReplaceTest.class + CancelAndReplaceTest.class, + + // AD_IsOrgIncluded + Ad_isorgincludedTest.class, ADOrgTreeTest.class }) public class AllAntTaskTests { # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1490259398 -3600 # Thu Mar 23 09:56:38 2017 +0100 # Node ID b624ed2aef6393ff0c08ad94cc97944412a82c0c # Parent 940cebad5bdab3336cc4d6f4826999ebad631980 Related to issue 35590: Added new testChildOrgValidation Removed useless flush() diff --git a/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java --- a/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java +++ b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; import java.util.Arrays; import java.util.HashMap; @@ -33,7 +34,6 @@ import org.hibernate.Query; import org.hibernate.Session; import org.junit.Test; -import org.openbravo.base.exception.OBException; import org.openbravo.base.session.OBPropertiesProvider; import org.openbravo.dal.core.OBContext; import org.openbravo.dal.service.OBDal; @@ -200,6 +200,37 @@ } /** + * Creates parent and child organization and tries to set as ready the child organization (cascade + * and not cascade). Verify it fails because parent org is not set as ready yet + */ + @Test + public void testChildOrgValidation() { + try { + OBContext.setAdminMode(true); + long number = System.currentTimeMillis(); + final String firstOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, ORG_0); + number = System.currentTimeMillis(); + final String secondOrgId = createOrganization("Test_" + number, ORGTYPE_ORGANIZATION, + firstOrgId); + + try { + setAsReady(secondOrgId, "N"); + fail("Expected exception when setting second organization was not occured."); + } catch (Exception expectedException) { + } + + try { + setAsReady(secondOrgId, "Y"); + fail("Expected exception when setting second organization was not occured."); + } catch (Exception expectedException) { + } + + } finally { + OBContext.restorePreviousMode(); + } + } + + /** * Test we get expected records in AD_ORG_Tree table when the org tree has few levels */ @Test @@ -395,10 +426,8 @@ final ProcessInstance pinstance = CallProcess.getInstance().call("AD_Org_Ready", orgId, parameters); if (pinstance.getResult() == 0L) { - throw new OBException(pinstance.getErrorMsg()); + throw new RuntimeException(pinstance.getErrorMsg()); } - - OBDal.getInstance().flush(); } private int isOrgIncludedLegacy(String orgId, String parentOrgId, String clientId) { # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1490273997 -3600 # Thu Mar 23 13:59:57 2017 +0100 # Node ID 02d7d64068f871a9a8062c72a981987a3d28722d # Parent b624ed2aef6393ff0c08ad94cc97944412a82c0c Related to issue 35590: Removed AD_ORG_TREE sampledata and execute module script on install.source This changeset should be reverted when creating sampledata for 3.0PR17Q3 diff --git a/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml b/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml deleted file mode 100644 --- a/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml +++ /dev/null @@ -1,219 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<data> -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0C47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0D47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0E47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[4]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0F47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1047C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[4]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1147C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[4]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1247C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[4]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1747C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1847C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1947C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1A47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1B47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1C47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1D47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1E47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1F47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2047C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2147C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2247C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2347C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2447C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2547C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2647C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2747C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -</data> diff --git a/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml b/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml deleted file mode 100644 --- a/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml +++ /dev/null @@ -1,75 +0,0 @@ -<?xml version='1.0' encoding='UTF-8'?> -<data> -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1347C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1447C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1547C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[3]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2847C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2947C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2A47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2B47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[1]]></LEVELNO> -</AD_ORG_TREE> - -<AD_ORG_TREE> - <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2C47C7E0530100007F7447]]></AD_ORG_TREE_ID> - <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> - <ISACTIVE><![CDATA[Y]]></ISACTIVE> - <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> - <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> - <LEVELNO><![CDATA[2]]></LEVELNO> -</AD_ORG_TREE> - -</data> diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class index d567c007a7730c91367f193690f441b7e126e232..26fece850a04f26fd1e1530280ee89e177ab9a47 GIT binary patch literal 1900 zc$}S7-BR0D5dMz;WQ0h-1PDnQl#n#WfJI80wlPUc3~Ahm*fTI>(z|2%V2cPHjV#k# z^hx>xy~#ysXCTwe^a1)%ZTAS1dQ9V~I~uLl>)mg^-LrfC`17~l0j#2?BZnm&<5<>F zgf&9iN)~r@e1=tJxu?YE8tyBfFEo6a#a9|0=omvu$0*h`JXFq)G(2WVd$M_NpJCRP zVbkIPcUr=VZI&&YO%awDGHb5yMvoYh`GsAER9Q9z!$sTm#f#2CU4%Ql?vW*DONV>A zJapCXt}zw0+%`io#+QNc>mfgs)`4tvJkfSSH;Am73_2c<#QH`xZ0>|YP*P325l$x} zgoG0?EcV4Wc*N_xEv&Niec?o|^lPC!bQ>|_X}A3WYlA$?p&<AM1N)9%!kn`A`60JF z?l-N?H;xDt00oY1N8EY6#e<kVHIZSwOQh;o{C31WFYW{3TyKhKD=uR@E@LzHBOKd3 za3iYuL4ILS)dOOQNp{Wgx^36DWhZpRQ&;tK`dqV$suTlLm^Sb=)-^maFo&{%NnB!h zyhHsr4|;N$4)@K7zZRw^{iYd7bB_|WTSc?x32LcX7iPdCSNKt}Sk$m#U=vRbe1m5O zDtN{)`7g~g@GYJ*-2Z<C)2Xb`ArA<yo|$(=*pBl}!B%36VQHAzGVlUbhCBa}D9s9; z^Z6-bSUz{WgNJfu7?x^kX>0OBWKc6X^N}s4J#_s&NyX%QCcj$WCybI>>WQGA!LZpY zbcs0ep4CFJCqm&ny<np)?l(NK8HSSBT<)c@(+cJHYTsfenS7;EQHt#K*^WZjZ<Yq_ zQ~!hv=d3c0&`F>5YpFMT+2ieYY2l-HByP}Mo1^=g;fh*2($b{UN|KzRUlx6tvKCIj zjz~%1GRaJAoTUdaP8|r~Y7BJkL-1SjPSUqfI7Y%=e23)2Yd>P@7o>9OV`Rvny(E!+ z`4dL$!s0RXqZrG?JVq!|Why`?IY;;=X*X~IHwk~9a@`_Jp0rO%yMqOKW@G;p`Ci2* zxK3C)`OcAFf_%~xeKW={bh*ycn?=%mqTyDW;%*bxDf6Xn*@@KKzM7YNYEE=<Qj|a6 zja(<@>c5%y7=4v9*n5n<$|NU#`0E50PH^$(KDgB$xS1|omP$Em;VEH2pTzh(O#F(} QQQYKz5U!9c#HfpZ0|bccSO5S3 diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java --- a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java @@ -42,7 +42,7 @@ @Override protected boolean executeOnInstall() { - return false; + return true; } // FIXME set version to # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1490694719 -7200 # Tue Mar 28 11:51:59 2017 +0200 # Node ID 7c8258cff47c71e63393422b8f9d2c502ca1e147 # Parent 02d7d64068f871a9a8062c72a981987a3d28722d Related to issue 35590: Added sampledata. Manage install.source in modulescript Ensure the module script is executed on install.source to control the scenario where a sampledata module is installed. The module script won't add duplicate lines to AD_Org_Tree in case of sampledata diff --git a/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml b/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml new file mode 100644 --- /dev/null +++ b/referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml @@ -0,0 +1,219 @@ +<?xml version='1.0' encoding='UTF-8'?> +<data> +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0D47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0E47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E0F47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1047C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1147C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1247C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[4]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1747C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1847C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1947C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1A47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1B47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[7BABA5FF80494CAFA54DEBD22EC46F01]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1D47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1E47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1F47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2047C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[2E60544D37534C0B89E765FE29BC0B43]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2147C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[BAE22373FEBE4CCCA24517E23F0C8A48]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2247C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2347C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2447C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[DC206C91AA6A4897B44DA897936E0EC3]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2547C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2647C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[B843C30461EA4501935CB1D125C9C25A]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2747C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[23C59575B9CF467C9620760EB255B389]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[E443A31992CB4635AFCAEABE7183CE85]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[19404EAD144C49A0AF37D54377CF452D]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +</data> diff --git a/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml b/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml new file mode 100644 --- /dev/null +++ b/referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml @@ -0,0 +1,75 @@ +<?xml version='1.0' encoding='UTF-8'?> +<data> +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1347C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1447C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E1547C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[0]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[3]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2847C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2947C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[357947E87C284935AD1D783CF6F099A1]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2A47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2B47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[1]]></LEVELNO> +</AD_ORG_TREE> + +<AD_ORG_TREE> + <AD_ORG_TREE_ID><![CDATA[4B41C7C01E2C47C7E0530100007F7447]]></AD_ORG_TREE_ID> + <AD_CLIENT_ID><![CDATA[4028E6C72959682B01295A070852010D]]></AD_CLIENT_ID> + <ISACTIVE><![CDATA[Y]]></ISACTIVE> + <AD_ORG_ID><![CDATA[5EFF95EB540740A3B10510D9814EFAD5]]></AD_ORG_ID> + <AD_PARENT_ORG_ID><![CDATA[43D590B4814049C6B85C6545E8264E37]]></AD_PARENT_ORG_ID> + <LEVELNO><![CDATA[2]]></LEVELNO> +</AD_ORG_TREE> + +</data> diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class index 26fece850a04f26fd1e1530280ee89e177ab9a47..1475abeb1b0bca919df39f472fa2d8be5df64dd2 GIT binary patch literal 1900 zc$}S7-Ez}b5dMz;<R}Ux4oL`5A_y&x6Rc2D+Ts8WPAG02?3rZ3(7R*#L{?CAJd&Jp z(I@E(^oEP3ok^H7(+B87wcVpQ;Bml%8I4x!_3pRd?%6&6{QKA60Pdi!BZnm&<G7`x z2y2A2<t%RN_!4)NWkrdvG~87_Uu*a#i*GgD(=mpUj!~>?xUZZaXn4qw_N242$1q!! zfn)JDw_C!BZB|t}jtEK&nN`<!qX!Jh{K5`Hsw|s=;e6Hg#naAyLj>Er;gKa*l{WWw zc;KqvU1KV0xgkR_#+Pm3Hv)bjt$o?-cp|g|w;fq^+3t8e5^L+Vz}XIjpro33DeO)} z2noB*u-F&h<PmT1P*`Q@`@)V~>DL2!;5K8%({A_{Yn?pHfgt!M1N(_y!knt^@dIvo z+;^;vm$qmt016!2in#q^lec5`)I^5yE|HpF@xzFFUfc)5x$1~$GcIE*E@LD1Bb=(c z??zPfz5K$Ust3dplkBSPb=$6Q$xdL4$FAz<^qFQARVfChFm2#FtZ8^;U=C#ileoa} zaGUyX?)T&}ZSI>9e<4gy`i>b%bC(i@t)f}?1hv#`2(!&2SNKt}Sk$m?U;~d0e2*sv zDtN*$`JUz(_yIpM-2JqI=~R~KkOu_UPR%<a2;+QHs4B6^ur$nU8F-2s!_AK*O0z=e ze0IthZk;*a!9%$`3`;e&v^Du5GN_rH`M?&_9=iUnq+;?tlV5A>5k^TZ^+da$!LZpY zbcxvUp49`fD+1x$y<np)?l(QL5d@OhT<oQ>-3sK-YTsfenS7;EQHt#K*@^<!cS?iy zseeL-b5<Eg=%i2kwbYxv?C~%xEqw5f#5KBWb96s5TvBUCTAFlPNs=@4%c3t+*1|E^ zAt?!5B$<hgv-AMQi30&#j)AVc4Sq%5N%|HFM@Uo`Un6<{%CDIE1F2m42pKYH&q!pS z{f3chVett1VT@&B9wQW~G8LecoFjabv}-tr>x4f~xo(gpPudrx-NXVtv$21Qd@tiO zTqP`>eCNn7K|X1Uz8>Qjx?Jb!%_3<&(r_b9ai0^`3G=0H*@@JvzM6|YH7B|_DaxPk zMy?Ta_20}Jj6Tm9><z}AXOa`Y{CA9V$2k9cAKXe0+)NiPOQoE)@Psg+Ph$KvCjLa~ PFmCcYgi9m~G3w&~1##<I diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree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1pdi3dz= z#SCtK2%6_4Je50I+=IlEKS;cik?n)TyC4U>3v<w0!a?s`4tf{lV0oR*?ocrYeFeCF z_uLEmF02s}j*vu0NU~<uG9;mVFF9=$pd)Me_z$w3VJ(m+VUqU{;2yT_#ns%&5c5Pc zH{p7GhN<`gCi%~jp2w-{G3tMk79J;6pI~BsidG&Z4NvgjL$vfTUdJOO)T7k?IbK*E zQ}uX~79Uru@Psm0zY3qX$#{rqHR00DODkLK6kNfdLrX6;Ikfb0ZZ7qc3VB*y>CloI zE8Mvud>21wU(A~E9h;yYo1h8!XL+CWI^<(^wD~7lXs?@s-65!j(yvx5FemGlYMn#n z&*U@in459el~B1yid&@kfE2w_^hwb##efuhrMUHnCzBrF1>Gb`J6W?xV)?$}w3WE9 zN-a^#*tS^HN;2se*m|1B@e91U%y7n8d;sTo+c-}huTt+NYQ9JkzeZAgjoM!%iC-ec zFVMo5De)D26E9QiS5*~WWmdgJOBYogUgQ1dl3GJj<}&G6K9e5HXVO>mnY6Abldj8C zcD0*HcjYr_=lo1+{-83c&UNKpOjp_u0X~kFq5cd8pNDqJe$Nyh3`<#l)_z3%{PzKA C3f|8E diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java --- a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java @@ -42,6 +42,7 @@ @Override protected boolean executeOnInstall() { + // To control scenario where a sampledata module is available return true; } diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql --- a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql @@ -38,13 +38,14 @@ ) select get_uuid(), oc.ad_client_id, oc.ad_org_id, op.ad_org_id, - ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id), 'Y', + ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id), 'Y', now(), '100', now(), '100' from ad_org op cross join ad_org oc where (oc.ad_client_id = op.ad_client_id or op.ad_org_id = '0') and oc.isready = 'Y' and ad_isorgincluded_treenode(oc.ad_org_id, op.ad_org_id, oc.ad_client_id) > 0 + and not exists (select 1 from ad_org_tree ot where ot.ad_org_id = oc.ad_org_id and ot.ad_parent_org_id = op.ad_org_id and ot.ad_client_id = oc.ad_client_id) ]]></Sql> <Field name="dummy" value="void"/> </SqlMethod> # HG changeset patch # User Víctor Martínez Romanos <victor.martinez@openbravo.com> # Date 1491223630 -7200 # Mon Apr 03 14:47:10 2017 +0200 # Node ID b94b64a1fb72812014f908381873f08772c840ae # Parent 7c8258cff47c71e63393422b8f9d2c502ca1e147 Related to issue 35590: Applied code review feedback Deactivated performance tests as they might create false positives in CI servers. Removed info message in module script as the tests show the time to finish the script is good enough (around 10 minutes for 700 orgs) diff --git a/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java --- a/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java +++ b/src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java @@ -33,6 +33,7 @@ import org.apache.log4j.Logger; import org.hibernate.Query; import org.hibernate.Session; +import org.junit.Ignore; import org.junit.Test; import org.openbravo.base.session.OBPropertiesProvider; import org.openbravo.dal.core.OBContext; @@ -283,6 +284,7 @@ * Test performance of new function is better than legacy one when used as a filter criteria in * the where clause. Verify we get the same results. */ + @Ignore("This test is ignored because it might create false positive in CI machines due to different server load.") @Test public void testPerformanceI() { try { @@ -325,6 +327,7 @@ * * Verify we get the same results */ + @Ignore("This test is ignored because it might create false positive in CI machines due to different server load.") @Test public void testPerformanceII() { final int numberOfCalls = 300; diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class index 1475abeb1b0bca919df39f472fa2d8be5df64dd2..0eefb9b34b8d210d12f9220901dd728fbb164f57 GIT binary patch literal 1567 zc$}S7TTc@~6#k|y-LfollbhVM+<F1FilR`^AYjs@2uVo^zHPT-SzUIU=@xnLm-ytH zFFwc%7)ksA{wVd#Qc2UA#=6O#nVmW3JKs6;&HniL?K^;FJX3KCvnskVr(zy4Y2wl( z6eQ*Hf`Y{emK5kJRHRfya9_a#1<MTKb<455rwqYZJkJo?a*LdyCu=$UW%Z=M#eq?< zX{A5wnueV>geAXgiy`mWsxT~NT~X5AGIt8XICb?Cw^+4##S~WA)A!wS)iyl7xxFV! z2ZHl7gTl|aS@j4ZV3rw@4e>?8GYUq9>szklaMQC~XJ5FdR*?$|9<nMoSli^eB{;zs z8Q3d&33D*}#yB-}+i*(y&Y8)}5`Y4`bDm+o-8ITSd+H5CZ;i;FlW{7ZVcUKm2xqdy zy<NYIoL|O{??*UU>%{V?=CxS7Rn;wGiHVwXtHR_jEZM}NrVcGh{u+AFtKlIYDOk}k zipLtBU{%8!Rv8BVQlf@5))`j*j~4YVMMu#hc<;}0o{Nf~uLm2_ka`x{Q2@jIKXRnQ zq=RUd0mEWb|68jj)eb=^E0T4rjSNyWedXp#+XKlkjGDfl_XU5=1$WGPu&!gnDcXET z2$xzg5~~yX!Le}PNnNMqH4euznT(vc^*%XISWYS3O1F(?+@5nhk9+jLxdr)zz@&u9 z_R*J4Bcrh+aS3)#lK}e3hW*8143O2X9dH|iG}6Vm3I0glK^mip3k0&suLy38e?T`) zLWg8J4nLtYn@C<jIrlL}Fh<BhKf@e4$&M551pWLbiQE)ryGuSZ<Q1izX(B!AGe{8W z4w?<qF5Ob{9mO5WEu+WCO6+Kj-vqr81V^4LnCzgqDZ;#FyHG1N5c=FuXQHmoKn*8E t*`u|{P2%eJ;|h_Z{!VrU^(Y+dd;jYaU6;_lG{B|m;D&G7Htl=O{06-&mRA4( diff --git a/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class b/src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class index 6e88eac44f91b8a7e96ee7bdf635f2f567a11db4..9018ba3e0e8fc6529aeba9043fb2792cb3571665 GIT binary patch literal 8050 zc%0=}d3;>eb^fk2Gw*3MmTlRR8L!XapwVI^0kMs|U|W(wM2peL2E}dU(af_v_Gq3w zi;xl$+EQpjnvyo8#w-n6>W0!5Ly+y*-~@tk=)P|>-O@HKP4|{2G*Q0u-kU|E5ykxS zU*zB1cb9X|`R=*jIrm<_{=F}~1mHSl_z}i&9S>Ha9w&4R`|%JSmc}DeJgVUr{Ln?> zbMk#mipTwU0#Eum{FIK*>-a?tC;eE8U#i9z@N_kP8P8PXSMaMEeocgq`|&JJ`SBc{ z7pX7G*b5>$qv5n4Yj8%xSsh=}aZa?K7ws=<cuB_vKi1*PI=&*`m;Km)S9E+;$Ez~y zWl?rfiq~{p((yGNuj}}A9lxRDH+B4$j^EbtJ34+>$M5O*eI0+G;}3QGk&Zvs@h4*c zPyP5a{JG$LL&sm}__~h2)bUq3{#u;yH#+`S$2WBRosPfP@eew_spB7Y{F9D11>!$z z_?Cu$QSc_LvFnd01beO2SZib=5<P6T+I_9P*4UVt+N!XmCmGKSno%ni>(7plnkj|a z-XoF8NNXaJ9BU0{Qt{*%<-D=%`1rJfZ(E!bb|_Sa8uu%BI<1(gu(&s#G@bcFk<o-H zN~~xku|JZEOWW=AWDdvE3fJ0rtO+wYnu<(Xt>acKn=sSSRD2@Sy4RY>CL$SgSJyyl zY$#=#U6D+L0G5rJnfX|khZ@VF)hWCuZYE+1SBK^cl$}#`NG9}0#tC#$I1`B;?Tbvf zz<p^mVMa3w2SX*;V?;L^Nt>;mRx(MExRu<SvL@p(dbjbwds%30be<-K=F2dv;P0M_ zniJAVZ;xIM<er}Q26~k>dW5RV4l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)99br&4v<aiZA%I_FF59K{=UbX3|Aup8Pe0eVP3l27HR-7}BH)$kR`<hlE8 zTVsKypJx7XX!<<+bYgj52~9ht=#rvaiaj}&?NA*amuA8x`-JLiagUr8EwwlCfT^vR z!Oagr^PGgIaz~4Mka+S3iB~eReUNw;<e+z94th&C=$*?!?}8jGud~@5D(0ZC0N3xH zdqLlYHA2D>lIRFY*34RlB$V$Zr>z2XWDOtxLAEoj1@a_J@*V=*!`8jHnmZX{o@nMK zT#wH%6+gfv|5?)WICVWn{ZG=u<D}{nOw3Qw%7dig3I2PCmLA6Ic!Y#{l-fVX3(I4w z9#7KZ<7yS2PzLK);qx{b4>7GKT)KH_Ws9AHEBJG0>7^!zmR`=yrG8Q&Ps=MET2f<$ zJ2!;y;^*v(Su?(46Vzi9Gy(rC?~`7Ke9VqE|0E0TbyKiA1hr85)rtk?WZhD&bEy28 ze8wGfGw!+)D)&fnixeM_qF0JODf*=tkYcYCxBl>C(gVDpn<Qx`YZgf?-&dTr5*Jpf zC2ASl7He8bCjA0iPxCl_fj5^K&Nzz?;2duo=c(gW>b*qG7fIsRNQ$pf`->#;OQiS( zTKF<0zJhP!WorGZs=}+xs+VZ#qN>Adyx&|>Ye>pmCLPOX(qs8d`f5It))i&ab$QCJ zb~EX&d?xLjpGnOhR3_EAuH1|1O8X(e$I&v>pTXes&`#O!nZko%Da+5=kBFcDKCI{9 Al>h($ diff --git a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java --- a/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java +++ b/src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java @@ -18,12 +18,9 @@ */ package org.openbravo.modulescript; -import org.apache.log4j.Logger; - import org.openbravo.database.ConnectionProvider; public class PopulateADOrgTree extends ModuleScript { - private static final Logger log4j = Logger.getLogger(PopulateADOrgTree.class); @Override public void execute() { @@ -31,7 +28,6 @@ ConnectionProvider cp = getConnectionProvider(); boolean isADOrgTreeDataCreated = PopulateADOrgTreeData.isADOrgTreeDataCreated(cp); if(!isADOrgTreeDataCreated) { - log4j.info("This moduleScript can take long to finish. Please be patient..."); PopulateADOrgTreeData.populateADOrgTree(cp); PopulateADOrgTreeData.createPreferenceADOrgTree(cp); } | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||||||
|
Notes | |
(0095936) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: b4fdc836924e3bc2738803e7039c50d7d39af47f Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Wed Mar 22 14:16:46 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/b4fdc836924e3bc2738803e7039c50d7d39af47f [^] Fixed issue 35590: AD_IsOrgIncluded performance improvements Created AD_Org_Tree table to store the plain parent organization tree. The unique constraint defined in this table is the key to get the performance improvement. This table is populated when the organization is set as ready. In that moment we ensure its parent organization tree won’t change anymore in the future. The AD_IsOrgIncluded function has been totally rewritten to read the AD_Org_Tree table, so there is no need to recursively iterate over the AD_TreeNode table anymore. Important: after this changeset the AD_IsOrgIncluded function will only work for organizations set as ready! A new AD_IsOrgIncluded_TreeNode is created as a copy of the previous AD_IsOrgIncluded code to be used only by the processes working with non ready organizations. The Set as Ready process (AD_ORG_READY) has been updated to use this legacy function when required. A new module script PopulateADOrgTree.java has been developed to populate the new table for existing instances. Sampledata has been updated too. A set of automatic tests have been created to ensure the function returns the same values after the refactor, and that we get a real performance improvement. The improvement heavily depends on the organization tree structure (the more levels the better it will perform), parameters (the farther the passed orgs are the better it will perform) and query/table over the function is called from (the bigger table the better it will perform). In local testings we get improvements from 2,70x to 200x --- M src-db/database/model/functions/AD_ISORGINCLUDED.xml M src-db/database/model/functions/AD_ORG_CHK_CALENDAR.xml M src-db/database/model/functions/AD_ORG_READY.xml M src-db/database/sourcedata/AD_COLUMN.xml M src-db/database/sourcedata/AD_DATASET_TABLE.xml M src-db/database/sourcedata/AD_ELEMENT.xml M src-db/database/sourcedata/AD_TABLE.xml M src-test/src/org/openbravo/test/db/model/functions/Ad_isorgincludedTest.java A referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml A referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml A src-db/database/model/functions/AD_ISORGINCLUDED_TREENODE.xml A src-db/database/model/tables/AD_ORG_TREE.xml A src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java A src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class A src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class A src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java A src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql --- |
(0095937) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: 74b6c9e2a2adcdc910234fba05818c3123ed5712 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Wed Mar 22 16:46:14 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/74b6c9e2a2adcdc910234fba05818c3123ed5712 [^] Related to issue 35590: Added tests to AllAntTaskTests --- M src-test/src/org/openbravo/test/AllAntTaskTests.java --- |
(0095938) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: d4bf9e7a0ac1f1a8cb1c40ac1160cd2e6d07d130 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Thu Mar 23 09:56:38 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/d4bf9e7a0ac1f1a8cb1c40ac1160cd2e6d07d130 [^] Related to issue 35590: Added new testChildOrgValidation Removed useless flush() --- M src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java --- |
(0095939) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: 3c783e8b2bf36b34eff0da25e87268b4308a51f9 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Thu Mar 23 13:59:57 2017 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/3c783e8b2bf36b34eff0da25e87268b4308a51f9 [^] Related to issue 35590: Removed AD_ORG_TREE sampledata and execute module script on install.source This changeset should be reverted when creating sampledata for 3.0PR17Q3 --- M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class M src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java R referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml R referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml --- |
(0095940) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: 40c88ac352df08171636b38f33885dfd3500b660 Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Tue Mar 28 11:51:59 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/40c88ac352df08171636b38f33885dfd3500b660 [^] Related to issue 35590: Added sampledata. Manage install.source in modulescript Ensure the module script is executed on install.source to control the scenario where a sampledata module is installed. The module script won't add duplicate lines to AD_Org_Tree in case of sampledata --- M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class M src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java M src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree_data.xsql A referencedata/sampledata/F_B_International_Group/AD_ORG_TREE.xml A referencedata/sampledata/QA_Testing/AD_ORG_TREE.xml --- |
(0095941) hgbot (developer) 2017-04-10 14:15 |
Repository: erp/devel/pi Changeset: 18c5039ab7628986464b5b8823af0fd2208595be Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com> Date: Mon Apr 03 14:47:10 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/18c5039ab7628986464b5b8823af0fd2208595be [^] Related to issue 35590: Applied code review feedback Deactivated performance tests as they might create false positives in CI servers. Removed info message in module script as the tests show the time to finish the script is good enough (around 10 minutes for 700 orgs) --- M src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTreeData.class M src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java --- |
(0095942) hgbot (developer) 2017-04-10 14:16 |
Repository: erp/devel/pi Changeset: 72f382b06664023c8ef7de1912215162edf56798 Author: Alvaro Ferraz <alvaro.ferraz <at> openbravo.com> Date: Mon Apr 10 14:08:16 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/72f382b06664023c8ef7de1912215162edf56798 [^] Related to issue 35590: Code review improvements Update modulescript limits. Apply code format in modulescript. Move ADOrgTreeTest test to same package as Ad_isorgincludedTest test. --- M src-test/src/org/openbravo/test/AllAntTaskTests.java M src-util/modulescript/build/classes/org/openbravo/modulescript/PopulateADOrgTree.class M src-util/modulescript/src/org/openbravo/modulescript/PopulateADOrgTree.java A src-test/src/org/openbravo/test/db/model/functions/ADOrgTreeTest.java R src-test/src/org/openbravo/test/IsOrgIncluded/ADOrgTreeTest.java --- |
(0095946) aferraz (manager) 2017-04-10 14:52 |
Code review OK |
(0096874) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096875) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096876) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096877) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096878) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096879) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
(0096880) hudsonbot (developer) 2017-05-29 17:43 |
A changeset related to this issue has been promoted main and to the Central Repository, after passing a series of tests. Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/1ee70113bdc4 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2017-03-22 10:30 | vmromanos | New Issue | |
2017-03-22 10:30 | vmromanos | Assigned To | => vmromanos |
2017-03-22 10:30 | vmromanos | Modules | => Core |
2017-03-22 10:30 | vmromanos | Triggers an Emergency Pack | => No |
2017-03-22 10:32 | vmromanos | Relationship added | blocks 0034676 |
2017-03-22 11:36 | vmromanos | Relationship added | depends on 0035595 |
2017-03-22 14:18 | vmromanos | File Added: 35590_final.diff | |
2017-03-28 11:55 | vmromanos | Status | new => scheduled |
2017-03-28 11:56 | vmromanos | File Deleted: 35590_final.diff | |
2017-03-28 11:56 | vmromanos | File Added: 35590.diff | |
2017-04-03 17:47 | vmromanos | File Deleted: 35590.diff | |
2017-04-03 17:47 | vmromanos | File Added: 35590.diff | |
2017-04-04 16:39 | vmromanos | File Deleted: 35590.diff | |
2017-04-04 16:39 | vmromanos | File Added: 35590.diff | |
2017-04-04 16:46 | vmromanos | Review Assigned To | => aferraz |
2017-04-04 16:46 | vmromanos | Target Version | => 3.0PR17Q3 |
2017-04-07 14:29 | aferraz | Description Updated | View Revisions |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095936 | |
2017-04-10 14:15 | hgbot | Status | scheduled => resolved |
2017-04-10 14:15 | hgbot | Resolution | open => fixed |
2017-04-10 14:15 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/b4fdc836924e3bc2738803e7039c50d7d39af47f [^] |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095937 | |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095938 | |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095939 | |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095940 | |
2017-04-10 14:15 | hgbot | Checkin | |
2017-04-10 14:15 | hgbot | Note Added: 0095941 | |
2017-04-10 14:16 | hgbot | Checkin | |
2017-04-10 14:16 | hgbot | Note Added: 0095942 | |
2017-04-10 14:46 | aferraz | Relationship added | related to 0035729 |
2017-04-10 14:52 | aferraz | Note Added: 0095946 | |
2017-04-10 14:52 | aferraz | Status | resolved => closed |
2017-04-10 14:52 | aferraz | Fixed in Version | => 3.0PR17Q3 |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096874 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096875 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096876 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096877 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096878 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096879 | |
2017-05-29 17:43 | hudsonbot | Checkin | |
2017-05-29 17:43 | hudsonbot | Note Added: 0096880 | |
2017-06-07 12:21 | aferraz | Relationship added | blocks 0036180 |
Copyright © 2000 - 2009 MantisBT Group |