Exception with table alias in virtual columns (only for views)

Description

Alias in virtual columns (only on views) cannot be used when view has translation (e.g. M_InOut_Line_v, M_InOut_Line_vt) and is used for print format. Cannot use M_InOut_Line_v alias because M_InOut_Line_vt view is used in query by idempiere.

Error: missing FROM-clause entry for table "M_InOut_Line_v"

STEPS TO REPRODUCE:
1. Create virtual column on M_InOut_Line_v (columnSQL=SELECT UPC FROM M_Product WHERE M_Product_ID=M_InOut_Line_v.M_Product_ID)
2. Add this line to random Print Format which uses M_InOut_Line_v
3. Run report with previous Print Format when you are logged with non system language or set Language on BPartner to language Spanish (M_InOut_Line_vt table has to be used in query)

PS: Log and ScreenShot are based on view DD_Order_Line_v

Environment

None

Attachments

3

Activity

Show:

Tomáš Švikruha October 10, 2014 at 8:53 AM

Thanks . it solved my problem.

Hiep Lq October 9, 2014 at 5:38 PM

root cause: when main table has translate table. translate table will use in query, but main table in virtual column is not replace => wrong sql

Fixed

Details

Assignee

Reporter

Labels

Priority

Created October 9, 2014 at 9:54 AM
Updated July 2, 2018 at 11:41 AM
Resolved May 17, 2018 at 1:24 PM