Skip to content

Commit

Permalink
Improved: Accounting main screen is little slow because of loading gr…
Browse files Browse the repository at this point in the history
…oovy 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
  • Loading branch information
JacquesLeRoux committed Nov 3, 2024
1 parent cadd220 commit 272c713
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions applications/accounting/data/AccountingPortletData.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down
4 changes: 2 additions & 2 deletions applications/accounting/widget/InvoiceScreens.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"/>
Expand Down Expand Up @@ -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"/>
Expand Down

0 comments on commit 272c713

Please sign in to comment.