BPartner Info : 'Default SQL variable parse failed' when opened from Home page

74 views
Skip to first unread message

Nicolas Micoud

unread,
Jul 26, 2021, 3:30:29 AM7/26/21
to iDempiere
Hi,

When opening the BPartnerInfo panel from Home page, there is this log :
02:06:45.241-----------> GridField.defaultFromSQLExpression: (IsCustomer) - Default SQL variable parse failed: @SQL=SELECT CASE WHEN '@IsSOTrx:X@'='X' OR '@+IgnoreIsSOTrxInBPInfo:N@'='Y' THEN '' ELSE '@IsSOTrx@' END AS DefaultValue FROM DUAL [667]

Is because IsSOTrx (the 2nd one) is not set.

There was a first fix (https://idempiere.atlassian.net/browse/IDEMPIERE-3532?focusedCommentId=46464) but issue has been reintroduced I think by https://idempiere.atlassian.net/browse/IDEMPIERE-4808

I've updated the logic to

@SQL=SELECT CASE WHEN '@IsSOTrx:X@'='X' OR '@+IgnoreIsSOTrxInBPInfo:N@'='Y' THEN '' ELSE '@IsSOTrx:Y@' END AS DefaultValue FROM DUAL

From my tests, I think is working but I'm not sure this is the best way to manage it.

I think the :Y can be replaced by any value


wdyt?


Thanks

Nicolas

Carlos Antonio Ruiz Gomez

unread,
Jul 26, 2021, 5:33:21 AM7/26/21
to idem...@googlegroups.com
Yes, please reopen IDEMPIERE-4808 to add that pull request.


El 26/7/21 a las 9:30, Nicolas Micoud escribió:
Nicolas --

Nicolas Micoud

unread,
Jul 26, 2021, 7:30:28 AM7/26/21
to iDempiere
Hi Carlos,

I've created a "IDEMPIERE-4808_2" branch
and add 2 migration scripts: i8.2\oracle\202107261330_IDEMPIERE-4808_2.sql
Before commiting, is it ok for you or do you prefer other names?

Thanks

Nicolas

Nicolas Micoud

unread,
Jul 26, 2021, 7:33:37 AM7/26/21
to iDempiere
btw, I've seen the syntax was quite different between customer and vendor.
so the patch is to harmonize them

Carlos Antonio Ruiz Gomez

unread,
Jul 26, 2021, 9:27:09 AM7/26/21
to idem...@googlegroups.com
Yes, script name looks OK


El 26/7/21 a las 13:33, Nicolas Micoud escribió:

Nicolas Micoud

unread,
Jul 26, 2021, 9:49:43 AM7/26/21
to iDempiere
ok, thanks ; done
Reply all
Reply to author
Forward
0 new messages