Skip to content

Commit

Permalink
A patch from Ingo Wolfmayr for "Agreement Search List requires partyI…
Browse files Browse the repository at this point in the history
…dFrom/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.

This more a workaround than a fix but it works and is better than an error message. Missing fields will be set to empty field. Service will be called and return nothing.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1741960 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
JacquesLeRoux committed May 2, 2016
1 parent 6c970b9 commit 877a791
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions applications/accounting/widget/AgreementForms.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,20 @@ under the License.
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>

<!--Fallback if partyIdFrom or partyIdTo is empty, at this time it is not possible to add is-empty condition in widgets (in this case to prevent service call)-->
<set field="partyIdFromTmp" from-field="parameters.partyIdFrom" default-value=""/>
<set field="partyIdToTmp" from-field="parameters.partyIdTo" default-value=""/>

</actions>
<row-actions>
<service service-name="getPartyNameForDate" result-map="partyNameResultFrom">
<field-map field-name="partyId" from-field="partyIdFrom"/>
<field-map field-name="partyId" from-field="partyIdFromTmp"/>
<field-map field-name="compareDate" from-field="agreementDate"/>
<field-map field-name="lastNameFirst" value="Y"/>
</service>
<service service-name="getPartyNameForDate" result-map="partyNameResultTo">
<field-map field-name="partyId" from-field="partyIdTo"/>
<field-map field-name="partyId" from-field="partyIdToTmp"/>
<field-map field-name="compareDate" from-field="agreementDate"/>
<field-map field-name="lastNameFirst" value="Y"/>
</service>
Expand Down

0 comments on commit 877a791

Please sign in to comment.