Skip to Content
Menu
This question has been flagged
1 Reply
2286 Views

Hello,

i am a newbie on creating my own reports, so i've just take a look at "sale.report" or "purchase.report" models as reference.

I just saw, on the select query, something like:

SELECT min(l.id) as id,
    s.date_order as date_order,
    p.product_tmpl_id,
    t.categ_id as category_id

....

what is the meaning "l", "s", "p" and "t" at the beggining of each value?

Avatar
Discard
Best Answer

They are aliases for the table names used in the from clause. Aliases are typically used so that you can avoid typing the full table name multiple times. Also, aliases are useful when you have to use the same table in different contexts within your query.

Avatar
Discard

where are aliases defined?

Related Posts Replies Views Activity
0
May 17
2775
1
May 24
11439
1
Nov 17
7239
4
Nov 24
5238
0
Oct 24
144