svn commit: r1741925 - /ofbiz/trunk/applications/accounting/widget/AgreementForms.xml

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

svn commit: r1741925 - /ofbiz/trunk/applications/accounting/widget/AgreementForms.xml

jleroux@apache.org
Author: jleroux
Date: Mon May  2 07:35:38 2016
New Revision: 1741925

URL: http://svn.apache.org/viewvc?rev=1741925&view=rev
Log:
A patch from Ingo Wolfmayr for "Agreement Search List requires partyIdFrom/partyIdTo or fails" - https://issues.apache.org/jira/browse/OFBIZ-7030

How tot test!
Create a new agreement and fill the following fields:

    partyTo (for ex. DemoCustomer)
    Role Type Id From (for ex. Client)
    Role Type Id To(for ex. Bill-to customer)
    Agreement Type ID (for ex. Sales)
    Description: test

error: Error in form [ListAgreements] calling service with name [getPartyNameForDate]: org.ofbiz.service.ServiceValidationException: The following required parameter is missing: [getPartyNameForDate.partyId]java.lang.IllegalArgumentException: Error in form [ListAgreements] calling service with name [getPartyNameForDate]: org.ofbiz.service.ServiceValidationException: The following required parameter is missing: [getPartyNameForDate.partyId]

I create a generic agreement (from company to all customers with no specific agreements) - I could not access it after creation.

I added a not-empty check.

Modified:
    ofbiz/trunk/applications/accounting/widget/AgreementForms.xml

Modified: ofbiz/trunk/applications/accounting/widget/AgreementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AgreementForms.xml?rev=1741925&r1=1741924&r2=1741925&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AgreementForms.xml (original)
+++ ofbiz/trunk/applications/accounting/widget/AgreementForms.xml Mon May  2 07:35:38 2016
@@ -61,18 +61,24 @@ under the License.
                 <field-map field-name="viewSize" from-field="viewSize"/>
             </service>
         </actions>
-        <row-actions>
+ <if-not-empty field="partyIdFrom">
+ <row-actions>
             <service service-name="getPartyNameForDate" result-map="partyNameResultFrom">
                 <field-map field-name="partyId" from-field="partyIdFrom"/>
                 <field-map field-name="compareDate" from-field="agreementDate"/>
                 <field-map field-name="lastNameFirst" value="Y"/>
             </service>
+ </row-actions>  
+ </if-not-empty>
+ <if-not-empty field="partyIdTo">
+ <row-actions>
             <service service-name="getPartyNameForDate" result-map="partyNameResultTo">
                 <field-map field-name="partyId" from-field="partyIdTo"/>
                 <field-map field-name="compareDate" from-field="agreementDate"/>
                 <field-map field-name="lastNameFirst" value="Y"/>
             </service>
-        </row-actions>        
+ </row-actions>  
+ </if-not-empty>      
         <auto-fields-entity entity-name="Agreement" default-field-type="display"/>
         <field name="agreementId" title="${uiLabelMap.CommonEdit}" widget-style="buttontext" sort-field="true">
             <hyperlink also-hidden="false" description="${agreementId}" target="EditAgreement">