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

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


The following commit(s) were added to refs/heads/release24.09 by this push:
     new ae65a30820 Fixed: TaxAuthority lookup allows selecting parties without 
the TaxAuthority role (OFBIZ-12374) (#1697)
ae65a30820 is described below

commit ae65a30820886f38a40f98d7238817c31819afc4
Author: Mridul Pathak <[email protected]>
AuthorDate: Fri Aug 21 20:53:29 2026 +0530

    Fixed: TaxAuthority lookup allows selecting parties without the 
TaxAuthority role (OFBIZ-12374) (#1697)
    
    Backported from trunk (#1692).
    
    Signed-off-by: Karth <[email protected]>
    Co-authored-by: Karth <[email protected]>
    
    Thanks: Pierre Smits for reporting.
---
 .../webapp/accounting/WEB-INF/controller.xml       |  5 ++++
 .../accounting/widget/TaxAuthorityForms.xml        |  4 +--
 applications/party/widget/partymgr/LookupForms.xml | 33 ++++++++++++++++++++++
 .../party/widget/partymgr/LookupScreens.xml        | 28 ++++++++++++++++++
 4 files changed, 68 insertions(+), 2 deletions(-)

diff --git a/applications/accounting/webapp/accounting/WEB-INF/controller.xml 
b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
index 0a30df5339..33de741de3 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/controller.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
@@ -2339,6 +2339,10 @@ under the License.
         <security auth="true" https="true"/>
         <response name="success" type="view" value="LookupSupplier"/>
     </request-map>
+    <request-map uri="LookupTaxAuthority">
+        <security auth="true" https="true"/>
+        <response name="success" type="view" value="LookupTaxAuthority"/>
+    </request-map>
     <request-map uri="depositWithdrawPayments">
         <security auth="true" https="true"/>
         <event type="service" invoke="depositWithdrawPayments"/>
@@ -2897,6 +2901,7 @@ under the License.
     <view-map name="PaymentsDepositWithdraw" type="screen" 
page="component://accounting/widget/FinAccountScreens.xml#PaymentsDepositWithdraw"/>
     <view-map name="LookupCustomerName" type="screen" 
page="component://party/widget/partymgr/LookupScreens.xml#LookupCustomerName"/>
     <view-map name="LookupSupplier" type="screen" 
page="component://party/widget/partymgr/LookupScreens.xml#LookupSupplier"/>
+    <view-map name="LookupTaxAuthority" type="screen" 
page="component://party/widget/partymgr/LookupScreens.xml#LookupTaxAuthority"/>
     <view-map name="NewDepositSlip" type="screen" 
page="component://accounting/widget/FinAccountScreens.xml#NewDepositSlip"/>
     <view-map name="InventoryValuation" type="screen" 
page="component://accounting/widget/ReportFinancialSummaryScreens.xml#InventoryValuation"/>
     <view-map name="InventoryValuationPdf" type="screenfop" 
page="component://accounting/widget/ReportFinancialSummaryScreens.xml#InventoryValuationPdf"
 content-type="application/pdf" encoding="none"/>
diff --git a/applications/accounting/widget/TaxAuthorityForms.xml 
b/applications/accounting/widget/TaxAuthorityForms.xml
index 400b5eb935..da18897045 100644
--- a/applications/accounting/widget/TaxAuthorityForms.xml
+++ b/applications/accounting/widget/TaxAuthorityForms.xml
@@ -48,8 +48,8 @@ under the License.
         <alt-target use-when="taxAuthority==null" target="createTaxAuthority"/>
         <auto-fields-service service-name="updateTaxAuthority" 
map-name="taxAuthority"/>
         <field use-when="taxAuthority!=null" name="taxAuthPartyId" 
title="${uiLabelMap.PartyParty}"><display/></field>
-        <field use-when="taxAuthority==null&amp;&amp;taxAuthPartyId==null" 
name="taxAuthPartyId" title="${uiLabelMap.PartyParty}" 
required-field="true"><lookup target-form-name="LookupPartyName"/></field>
-        <field use-when="taxAuthority==null&amp;&amp;taxAuthPartyId!=null" 
name="taxAuthPartyId" title="${uiLabelMap.PartyParty}" 
tooltip="${uiLabelMap.CommonCannotBeFound}:[${taxAuthPartyId}]"><lookup 
target-form-name="LookupPartyName"/></field>
+        <field use-when="taxAuthority==null&amp;&amp;taxAuthPartyId==null" 
name="taxAuthPartyId" title="${uiLabelMap.PartyParty}" 
required-field="true"><lookup target-form-name="LookupTaxAuthority"/></field>
+        <field use-when="taxAuthority==null&amp;&amp;taxAuthPartyId!=null" 
name="taxAuthPartyId" title="${uiLabelMap.PartyParty}" 
tooltip="${uiLabelMap.CommonCannotBeFound}:[${taxAuthPartyId}]"><lookup 
target-form-name="LookupTaxAuthority"/></field>
         <field use-when="taxAuthority!=null" name="taxAuthGeoId" 
title="${uiLabelMap.CommonGeo}"><display/></field>
         <field use-when="taxAuthority==null&amp;&amp;taxAuthGeoId==null" 
name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" 
required-field="true"><lookup target-form-name="LookupGeo"/></field>
         <field use-when="taxAuthority==null&amp;&amp;taxAuthGeoId!=null" 
name="taxAuthGeoId" title="${uiLabelMap.CommonGeo}" 
tooltip="${uiLabelMap.CommonCannotBeFound}:[${taxAuthGeoId}]"><lookup 
target-form-name="LookupGeo"/></field>
diff --git a/applications/party/widget/partymgr/LookupForms.xml 
b/applications/party/widget/partymgr/LookupForms.xml
index c4160ddba4..1ce4007f8f 100644
--- a/applications/party/widget/partymgr/LookupForms.xml
+++ b/applications/party/widget/partymgr/LookupForms.xml
@@ -467,6 +467,39 @@ under the License.
         <field name="lastName"  
title="${uiLabelMap.PartyLastName}"><display/></field>
         <field name="groupName" 
title="${uiLabelMap.PartyGroupName}"><display/></field>
     </form>
+    <form name="LookupTaxAuthority" target="LookupTaxAuthority" type="single"
+          header-row-style="header-row" default-table-style="basic-table">
+        <field name="roleTypeId"><hidden value="TAX_AUTHORITY"/></field>
+        <field name="partyId" 
title="${uiLabelMap.PartyPartyId}"><text-find/></field>
+        <field name="partyTypeId" title="${uiLabelMap.PartyTypeId}">
+            <drop-down allow-empty="true">
+                <entity-options entity-name="PartyType"/>
+            </drop-down>
+        </field>
+        <field name="firstName" 
title="${uiLabelMap.PartyFirstName}"><text-find/></field>
+        <field name="lastName"  
title="${uiLabelMap.PartyLastName}"><text-find/></field>
+        <field name="groupName" 
title="${uiLabelMap.PartyGroupName}"><text-find/></field>
+        <field name="noConditionFind"><hidden value="Y"/><!-- if this isn't 
there then with all fields empty no query will be done --></field>
+        <field name="submitButton" title="${uiLabelMap.CommonFind}"><submit 
button-type="button"/></field>
+    </form>
+    <form name="ListLookupTaxAuthority" type="list" list-name="listIt" 
paginate-target="LookupTaxAuthority"
+          odd-row-style="alternate-row" default-table-style="basic-table 
hover-bar">
+        <actions>
+            <set field="inputFields" from-field="parameters"/>
+            <set field="orderBy" value="partyId"/>
+            <set field="entityName" value="PartyRoleNameDetail"/>
+            <script 
location="component://party/src/main/groovy/org/apache/ofbiz/party/party/FindLookUp.groovy"/>
+        </actions>
+        <field name="partyId" title="${uiLabelMap.PartyPartyId}"  
widget-style="smallSubmit">
+            <hyperlink description="${partyId}" 
target="javascript:set_value('${partyId}')" also-hidden="false" 
target-type="plain"/>
+        </field>
+        <field name="partyTypeId" title="${uiLabelMap.PartyTypeId}">
+            <display-entity also-hidden="false" entity-name="PartyType"/>
+        </field>
+        <field name="firstName" 
title="${uiLabelMap.PartyFirstName}"><display/></field>
+        <field name="lastName"  
title="${uiLabelMap.PartyLastName}"><display/></field>
+        <field name="groupName" 
title="${uiLabelMap.PartyGroupName}"><display/></field>
+    </form>
     <form name="LookupEmployee" target="LookupEmployee" type="single"
         header-row-style="header-row" default-table-style="basic-table">
         <field name="roleTypeId"><hidden value="EMPLOYEE"/></field>
diff --git a/applications/party/widget/partymgr/LookupScreens.xml 
b/applications/party/widget/partymgr/LookupScreens.xml
index 6097a4d409..1392164630 100644
--- a/applications/party/widget/partymgr/LookupScreens.xml
+++ b/applications/party/widget/partymgr/LookupScreens.xml
@@ -488,6 +488,34 @@ under the License.
             </widgets>
         </section>
     </screen>
+    <screen name="LookupTaxAuthority">
+        <section>
+            <condition>
+                <if-service-permission service-name="partyBasePermissionCheck" 
main-action="VIEW"/>
+            </condition>
+            <actions>
+                <property-map resource="PartyUiLabels" map-name="uiLabelMap" 
global="true"/>
+                <set field="title" 
from-field="uiLabelMap.PartyLookupPartyByName"/>
+                <set field="queryString" from-field="result.queryString"/>
+                <set field="viewIndex" from-field="parameters.VIEW_INDEX" 
type="Integer" default-value="0"/>
+                <set field="viewSizeDefaultValue" value="${groovy: 
modelTheme.getDefaultViewSize()}" type="Integer"/>
+                <set field="viewSize" from-field="parameters.VIEW_SIZE" 
type="Integer" default-value="${viewSizeDefaultValue}"/>
+                <set field="entityName" value="PartyRoleNameDetail"/>
+                <set field="searchFields" value="[partyId, firstName, 
middleName, lastName, groupName]"/>
+                <set field="conditionFields.roleTypeId" value="TAX_AUTHORITY" 
/>
+            </actions>
+            <widgets>
+                <decorator-screen name="LookupDecorator" 
location="component://common/widget/CommonScreens.xml">
+                    <decorator-section name="search-options">
+                        <include-form name="LookupTaxAuthority" 
location="component://party/widget/partymgr/LookupForms.xml"/>
+                    </decorator-section>
+                    <decorator-section name="search-results">
+                        <include-form name="ListLookupTaxAuthority" 
location="component://party/widget/partymgr/LookupForms.xml"/>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
     <screen name="LookupEmployee">
         <section>
             <condition>

Reply via email to