You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/11/12 19:59:38 UTC
svn commit: r1408408 -
/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
Author: jleroux
Date: Mon Nov 12 18:59:38 2012
New Revision: 1408408
URL: http://svn.apache.org/viewvc?rev=1408408&view=rev
Log:
A patch from Nicolas Malin for "ProjectMgr : list project's company, error on form to resolve currency" https://issues.apache.org/jira/browse/OFBIZ-5071
To solve this issue, I change bsh script to groovy script.
After the patch application, on the same page, the currency appears near "Your Company Name Here [Company]"
jleroux: actually I did a bit more and rewrote it using safe-navigation and elvis operator, nice to read hèè ;)
Modified:
ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
Modified: ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml?rev=1408408&r1=1408407&r2=1408408&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml (original)
+++ ofbiz/trunk/specialpurpose/projectmgr/widget/forms/ProjectForms.xml Mon Nov 12 18:59:38 2012
@@ -525,8 +525,8 @@
<row-actions>
<entity-one entity-name="PartyAcctgPreference" value-field="orgParty"/>
<entity-one entity-name="Party" value-field="clientParty"/>
- <set field="currencyUomId" value="${bsh:orgParty!=null&&orgParty.getString("baseCurrencyUomId")!=null?orgParty.getString("baseCurrencyUomId"):""}"/>
- <set field="currencyUomId" value="${bsh:clientParty!=null&&clientParty.getString("preferredCurrencyUomId")!=null?clientParty.getString("preferredCurrencyUomId"):currencyUomId}"/>
+ <set field="currencyUomId" value="${groovy: orgParty?.getString('baseCurrencyUomId') ?: ''}"/>
+ <set field="currencyUomId" value="${groovy: clientParty?.getString('preferredCurrencyUomId') ?: currencyUomId}"/>
</row-actions>
<field name="projectId"><hidden/></field>
<field name="partyName" title="${uiLabelMap.CommonName}">