Author: jleroux
Date: Mon May 2 07:35:38 2016
New Revision: 1741925
URL:
http://svn.apache.org/viewvc?rev=1741925&view=revLog:
A patch from Ingo Wolfmayr for "Agreement Search List requires partyIdFrom/partyIdTo or fails" -
https://issues.apache.org/jira/browse/OFBIZ-7030How 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">