OK, thank Deepak :)
Jacques
Le 04/05/2016 à 06:58, Deepak Dixit a écrit :
If you select any payment from search result then payment will be set in
context and will be available in PaymentSubTabBar menu items.
Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
On Tue, May 3, 2016 at 5:04 PM, Jacques Le Roux <
jacques.le.r...@les7arts.com> wrote:
Thanks Deepak,
I committed your proposition in trunk at r1742097 (and backported)
I just used "null" instead of "void" which was weird to me (maybe a legacy
from BSh)
I though still wonder in which occasion we can have a payment in context
there.
Jacques
Le 03/05/2016 à 08:14, Deepak Dixit a écrit :
Hi Jacques,
I think you can use context.payment to fix
groovy.lang.MissingPropertyException
problem.
Here is the code sample, Its working on my local box without error:
{code}
<set field="isDisbursement"
value="${groovy:if(context.payment!=void)return
org.ofbiz.accounting.util.UtilAccounting.isDisbursement(context.payment)}"/>
{code}
Thanks & Regards
--
Deepak Dixit
www.hotwaxsystems.com
On Mon, May 2, 2016 at 11:42 PM, <jler...@apache.org> wrote:
Author: jleroux
Date: Mon May 2 18:12:08 2016
New Revision: 1742018
URL: http://svn.apache.org/viewvc?rev=1742018&view=rev
Log:
Fixes an issue found by chance. This was changed from bsh to groovy by
r1613432 but does not work. I tried many variants but none works, all
return
groovy.lang.MissingPropertyException: No such property: payment for
class:
script....
So back to origin :/
Modified:
ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
Modified: ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml?rev=1742018&r1=1742017&r2=1742018&view=diff
==============================================================================
--- ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml
(original)
+++ ofbiz/trunk/applications/accounting/widget/AccountingMenus.xml Mon
May 2 18:12:08 2016
@@ -419,7 +419,7 @@ under the License.
<menu name="PaymentSubTabBar" extends="CommonTabBarMenu"
extends-resource="component://common/widget/CommonMenus.xml"
menu-container-style="button-bar button-style-2">
<actions>
- <set field="isDisbursement"
value="${groovy:if(payment!=void)return
org.ofbiz.accounting.util.UtilAccounting.isDisbursement(payment)}"/>
+ <set field="isDisbursement"
value="${bsh:if(payment!=void)return
org.ofbiz.accounting.util.UtilAccounting.isDisbursement(payment)}"/>
</actions>
<menu-item name="createNew"
title="${uiLabelMap.CommonCreateNew}"
widget-style="buttontext create" >
<condition>