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

jleroux 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 272c7130b9 Improved: Accounting main screen is little slow because of 
loading groovy script 4 times. (OFBIZ-13166)
272c7130b9 is described below

commit 272c7130b95f3e1bda75c27d2af79510df0abb23
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Sun Nov 3 09:12:04 2024 +0100

    Improved: Accounting main screen is little slow because of loading groovy 
script 4 times. (OFBIZ-13166)
    
    What we can do is to reduce the loading to 2.
    
    InvoiceReport.groovy needs an invoiceTypeId  parameter.
    
    The order of loading is defined at bottom off AccountingPortletData.xml
    So we can remove the 2nd call for each type.
    I actually commented them out and put a comment in AccountingPortletData
---
 applications/accounting/data/AccountingPortletData.xml | 1 +
 applications/accounting/widget/InvoiceScreens.xml      | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/applications/accounting/data/AccountingPortletData.xml 
b/applications/accounting/data/AccountingPortletData.xml
index 810e2da32e..615b663f9f 100644
--- a/applications/accounting/data/AccountingPortletData.xml
+++ b/applications/accounting/data/AccountingPortletData.xml
@@ -92,6 +92,7 @@
     <PortalPage portalPageId="ACC_MAIN" portalPageName="Accounting Main Page" 
description="The main portal page of the Accounting application" 
ownerUserLoginId="_NA_" sequenceNum="1"/>
     <PortalPageColumn columnSeqId="00001" portalPageId="ACC_MAIN"/>
     <PortalPageColumn columnSeqId="00002" portalPageId="ACC_MAIN"/>
+    <!-- Beware the loading order is defined below and should not be changed 
because invoiceTypeId is needed for each type, see OFBIZ-13166-->
     <PortalPagePortlet columnSeqId="00001" portalPageId="ACC_MAIN" 
portalPortletId="InvoiceArPastDue" portletSeqId="00001" sequenceNum="1"/>
     <PortalPagePortlet columnSeqId="00001" portalPageId="ACC_MAIN" 
portalPortletId="InvoiceArDueSoon" portletSeqId="00002" sequenceNum="2"/>
     <PortalPagePortlet columnSeqId="00002" portalPageId="ACC_MAIN" 
portalPortletId="InvoiceApPastDue" portletSeqId="00003" sequenceNum="1"/>
diff --git a/applications/accounting/widget/InvoiceScreens.xml 
b/applications/accounting/widget/InvoiceScreens.xml
index b93e852c75..94fed94baa 100644
--- a/applications/accounting/widget/InvoiceScreens.xml
+++ b/applications/accounting/widget/InvoiceScreens.xml
@@ -361,7 +361,7 @@ under the License.
         <section>
            <actions>
                 <property-map resource="AccountingUiLabels" 
map-name="uiLabelMap" global="true"/>
-                <set field="invoiceTypeId" value="SALES_INVOICE"/>
+                <!-- <set field="invoiceTypeId" value="SALES_INVOICE"/> -->
                 <set field="organizationPartyId" 
from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
                 <script 
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceReport.groovy"/>
                 <set field="invoices" from-field="InvoicesDueSoon"/>
@@ -393,7 +393,7 @@ under the License.
         <section>
            <actions>
                 <property-map resource="AccountingUiLabels" 
map-name="uiLabelMap" global="true"/>
-                <set field="invoiceTypeId" value="PURCHASE_INVOICE"/>
+                <!-- <set field="invoiceTypeId" value="PURCHASE_INVOICE"/> -->
                 <set field="organizationPartyId" 
from-field="organizationPartyId" default-value="${defaultOrganizationPartyId}"/>
                 <script 
location="component://accounting/src/main/groovy/org/apache/ofbiz/accounting/invoice/InvoiceReport.groovy"/>
                 <set field="invoices" from-field="InvoicesDueSoon"/>

Reply via email to