This question has been flagged
1 Reply
2167 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?