You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2016/07/03 05:27:56 UTC

svn commit: r1751111 - in /ofbiz/branches/release14.12/applications/accounting: webapp/accounting/WEB-INF/actions/agreement/ webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy widget/AgreementForms.xml

Author: ashish
Date: Sun Jul  3 05:27:56 2016
New Revision: 1751111

URL: http://svn.apache.org/viewvc?rev=1751111&view=rev
Log:
Applied patch from trunk r1751109.
======================================
Applied patch from jira issue - OFBIZ-7143 - Error on cancelling agreement.
Thanks Ravi for the contribution. Thanks Montalbano for the discussion.

Added:
    ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/
    ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy
Modified:
    ofbiz/branches/release14.12/applications/accounting/widget/AgreementForms.xml

Added: ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy?rev=1751111&view=auto
==============================================================================
--- ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy (added)
+++ ofbiz/branches/release14.12/applications/accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy Sun Jul  3 05:27:56 2016
@@ -0,0 +1,8 @@
+partyIdFrom = parameters.partyIdFrom;
+partyIdTo = parameters.partyIdTo;
+if (partyIdFrom) {
+    context.partyNameResultFrom = runService("getPartyNameForDate", [partyId: partyIdFrom, compareDate: agreementDate, lastNameFirst: "Y"])
+}
+if (partyIdTo) {
+    context.partyNameResultTo = runService("getPartyNameForDate", [partyId: partyIdTo, compareDate: agreementDate, lastNameFirst: "Y"])
+}
\ No newline at end of file

Modified: ofbiz/branches/release14.12/applications/accounting/widget/AgreementForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/branches/release14.12/applications/accounting/widget/AgreementForms.xml?rev=1751111&r1=1751110&r2=1751111&view=diff
==============================================================================
--- ofbiz/branches/release14.12/applications/accounting/widget/AgreementForms.xml (original)
+++ ofbiz/branches/release14.12/applications/accounting/widget/AgreementForms.xml Sun Jul  3 05:27:56 2016
@@ -60,23 +60,9 @@ 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="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="partyIdToTmp"/>
-                <field-map field-name="compareDate" from-field="agreementDate"/>
-                <field-map field-name="lastNameFirst" value="Y"/>
-            </service>
+            <script location="component://accounting/webapp/accounting/WEB-INF/actions/agreement/GetPartyNameForDate.groovy"/>
         </row-actions>         
         <auto-fields-entity entity-name="Agreement" default-field-type="display"/>
         <field name="agreementId" title="${uiLabelMap.CommonEdit}" widget-style="buttontext" sort-field="true">