[ofbiz-framework] branch trunk updated: Improved: Enhance entity "GlXbrlClass" and use (OFBIZ-10613) (#41)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Improved: Enhance entity "GlXbrlClass" and use (OFBIZ-10613) (#41)

Pawan Verma-2
This is an automated email from the ASF dual-hosted git repository.

pawan pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new e1ab3b1  Improved: Enhance entity "GlXbrlClass" and use (OFBIZ-10613) (#41)
e1ab3b1 is described below

commit e1ab3b1e99bf656d311b5ede38eeb9d9429a9606
Author: Pierre Smits <[hidden email]>
AuthorDate: Fri May 8 13:04:40 2020 +0200

    Improved: Enhance entity "GlXbrlClass" and use (OFBIZ-10613) (#41)
   
    * Improved: Enhance entity "GlXbrlClass" and use
   
    (OFBIZ-10613)
   
    Adding field parent of the GlXbrlClassId
    Application of field in appropriate forms
   
    * Improved: Added new field parentGlXbrlClassId into DATAMODEL_CHANGES.md
    (OFBIZ-10613)
   
    Co-authored-by: Pawan Verma <[hidden email]>
---
 applications/accounting/widget/GlSetupForms.xml             | 2 +-
 applications/accounting/widget/GlobalGlAccountsForms.xml    | 2 +-
 applications/datamodel/DATAMODEL_CHANGES.md                 | 6 +++++-
 applications/datamodel/entitydef/accounting-entitymodel.xml | 6 +++++-
 4 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/applications/accounting/widget/GlSetupForms.xml b/applications/accounting/widget/GlSetupForms.xml
index de8f098..ef8e1ec 100644
--- a/applications/accounting/widget/GlSetupForms.xml
+++ b/applications/accounting/widget/GlSetupForms.xml
@@ -71,7 +71,7 @@ under the License.
         <field name="glAccountClassId"><display-entity entity-name="GlAccountClass"/></field>
         <field name="glResourceTypeId"><display-entity entity-name="GlResourceType"/></field>
         <field name="glXbrlClassId"><display-entity entity-name="GlXbrlClass"/></field>
-
+        <field name="parentGlXbrlClassId"><display-entity entity-name="GlXbrlClass" key-field-name="glXbrlClassId"/></field>
         <field name="description"><display/></field>
         <field name="productId"><display-entity entity-name="Product"/></field>
         <field name="externalId"><display/></field>
diff --git a/applications/accounting/widget/GlobalGlAccountsForms.xml b/applications/accounting/widget/GlobalGlAccountsForms.xml
index b54a037..dc46b82 100644
--- a/applications/accounting/widget/GlobalGlAccountsForms.xml
+++ b/applications/accounting/widget/GlobalGlAccountsForms.xml
@@ -96,7 +96,7 @@ under the License.
         <field name="glAccountClassId"><display-entity entity-name="GlAccountClass"/></field>
         <field name="glResourceTypeId"><display-entity entity-name="GlResourceType"/></field>
         <field name="glXbrlClassId"><display-entity entity-name="GlXbrlClass"/></field>
-
+        <field name="parentGlXbrlClassId"><display-entity entity-name="GlXbrlClass" key-field-name="glXbrlClassId"/></field>
         <field name="description"><display/></field>
         <field name="productId"><display-entity entity-name="Product"/></field>
         <field name="externalId"><display/></field>
diff --git a/applications/datamodel/DATAMODEL_CHANGES.md b/applications/datamodel/DATAMODEL_CHANGES.md
index cad5cdc..9836db0 100644
--- a/applications/datamodel/DATAMODEL_CHANGES.md
+++ b/applications/datamodel/DATAMODEL_CHANGES.md
@@ -34,7 +34,11 @@ The detailed description of migration scripts specified here can be found at [Re
 1. ProductPromoCodeEmail
 
 ## Field Changes
-No changes
+
+| Entity  | Field  | Action | IsPK | Revision |
+|:------------- |:---------------:|:---------------:|:---------------:| -------------:|
+| GlXbrlClass | parentGlXbrlClassId | Added | No | 36a123a |
+
 
 ## Migration Scripts
 1. Migration service migrateProductPromoCodeEmail is implemented to migrate the ProductPromoCodeEmail entity to ProductPromoCodeContactMech. (More detail at [OFBIZ-5426](https://issues.apache.org/jira/browse/OFBIZ-5426))
diff --git a/applications/datamodel/entitydef/accounting-entitymodel.xml b/applications/datamodel/entitydef/accounting-entitymodel.xml
index c5f9be0..be66bfe 100644
--- a/applications/datamodel/entitydef/accounting-entitymodel.xml
+++ b/applications/datamodel/entitydef/accounting-entitymodel.xml
@@ -36,8 +36,8 @@ under the License.
     <!--  - org.apache.ofbiz.accounting.invoice -->
     <!--  - org.apache.ofbiz.accounting.ledger -->
     <!--  - org.apache.ofbiz.accounting.payment -->
-    <!--  - org.apache.ofbiz.accounting.tax -->
     <!--  - org.apache.ofbiz.accounting.rate -->
+    <!--  - org.apache.ofbiz.accounting.tax -->
     <!-- ========================================================= -->
 
 
@@ -2434,8 +2434,12 @@ under the License.
             package-name="org.apache.ofbiz.accounting.ledger"
             title="General Ledger XBRL Class">
       <field name="glXbrlClassId" type="id"></field>
+      <field name="parentGlXbrlClassId" type="id"></field>
       <field name="description" type="description"></field>
       <prim-key field="glXbrlClassId"/>
+      <relation type="one" fk-name="GL_XBRL_CLSPAR" title="Parent" rel-entity-name="GlXbrlClass">
+        <key-map field-name="parentGlXbrlClassId" rel-field-name="glXbrlClassId"/>
+      </relation>
     </entity>
     <entity entity-name="PartyAcctgPreference"
         package-name="org.apache.ofbiz.accounting.ledger"